PHP Class MetaModels\DcGeneral\Events\Table\RenderSetting\Subscriber

Inheritance: extends MetaModels\DcGeneral\Events\BaseSubscriber
Show file Open project: metamodels/core

Protected Properties

Property Type Description
$metaModelCache MetaModels\IMetaModel[] Map is: [id of render setting] => IMetaModel.

Public Methods

Method Description
addCondition ( ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface $property, ContaoCommunityAlliance\DcGeneral\DataDefinition\ConditionInterface $condition ) : void Add a condition to a property.
buildPaletteConditions ( ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent $event ) : void Build the data definition palettes.
getAttributeOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void Retrieve the options for the attributes.
getLegend ( string $name, ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface $palette, ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $prevLegend = null ) : ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface Retrieve the legend with the given name.
getProperty ( string $name, ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $legend ) : ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface Retrieve a property from a legend or create a new one.
getTemplateOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void Provide options for default selection.
modelToLabel ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent $event ) : void Draw the render setting.

Protected Methods

Method Description
buildMetaPaletteConditions ( ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface $palette ) : void Apply conditions for meta palettes of the certain render setting types.
getMetaModel ( ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model ) : MetaModels\IMetaModel Retrieve the MetaModel instance from a render settings model.
registerEventsInDispatcher ( ) : void Register all listeners to handle creation of a data container.

Method Details

addCondition() public method

Add a condition to a property.
public addCondition ( ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface $property, ContaoCommunityAlliance\DcGeneral\DataDefinition\ConditionInterface $condition ) : void
$property ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface The property.
$condition ContaoCommunityAlliance\DcGeneral\DataDefinition\ConditionInterface The condition to add.
return void

buildMetaPaletteConditions() protected method

Apply conditions for meta palettes of the certain render setting types.
protected buildMetaPaletteConditions ( ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface $palette ) : void
$palette ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface The palette.
return void

buildPaletteConditions() public method

Build the data definition palettes.
public buildPaletteConditions ( ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent The event.
return void

getAttributeOptions() public method

Retrieve the options for the attributes.
public getAttributeOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent The event.
return void

getLegend() public method

Retrieve the legend with the given name.
public getLegend ( string $name, ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface $palette, ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $prevLegend = null ) : ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface
$name string Name of the legend.
$palette ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PaletteInterface The palette.
$prevLegend ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface The previous legend.
return ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface

getMetaModel() protected method

Retrieve the MetaModel instance from a render settings model.
protected getMetaModel ( ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model ) : MetaModels\IMetaModel
$model ContaoCommunityAlliance\DcGeneral\Data\ModelInterface The model to fetch the MetaModel instance for.
return MetaModels\IMetaModel

getProperty() public method

Retrieve a property from a legend or create a new one.
public getProperty ( string $name, ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface $legend ) : ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface
$name string The legend name.
$legend ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\LegendInterface The legend instance.
return ContaoCommunityAlliance\DcGeneral\DataDefinition\Palette\PropertyInterface

getTemplateOptions() public method

Provide options for default selection.
public getTemplateOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent The event.
return void

modelToLabel() public method

Draw the render setting.
public modelToLabel ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent The event.
return void

registerEventsInDispatcher() protected method

Register all listeners to handle creation of a data container.
protected registerEventsInDispatcher ( ) : void
return void

Property Details

$metaModelCache protected property

Map is: [id of render setting] => IMetaModel.
protected IMetaModel[],MetaModels $metaModelCache
return MetaModels\IMetaModel[]