/** * Deletes an actor and all of the necessary cleanup. It also dispatches all the apps to * clean up after the deleted actor. * * @param KCommandContext $context Context parameter * * @return AnDomainEntityAbstract */ protected function _actionDelete(KCommandContext $context) { $this->getService('repos://site/components')->fetchSet()->registerEventDispatcher($this->getService('anahita:event.dispatcher')); $result = parent::_actionDelete($context); $this->getService('anahita:event.dispatcher')->dispatchEvent('onDeleteActor', array('actor_id' => $this->getItem()->id)); return $result; }