models/AuthItem.php
public function addChild(AuthItem $item)
    {
        if ($item->isNewRecord && !$item->save()) {
            return false;
        }
        return Yii::$app->authManager->addChild($this, $item);
    }
public function addChild(AuthItem $item)
    {
        if ($item->isNewRecord && !$item->save()) {
            return false;
        }
        return Yii::$app->authManager->addChild($this, $item);
    }
public function addChild ( AuthItem $ item ) { if ( $ item -> isNewRecord && ! $ item -> save ( ) ) { return false ; } return Yii :: $ app -> authManager -> addChild ( $ this , $ item ) ; }
Attaches child related to this model by AuthItemChild.
@param AuthItem $item child.
@return integer whether child is attached.
Attaches child related to this model by AuthItemChild .