Initial commit

This commit is contained in:
2018-04-02 08:07:38 +02:00
commit 7330c1ed3e
2054 changed files with 405203 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace FluidTYPO3\Vhs\ViewHelpers\Extension\Path;
/*
* This file is part of the FluidTYPO3/Vhs project under GPLv2 or later.
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
use FluidTYPO3\Vhs\ViewHelpers\Extension\AbstractExtensionViewHelper;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
/**
* ### Path: Absolute Extension Folder Path
*
* Returns the absolute path to an extension folder.
*
* @author Claus Due <claus@namelesscoder.net>
* @package Vhs
* @subpackage ViewHelpers\Extension\Path
*/
class AbsoluteViewHelper extends AbstractExtensionViewHelper {
/**
* @return void
*/
public function initializeArguments() {
parent::initializeArguments();
$this->registerArgument('path', 'string', 'Optional path to append, second argument when calling \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath');
}
/**
* Render method
*
* @return string
*/
public function render() {
$extensionKey = $this->getExtensionKey();
return ExtensionManagementUtility::extPath($extensionKey, TRUE === isset($this->arguments['path']) ? $this->arguments['path'] : NULL);
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace FluidTYPO3\Vhs\ViewHelpers\Extension\Path;
/*
* This file is part of the FluidTYPO3/Vhs project under GPLv2 or later.
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
use FluidTYPO3\Vhs\ViewHelpers\Extension\AbstractExtensionViewHelper;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
/**
* ### Path: Relative Extension Folder Path
*
* Returns the relative path to an Extension folder.
*
* @author Claus Due <claus@namelesscoder.net>
* @package Vhs
* @subpackage ViewHelpers\Extension\Path
*/
class RelativeViewHelper extends AbstractExtensionViewHelper {
/**
* Render method
*
* @return string
*/
public function render() {
$extensionKey = $this->getExtensionKey();
return ExtensionManagementUtility::extRelPath($extensionKey);
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace FluidTYPO3\Vhs\ViewHelpers\Extension\Path;
/*
* This file is part of the FluidTYPO3/Vhs project under GPLv2 or later.
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
use FluidTYPO3\Vhs\ViewHelpers\Extension\AbstractExtensionViewHelper;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
/**
* ### Path: Relative Extension Resource Path
*
* Site Relative path to Extension Resources/Public folder.
*
* @author Claus Due <claus@namelesscoder.net>
* @package Vhs
* @subpackage ViewHelpers\Extension\Path
*/
class ResourcesViewHelper extends AbstractExtensionViewHelper {
/**
* @return void
*/
public function initializeArguments() {
parent::initializeArguments();
$this->registerArgument('path', 'string', 'Optional path to append after output of \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath');
}
/**
* Render method
*
* @return string
*/
public function render() {
$extensionKey = $this->getExtensionKey();
$path = TRUE === empty($this->arguments['path']) ? '' : $this->arguments['path'];
return ExtensionManagementUtility::extRelPath($extensionKey) . 'Resources/Public/' . $path;
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace FluidTYPO3\Vhs\ViewHelpers\Extension\Path;
/*
* This file is part of the FluidTYPO3/Vhs project under GPLv2 or later.
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
use FluidTYPO3\Vhs\ViewHelpers\Extension\AbstractExtensionViewHelper;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
/**
* ### Path: Relative Extension Folder Path
*
* Returns the site relative path to an extension folder.
*
* @author Claus Due <claus@namelesscoder.net>
* @package Vhs
* @subpackage ViewHelpers\Extension\Path
*/
class SiteRelativeViewHelper extends AbstractExtensionViewHelper {
/**
* Render method
*
* @return string
*/
public function render() {
$extensionKey = $this->getExtensionKey();
return ExtensionManagementUtility::siteRelPath($extensionKey);
}
}