Пример #1
0
 /**
  * Returns the editor of this page.
  *
  * @return ActiveQueryInterface the relational query object.
  */
 public function getEditor()
 {
     if ($this->updated_by == $this->created_by) {
         return $this->getAuthor();
     }
     return $this->hasOne(User::className(), ['id' => 'updated_by']);
 }