/** * @return array */ public function getUninstallLines() { $placeholders = $this->getPlaceholders(); $lines = parent::getUninstallLines(); $lines[] = 'DROP TABLE ' . $placeholders['{{relation_table}}'] . ';'; return $lines; }
/** * @return $this */ public function processEntities() { $relation = $this->relation; $reversed = $relation->getReversed(); $relation->setReversed(false); $entities = $relation->getEntities(); $entities[0]->addRelatedEntity(ParentRelation::RELATION_TYPE_PARENT, $entities[1]); $entities[1]->addRelatedEntity(self::RELATION_TYPE_CHILD, $entities[0]); $entities[1]->setIsParent(true); $relation->setReversed($reversed); return parent::processEntities(); }