/**
  * @return Gpf_SqlBuilder_SelectBuilder
  */
 protected function createSelectBuilder() {
     $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
     $selectBuilder->select->add('DISTINCT('.'b.'.Pap_Db_Table_BannerWrappers::ID.')', self::ID);
     $selectBuilder->select->add('b.'.Pap_Db_Table_BannerWrappers::NAME, self::VALUE);
     $selectBuilder->from->add(Pap_Db_Table_BannerWrappers::getName(), 'b');
     $selectBuilder->where->add('b.'.Pap_Db_Table_BannerWrappers::NAME, '<>', 'NULL');
     $selectBuilder->where->add('b.'.Pap_Db_Table_BannerWrappers::NAME, '<>', '');
     return $selectBuilder;
 }
Ejemplo n.º 2
0
 protected function init() {
     $this->setTable(Pap_Db_Table_BannerWrappers::getInstance());
     parent::init();
 }
Ejemplo n.º 3
0
 public static function getInstance() {
     if(self::$instance === null) {
         self::$instance = new self;
     }
     return self::$instance;
 }