Ejemplo n.º 1
0
 /**
  * Post-insert hook. If overridden, should be called at end of function.
  *
  * @return void
  */
 protected function _postUpdate()
 {
     if ($this->_disableHooks) {
         return;
     }
     parent::_postUpdate();
     Engine_Hooks_Dispatcher::getInstance()->callEvent('on' . $this->getType(true) . 'UpdateAfter', $this);
     Engine_Hooks_Dispatcher::getInstance()->callEvent('onItemUpdateAfter', $this);
     // Search indexer
     if (!$this->isSearchable()) {
         // De-index
         Engine_Api::_()->getApi('search', 'core')->unindex($this);
     } else {
         if (is_array($this->_searchTriggers) && count(array_intersect_key((array) @$this->_modifiedFields, array_flip($this->_searchTriggers))) > 0) {
             // Re-index
             Engine_Api::_()->getApi('search', 'core')->index($this);
         }
     }
 }