src/aws/TaggableActiveWindow.php
public function callbackSaveTag($tagName)
    {
        $model = Tag::find()->where(['name' => $tagName])->exists();

        if ($model) {
            return false;
        }

        $model = new Tag();
        $model->name = $tagName;
        $model->save();
        
        return $model->id;
    }
public function callbackSaveTag($tagName)
    {
        $model = Tag::find()->where(['name' => $tagName])->exists();

        if ($model) {
            return false;
        }

        $model = new Tag();
        $model->name = $tagName;
        $model->save();
        
        return $model->id;
    }
public function callbackSaveTag ( $ tagName ) { $ model = Tag :: find ( ) -> where ( [ 'name' => $ tagName ] ) -> exists ( ) ; if ( $ model ) { return false ; } $ model = new Tag ( ) ; $ model -> name = $ tagName ; $ model -> save ( ) ; return $ model -> id ; }
Save new tag to the list of tags.

@param string $tagName
@return boolean|number
Save new tag to the list of tags .