/** * @return AbstractEditor */ public function getEditor() { if ($this->isGuest) { return Editor::model()->findByPk(EDitor::DEFAULT_EDITOR_ID); } return $this->getUser()->company->editor; }