PHP Class MetaModels\DcGeneral\Events\MetaModel\CreateVariantButton

Inheritance: extends MetaModels\DcGeneral\Events\BaseSubscriber
Afficher le fichier Open project: metamodels/core

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

breadcrumb() protected méthode

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

createButton() public méthode

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.
Résultat void

handleCreateVariantAction() public méthode

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

presetVariantBase() public méthode

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.
Résultat void

registerEventsInDispatcher() protected méthode

Register all listeners.
protected registerEventsInDispatcher ( ) : void
Résultat void