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