示例#1
0
 /**
  * Get an object handle
  *
  * Force the object to be enqueue in the command chain.
  *
  * @return string A string that is unique, or NULL
  * @see execute()
  */
 public function getHandle()
 {
     return ObjectMixinAbstract::getHandle();
 }
示例#2
0
 /**
  * Initializes the default configuration for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param ObjectConfig $config  An optional ObjectConfig object with configuration options.
  * @return void
  */
 protected function _initialize(ObjectConfig $config)
 {
     parent::_initialize($config);
     $config->append(array('toolbars' => array()));
 }
示例#3
0
 /**
  * Initializes the default configuration for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param  ObjectConfig $config   An optional ObjectConfig object with configuration options.
  * @return void
  */
 protected function _initialize(ObjectConfig $config)
 {
     parent::_initialize($config);
     $config->append(array('behaviors' => array(), 'auto_mixin' => true));
 }
示例#4
0
 /**
  * Get the methods that are available for mixin based
  *
  * This function also dynamically adds a function of format is[Behavior] to allow client code to check if the
  * behavior is callable.
  *
  * @param  ObjectInterface $mixer The mixer requesting the mixable methods.
  * @return array An array of methods
  */
 public function getMixableMethods(ObjectMixable $mixer = null)
 {
     $methods = parent::getMixableMethods($mixer);
     $methods['is' . ucfirst($this->getIdentifier()->name)] = function () {
         return true;
     };
     unset($methods['execute']);
     unset($methods['getIdentifier']);
     unset($methods['getPriority']);
     unset($methods['getHandle']);
     unset($methods['getObject']);
     return $methods;
 }
示例#5
0
 /**
  * Initializes the options for the object
  * 
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   ObjectConfig $config  An optional ObjectConfig object with configuration options
  * @return  void
  */
 protected function _initialize(ObjectConfig $config)
 {
     $config->append(array('command_chain' => null, 'event_dispatcher' => null, 'dispatch_events' => true, 'event_priority' => CommandInterface::PRIORITY_LOWEST, 'enable_callbacks' => false, 'callback_priority' => CommandInterface::PRIORITY_HIGH));
     parent::_initialize($config);
 }
示例#6
0
 /**
  * Initializes the options for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   ObjectConfig $config  An optional ObjectConfig object with configuration options
  * @return  void
  */
 protected function _initialize(ObjectConfig $config)
 {
     $config->append(array('event_dispatcher' => null, 'event_subscribers' => array(), 'event_listeners' => array()));
     parent::_initialize($config);
 }
示例#7
0
 /**
  * Initializes the options for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   ObjectConfig $config Configuration options
  * @return  void
  */
 protected function _initialize(ObjectConfig $config)
 {
     $config->append(array('break_condition' => false));
     parent::_initialize($config);
 }
示例#8
0
 /**
  * Get the methods that are available for mixin.
  *
  * This functions overloads ObjectMixinAbstract::getMixableMethods and excludes the execute() function from the
  * list of available mixable methods.
  *
  * @param ObjectMixable $mixer The mixer requesting the mixable methods.
  * @return array An array of methods
  */
 public function getMixableMethods(ObjectMixable $mixer = null)
 {
     $methods = parent::getMixableMethods();
     unset($methods['execute']);
     unset($methods['getPriority']);
     return $methods;
 }
示例#9
0
 /**
  * Initializes the options for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   ObjectConfig $config  An optional ObjectConfig object with configuration options
  * @return  void
  */
 protected function _initialize(ObjectConfig $config)
 {
     $config->append(array('event_publisher' => 'event.publisher', 'event_subscribers' => array(), 'event_listeners' => array()));
     parent::_initialize($config);
 }