/** * Delete an array of entities * * @param array $ids * * @return array */ public function deleteEntities($ids) { $this->getRepository()->nullVariantParent($ids); return parent::deleteEntities($ids); }
/** * Delete an array of entities * * @param array $ids * * @return array */ public function deleteEntities($ids) { $entities = parent::deleteEntities($ids); //remove the column from the leads table $leadsSchema = $this->factory->getSchemaHelper('column', 'leads'); foreach ($entities as $e) { $leadsSchema->dropColumn($e->getAlias()); } $leadsSchema->executeChanges(); }
/** * {@inheritdoc} */ public function deleteEntities($ids) { $entities = parent::deleteEntities($ids); $schemaHelper = $this->factory->getSchemaHelper('table'); foreach ($entities as $id => $entity) { //delete the associated results table $schemaHelper->deleteTable("form_results_" . $id . "_" . $entity->getAlias()); } $schemaHelper->executeChanges(); return $entities; }