Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class PluginProdutoTable extends Doctrine_Table
- {
- private function getForList(){
- $q = $this->createQuery('a')
- ->where('a.is_activated = ?', 1)
- ->innerJoin('a.Translation t WITH t.lang = ?', sfContext::getInstance()->getUser()->getCulture())
- ->orderBy('t.name');
- return $q;
- }
- //....
- public function destaques(){
- $q = $this->getForList();
- $q->addWhere('a.destaque = ?', 1);
- return $q->execute();
- }
- }
Add Comment
Please, Sign In to add comment