src/models/TagRelation.php
public static function getDataForRelation($tableName, $pkId)
    {
        return self::find()->where(['table_name' => $tableName, 'pk_id' => $pkId])->asArray()->all();
    }
public static function getDataForRelation($tableName, $pkId)
    {
        return self::find()->where(['table_name' => $tableName, 'pk_id' => $pkId])->asArray()->all();
    }
public static function getDataForRelation ( $ tableName , $ pkId ) { return self :: find ( ) -> where ( [ 'table_name' => $ tableName , 'pk_id' => $ pkId ] ) -> asArray ( ) -> all ( ) ; }
Get an array with all entries for a table name associated with a primary key.

This methods i mainly used internal to retrieve data for the Active Window. Use the {{luya\admin\traits\TagsTrait}} in your Model instead.

@param string $tableName The table name
@param integer $pkId The primary key combination.
@return array|ActiveRecord[]
Get an array with all entries for a table name associated with a primary key .