Example #1
0
 public function afterFind()
 {
     parent::afterFind();
     $parent = (new \yii\db\Query())->select('parent')->where(['child' => $this->name])->from(\Yii::$app->authManager->itemChildTable)->scalar();
     if ($parent) {
         $this->parent = $parent;
     }
 }