src/traits/TaggableTrait.php
public function getTags()
    {
        return $this->hasMany(Tag::class, ['id' => 'tag_id'])->viaTable('{{%admin_tag_relation}}', ['pk_id' => 'id'], function ($query) {
            $query->andWhere(['table_name' => static::cleanBaseTableName(static::tableName())]);
        });
    }
public function getTags()
    {
        return $this->hasMany(Tag::class, ['id' => 'tag_id'])->viaTable('{{%admin_tag_relation}}', ['pk_id' => 'id'], function ($query) {
            $query->andWhere(['table_name' => static::cleanBaseTableName(static::tableName())]);
        });
    }
public function getTags ( ) { return $ this -> hasMany ( Tag :: class , [ 'id' => 'tag_id' ] ) -> viaTable ( '{{%admin_tag_relation}}' , [ 'pk_id' => 'id' ] , function ( $ query ) { $ query -> andWhere ( [ 'table_name' => static :: cleanBaseTableName ( static :: tableName ( ) ) ] ) ; } ) ; }
Returns all related tag for the current active record item.

@return \luya\admin\models\Tag An active record array from tag models
Returns all related tag for the current active record item .