Ejemplo n.º 1
0
 /**
  * Create a new instance.
  *
  * @param CommandInterface     $command     The command to attach.
  *
  * @param EnvironmentInterface $environment The environment in use.
  */
 public function __construct(CommandInterface $command, EnvironmentInterface $environment)
 {
     parent::__construct($environment);
     $this->command = $command;
 }
Ejemplo n.º 2
0
 /**
  * Create a new container aware event.
  *
  * @param IMetaModel           $metaModel   The MetaModel.
  *
  * @param IAttribute           $attribute   The attribute being built.
  *
  * @param EnvironmentInterface $environment The environment.
  */
 public function __construct(IMetaModel $metaModel, IAttribute $attribute, EnvironmentInterface $environment)
 {
     parent::__construct($environment);
     $this->metaModel = $metaModel;
     $this->attribute = $attribute;
 }
Ejemplo n.º 3
0
 /**
  * Create a new instance.
  *
  * @param EnvironmentInterface $environment The environment in use.
  *
  * @param Action               $action      The action.
  */
 public function __construct(EnvironmentInterface $environment, Action $action)
 {
     parent::__construct($environment);
     $this->action = $action;
 }
 /**
  * Create a new instance.
  *
  * @param EnvironmentInterface  $environment The environment to attach.
  *
  * @param PanelElementInterface $element     The element for which a template shall get retrieved for.
  */
 public function __construct(EnvironmentInterface $environment, PanelElementInterface $element)
 {
     parent::__construct($environment);
     $this->element = $element;
 }
 /**
  * Check the restrictions against the information within the event and determine if the callback shall be executed.
  *
  * @param AbstractEnvironmentAwareEvent $event The Event for which the callback shall be invoked.
  *
  * @return bool
  */
 public function wantToExecute($event)
 {
     return empty($this->dataContainerName) || $event->getEnvironment()->getDataDefinition()->getName() == $this->dataContainerName;
 }
Ejemplo n.º 6
0
 /**
  * Create a new model aware event.
  *
  * @param EnvironmentInterface $environment The environment.
  *
  * @param ModelInterface       $model       The model attached to the event.
  */
 public function __construct(EnvironmentInterface $environment, ModelInterface $model)
 {
     parent::__construct($environment);
     $this->model = $model;
 }
 /**
  * Create a new instance of the event.
  *
  * @param EnvironmentInterface $environment The environment in use.
  *
  * @param string               $error       The error message.
  */
 public function __construct(EnvironmentInterface $environment, $error)
 {
     parent::__construct($environment);
     $this->error = $error;
 }