2014-04-18 14:20:28 +02:00
|
|
|
<?php
|
|
|
|
namespace DigiComp\SettingValidator;
|
|
|
|
|
2017-06-03 12:56:14 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the DigiComp.SettingValidator package.
|
|
|
|
*
|
|
|
|
* (c) digital competence
|
|
|
|
*
|
|
|
|
* This package is Open Source Software. For the full copyright and license
|
|
|
|
* information, please view the LICENSE file which was distributed with this
|
|
|
|
* source code.
|
|
|
|
*/
|
|
|
|
|
2017-03-13 17:00:13 +01:00
|
|
|
use Neos\Flow\Configuration\ConfigurationManager;
|
|
|
|
use Neos\Flow\Core\Bootstrap;
|
|
|
|
use Neos\Flow\Package\Package as BasePackage;
|
2014-04-18 14:20:28 +02:00
|
|
|
|
|
|
|
/**
|
2017-06-03 12:56:14 +02:00
|
|
|
* Package base class of the DigiComp.SettingValidator package.
|
2014-04-18 14:20:28 +02:00
|
|
|
*/
|
2016-08-01 01:00:29 +02:00
|
|
|
class Package extends BasePackage
|
|
|
|
{
|
2017-06-03 12:56:14 +02:00
|
|
|
const CONFIGURATION_TYPE_VALIDATION = 'Validation';
|
|
|
|
|
2017-03-13 17:00:13 +01:00
|
|
|
/**
|
|
|
|
* @param Bootstrap $bootstrap
|
|
|
|
*/
|
2016-08-01 01:00:29 +02:00
|
|
|
public function boot(Bootstrap $bootstrap)
|
|
|
|
{
|
|
|
|
parent::boot($bootstrap);
|
2014-04-18 14:20:28 +02:00
|
|
|
|
2016-08-01 01:00:29 +02:00
|
|
|
$dispatcher = $bootstrap->getSignalSlotDispatcher();
|
2017-03-13 17:00:13 +01:00
|
|
|
$dispatcher->connect(ConfigurationManager::class, 'configurationManagerReady',
|
|
|
|
function ($configurationManager) {
|
2018-04-05 09:02:15 +02:00
|
|
|
/* @var ConfigurationManager $configurationManager */
|
2016-08-01 01:00:29 +02:00
|
|
|
$configurationManager->registerConfigurationType(
|
2017-06-03 12:56:14 +02:00
|
|
|
static::CONFIGURATION_TYPE_VALIDATION,
|
2016-08-01 01:00:29 +02:00
|
|
|
ConfigurationManager::CONFIGURATION_PROCESSING_TYPE_DEFAULT,
|
|
|
|
true
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
2014-04-18 14:20:28 +02:00
|
|
|
}
|