public function getRoot()
    {
        if ( $this->owner->{$this->parentIdField} ) {
            return Yii::$app->db->cache(function(){
                return call_user_func("$this->ownerClassName::findOne", current($this->getParentsId()));
            }, null, $this->getTagDependency());
        } else {
            return $this->owner;
        }
    }
public function getRoot()
    {
        if ( $this->owner->{$this->parentIdField} ) {
            return Yii::$app->db->cache(function(){
                return call_user_func("$this->ownerClassName::findOne", current($this->getParentsId()));
            }, null, $this->getTagDependency());
        } else {
            return $this->owner;
        }
    }
public function getRoot ( ) { if ( $ this -> owner -> { $ this -> parentIdField } ) { return Yii :: $ app -> db -> cache ( function ( ) { return call_user_func ( "$this->ownerClassName::findOne" , current ( $ this -> getParentsId ( ) ) ) ; } , null , $ this -> getTagDependency ( ) ) ; } else { return $ this -> owner ; } }
Return root model of this model
@return \yii\db\ActiveRecord
Return root model of this model