/** * Post-insert hook. If overridden, should be called at end of function. * * @return void */ protected function _postInsert() { if ($this->_disableHooks) { return; } parent::_postInsert(); $prop = $this->getShortType() . '_id'; $this->_identity = $this->{$prop}; Engine_Hooks_Dispatcher::getInstance()->callEvent('on' . $this->getType(true) . 'CreateAfter', $this); Engine_Hooks_Dispatcher::getInstance()->callEvent('onItemCreateAfter', $this); // Search indexer if ($this->isSearchable() && is_array($this->_searchTriggers)) { // Index Engine_Api::_()->getApi('search', 'core')->index($this); } }