first commit
This commit is contained in:
commit
e81864e683
2984 files changed
+267797
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
/*
|
||||
* This file is part of the package bk2k/bootstrap-package.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace BK2K\BootstrapPackage\ExpressionLanguage;
|
||||
|
||||
use TYPO3\CMS\Core\ExpressionLanguage\AbstractProvider;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* ConditionProvider
|
||||
*/
|
||||
class ConditionProvider extends AbstractProvider
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->expressionLanguageVariables = [
|
||||
'extension' => GeneralUtility::makeInstance(ExtensionWrapper::class)
|
||||
];
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
/*
|
||||
* This file is part of the package bk2k/bootstrap-package.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace BK2K\BootstrapPackage\ExpressionLanguage;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
||||
|
||||
/**
|
||||
* ExtensionWrapper
|
||||
*/
|
||||
class ExtensionWrapper
|
||||
{
|
||||
/**
|
||||
* @param string $extensionKey
|
||||
* @return bool
|
||||
*/
|
||||
public function isLoaded($extensionKey): bool
|
||||
{
|
||||
return ExtensionManagementUtility::isLoaded($extensionKey);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user