PluginTagTable::getAllTagNameWithCount()
为我提供了标记列表,但我需要在标记标记到的内容中添加条件。
如何获取标签列表+内容数量,content.state_id = 3
?
答案 0 :(得分:0)
在撇号插件中找到答案:
$q = Doctrine_Query::create()->from('Tagging tg, tg.Tag t, Content c');
$q->andWhere('c.id = tg.taggable_id and c.state_id = ?', 3);
$this->tagsInOrder = PluginTagTable::getAllTagNameWithCount($q,Array('model' => 'Content', 'sort_by_popularity' => true));