/** * overwrite after delete handler to go though multiple deleted items * @param type $data */ public function handle_item_after_delete($data) { foreach ($data->deleted as $model) { // delete collections $this->delete_collections($model); // delete alias $this->delete_alias($model); // delete version if ($this->_settings->get('version') == TRUE) { Version::factory($model)->delete(); } } }
/** * copy alias */ public function handle_item_after_copy($data) { // get copy $copy = $data->copy; // create new alias if ($this->_settings->get('alias.global') == TRUE || $this->_settings->get('alias.module') == TRUE) { $this->create_alias($copy, $copy->alias); } // create version fo copy if ($this->_settings->get('version') == TRUE) { Version::factory($copy)->commit(); } }