Beispiel #1
0
    /**
     * Only add new items to the index if they have a frontend link
     *
     * @param KControllerContextInterface $context
     */
    protected function _afterAdd(KControllerContextInterface $context)
    {
        $name = $this->getMixer()->getIdentifier()->name;

        if ($name === $this->_entity && $this->getModel()->findPage($context->result)) {
            parent::_afterAdd($context);
        }
    }
Beispiel #2
0
 /**
  * Only add new items to the index if they have a frontend link
  *
  * @param KControllerContextInterface $context
  */
 protected function _afterAdd(KControllerContextInterface $context)
 {
     $name = $context->result->getIdentifier()->name;
     // Get a new model since we are going to change the state and it would reset the cached entity
     $model = $this->getObject('com://admin/docman.model.documents');
     if ($name === $this->_entity && $model->page('all')->findPage($context->result)) {
         parent::_afterAdd($context);
     }
 }
 /**
  * Gets the Joomla event dispatcher
  *
  * @return JDispatcher
  */
 protected function _getDispatcher()
 {
     if (!self::$_dispatcher) {
         JPluginHelper::importPlugin('finder');
         self::$_dispatcher = JDispatcher::getInstance();
     }
     return self::$_dispatcher;
 }