creocoder\taggable\TaggableQueryBehavior::relatedByTagValues PHP Method

relatedByTagValues() public method

Gets entities related by tags.
public relatedByTagValues ( string | string[] $values, string | null $attribute = null ) : ActiveQuery
$values string | string[]
$attribute string | null
return yii\db\ActiveQuery the owner
    public function relatedByTagValues($values, $attribute = null)
    {
        return $this->anyTagValues($values, $attribute)->addOrderBy(new Expression('COUNT(*) DESC'));
    }