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

Inheritance: extends MetaModels\DcGeneral\Events\BaseSubscriber
ファイルを表示 Open project: metamodels/core

Public Methods

Method Description
decodeAttributeValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\DecodePropertyValueForWidgetEvent $event ) : void Translates an attribute id to a generated alias.
decodeValueValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\DecodePropertyValueForWidgetEvent $event ) : void Translates an value to a generated alias to allow numeric values.
encodeAttributeValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\EncodePropertyValueFromWidgetEvent $event ) : void Translates an generated alias to the corresponding attribute id.
encodeValueValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\EncodePropertyValueFromWidgetEvent $event ) : void Translates an generated alias to the corresponding value.
generatePasteButton ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPasteButtonEvent $event ) : void Generate the paste button.
getAttributeOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void Prepares an option list with alias => name connection for all attributes.
getLabelText ( ContaoCommunityAlliance\Translator\TranslatorInterface $translator, string $type ) : string Retrieve the label text for a condition setting or the default one.
getMetaModel ( ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $interface ) : MetaModels\IMetaModel Retrieve the MetaModel attached to the model condition setting.
getTypeOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void Provide options for property condition types.
getValueOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void Provide options for the values contained within a certain attribute.
handleModelToLabel ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent $event ) : void Render the html for the input screen condition.
setValueOptionsMultiple ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ManipulateWidgetEvent $event ) : void Set the the value select to multiple.

Protected Methods

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

Private Methods

Method Description
getOptionsViaDcGeneral ( MetaModels\IMetaModel $metaModel, ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $environment, MetaModels\Attribute\IAttribute $attribute ) : array Obtain the values of a property within a dc-general instance.

Method Details

decodeAttributeValue() public method

Translates an attribute id to a generated alias.
public decodeAttributeValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\DecodePropertyValueForWidgetEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\DecodePropertyValueForWidgetEvent The event.
return void

decodeValueValue() public method

Translates an value to a generated alias to allow numeric values.
public decodeValueValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\DecodePropertyValueForWidgetEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\DecodePropertyValueForWidgetEvent The event.
return void

encodeAttributeValue() public method

Translates an generated alias to the corresponding attribute id.
public encodeAttributeValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\EncodePropertyValueFromWidgetEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\EncodePropertyValueFromWidgetEvent The event.
return void

encodeValueValue() public method

Translates an generated alias to the corresponding value.
public encodeValueValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\EncodePropertyValueFromWidgetEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\EncodePropertyValueFromWidgetEvent The event.
return void

generatePasteButton() public method

Generate the paste button.
public generatePasteButton ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPasteButtonEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPasteButtonEvent The event.
return void

getAttributeOptions() public method

This is used in the attr_id select box.
public getAttributeOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent The event.
return void

getLabelText() public method

Retrieve the label text for a condition setting or the default one.
public getLabelText ( ContaoCommunityAlliance\Translator\TranslatorInterface $translator, string $type ) : string
$translator ContaoCommunityAlliance\Translator\TranslatorInterface The environment in use.
$type string The type of the element.
return string

getMetaModel() public method

Retrieve the MetaModel attached to the model condition setting.
public getMetaModel ( ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $interface ) : MetaModels\IMetaModel
$interface ContaoCommunityAlliance\DcGeneral\EnvironmentInterface The environment.
return MetaModels\IMetaModel

getTypeOptions() public method

Provide options for property condition types.
public getTypeOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent The event.
return void

getValueOptions() public method

The values get prefixed with 'value_' to ensure numeric values are kept intact.
public getValueOptions ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent The event.
return void

handleModelToLabel() public method

Render the html for the input screen condition.
public handleModelToLabel ( 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

setValueOptionsMultiple() public method

Set the the value select to multiple.
public setValueOptionsMultiple ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ManipulateWidgetEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ManipulateWidgetEvent The event.
return void