Beispiel #1
0
 protected function _actionEnable($context)
 {
     $entity = $this->getItem();
     if ($entity->getIdentifier()->name === 'thread') {
         foreach ($entity->posts as $post) {
             $post->enabled = 1;
         }
     }
     parent::_actionEnable($context);
 }
Beispiel #2
0
 /**
  * Initializes the default configuration for the object.
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   object  An optional KConfig object with configuration options.
  */
 protected function _initialize(KConfig $config)
 {
     parent::_initialize($config);
     $this->_viewer = get_viewer();
 }