PHP Class MetaModels\DcGeneral\Events\MetaModel\CreateVariantButton

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

Public Methods

Method Description
createButton ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetOperationButtonEvent $event ) : void Check if we have to add the "Create variant" button.
handleCreateVariantAction ( ContaoCommunityAlliance\DcGeneral\Event\ActionEvent $event ) : void Handle the "create variant" event.
presetVariantBase ( ContaoCommunityAlliance\DcGeneral\Event\PreEditModelEvent $event ) : void Check the items before the edit start. If there is a item with variant support and a empty vargroup it must be a base. So set the varbase to 1.

Protected Methods

Method Description
breadcrumb ( ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $environment ) : string Get the breadcrumb navigation via event.
registerEventsInDispatcher ( ) : void Register all listeners.

Method Details

breadcrumb() protected method

Get the breadcrumb navigation via event.
protected breadcrumb ( ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $environment ) : string
$environment ContaoCommunityAlliance\DcGeneral\EnvironmentInterface The environment.
return string

createButton() public method

Check if we have to add the "Create variant" button.
public createButton ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetOperationButtonEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetOperationButtonEvent The event.
return void

handleCreateVariantAction() public method

Handle the "create variant" event.
public handleCreateVariantAction ( ContaoCommunityAlliance\DcGeneral\Event\ActionEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Event\ActionEvent The action Event being executed.
return void

presetVariantBase() public method

Check the items before the edit start. If there is a item with variant support and a empty vargroup it must be a base. So set the varbase to 1.
public presetVariantBase ( ContaoCommunityAlliance\DcGeneral\Event\PreEditModelEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Event\PreEditModelEvent The event with the model.
return void

registerEventsInDispatcher() protected method

Register all listeners.
protected registerEventsInDispatcher ( ) : void
return void