public function getByName($name) { parent::getByName($name); if (in_array($this->model->getType(), ["user", "role"])) { $this->loadWorkspaces(); } }