Example #1
0
 /**
  * Constructor.
  *
  * @param  string              $name       The event name
  * @param  array|\Traversable   $attributes An associative array or a Traversable object instance
  * @param  ObjectInterface    $target     The event target
  */
 public function __construct($name = '', $attributes = array(), $target = null)
 {
     parent::__construct($attributes);
     $this->setName($name);
     $this->setTarget($target);
     $this->setAttributes($attributes);
 }
Example #2
0
 /**
  * Constructor.
  *
  * @param	string $name The command name
  * @param   array|ObjectConfig 	An associative array of configuration settings or a ObjectConfig instance.
  */
 public function __construct($name, $config = array())
 {
     parent::__construct($config);
     $this->append(array('icon' => 'icon-32-' . $name, 'id' => $name, 'label' => ucfirst($name), 'disabled' => false, 'title' => '', 'href' => null, 'attribs' => array('class' => array())));
     //Create the children array
     $this->_commands = array();
     //Set the command name
     $this->_name = $name;
 }
Example #3
0
 /**
  * Constructor.
  *
  * @param  array|\Traversable  $attributes An associative array or a Traversable object instance
  */
 public function __construct($attributes = array())
 {
     ObjectConfig::__construct($attributes);
     //Set the subject and the name
     if ($attributes instanceof ModelContextInterface) {
         $this->setSubject($attributes->getSubject());
         $this->setName($attributes->getName());
     }
 }
Example #4
0
 /**
  * Constructor.
  *
  * @param  string              $name       The command name
  * @param  array|\Traversable  $attributes An associative array or a Traversable object instance
  * @param  mixed               $subject    The command subject
  */
 public function __construct($name = '', $attributes = array(), $subject = null)
 {
     parent::__construct($attributes);
     $this->setName($name);
     $this->setSubject($subject);
 }