/** * Delete models. */ protected function deleteModels() { $ref = $this->relation->getReference(); if ($ref->isPermitted(Entity::DELETE)) { $ref->getRepository()->delete($this->getIdsToDelete()); } }
/** * @param Model $model */ protected function fillModel(Model $model) { parent::fillModel($model); $this->relation->attach($model, $this->parent); }