/** * @param AbstractModel $model * @return AbstractModelFile */ public function setModel(AbstractModel $model) { $this->model = $model; $this->getFile()->getMainElement()->setName($model->getPackagedName()); return $this; }