public function onRemoveDocument(DataSource_Hybrid_Document $doc) { $ids = explode(',', $doc->get($this->name)); $this->delete_related_docs($doc->id); if ($this->one_to_many and !empty($ids)) { DataSource_Hybrid_Factory::remove_documents($ids); } }
/** * Удаление раздела * * @return \DataSource_Hybrid_Section */ public function remove() { $id = $this->id(); parent::remove(); $this->record()->destroy(); DataSource_Hybrid_Factory::remove($id); $this->_record = NULL; $this->_agent = NULL; return $this; }
public function onRemoveDocument(DataSource_Hybrid_Document $doc) { if ($this->one_to_one) { DataSource_Hybrid_Factory::remove_documents($doc->get($this->name)); } }