PHP Class eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor

Use it when you want to map SiteAccess dependent semantic configuration to internal settings, readable with the ConfigResolver.
Mostra file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$availableSiteAccesses array Registered configuration scopes.
$contextualizer eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface
$groupsBySiteAccess array Registered scope groups names, indexed by scope.
$scopeNodeName string Name of the node under which scope based (semantic) configuration takes place.

Public Methods

Method Description
__construct ( Symfony\Component\DependencyInjection\ContainerInterface $containerBuilder, $namespace, $siteAcccessNodeName = 'system' )
getContextualizer ( ) : eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface
mapConfig ( array $config, eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationMapperInterface | callable $mapper ) Triggers mapping process between semantic and internal configuration.
mapConfigArray ( string $id, array $config, integer $options ) Proxy to Contextualizer::mapConfigArray().
mapSetting ( string $id, array $config ) Proxy to Contextualizer::mapSetting().
setAvailableSiteAccesses ( array $availableSiteAccesses ) Injects available SiteAccesses.
setContextualizer ( eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface $contextualizer )
setGroupsBySiteAccess ( array $groupsBySiteAccess ) Injects available scope groups, indexed by scope.

Protected Methods

Method Description
buildContextualizer ( Symfony\Component\DependencyInjection\ContainerInterface $containerBuilder, string $namespace, string $siteAccessNodeName ) : eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface Builds configuration contextualizer (I know, sounds obvious.

Method Details

__construct() public method

public __construct ( Symfony\Component\DependencyInjection\ContainerInterface $containerBuilder, $namespace, $siteAcccessNodeName = 'system' )
$containerBuilder Symfony\Component\DependencyInjection\ContainerInterface

buildContextualizer() protected method

..). Override this method if you want to use your own contextualizer class. static::$scopes and static::$groupsByScope must be injected first.
protected buildContextualizer ( Symfony\Component\DependencyInjection\ContainerInterface $containerBuilder, string $namespace, string $siteAccessNodeName ) : eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface
$containerBuilder Symfony\Component\DependencyInjection\ContainerInterface
$namespace string
$siteAccessNodeName string
return eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface

getContextualizer() public method

public getContextualizer ( ) : eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface
return eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface

mapConfig() public method

Triggers mapping process between semantic and internal configuration.
public mapConfig ( array $config, eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationMapperInterface | callable $mapper )
$config array Parsed semantic configuration
$mapper eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationMapperInterface | callable Mapper to use. Can be either an instance of ConfigurationMapper or a callable. HookableConfigurationMapper can also be used. In this case, preMap() and postMap() will be also called respectively before and after the mapping loop. If $mapper is a callable, the same arguments as defined in the signature defined in ConfigurationMapper interface will be passed: `array $scopeSettings, $currentScope, ContextualizerInterface $contextualizer`

mapConfigArray() public method

Proxy to Contextualizer::mapConfigArray().
See also: ContextualizerInterface::mapConfigArray()
public mapConfigArray ( string $id, array $config, integer $options )
$id string Id of the setting array to map.
$config array Full semantic configuration array for current bundle.
$options integer Bit mask of options (See constants of `ContextualizerInterface`)

mapSetting() public method

Proxy to Contextualizer::mapSetting().
See also: ContextualizerInterface::mapSetting()
public mapSetting ( string $id, array $config )
$id string Id of the setting to map.
$config array Full semantic configuration array for current bundle.

setAvailableSiteAccesses() public static method

Important: Available SiteAccesses need to be set before ConfigurationProcessor to be constructed by a bundle to set its configuration up.
public static setAvailableSiteAccesses ( array $availableSiteAccesses )
$availableSiteAccesses array

setContextualizer() public method

public setContextualizer ( eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface $contextualizer )
$contextualizer eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface

setGroupsBySiteAccess() public static method

Important: Groups need to be set before ConfigurationProcessor to be constructed by a bundle to set its configuration up.
public static setGroupsBySiteAccess ( array $groupsBySiteAccess )
$groupsBySiteAccess array

Property Details

$availableSiteAccesses protected_oe static_oe property

Registered configuration scopes.
protected static array $availableSiteAccesses
return array

$contextualizer protected_oe property

protected ContextualizerInterface,eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware $contextualizer
return eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface

$groupsBySiteAccess protected_oe static_oe property

Registered scope groups names, indexed by scope.
protected static array $groupsBySiteAccess
return array

$scopeNodeName protected_oe property

Name of the node under which scope based (semantic) configuration takes place.
protected string $scopeNodeName
return string