Ejemplo n.º 1
0
 /**
  * This tests whether this addon has a flag anywhere up its ancenstors.
  *
  * @return bool
  * @author Eric Rochester <*****@*****.**>
  **/
 public function hasFlag()
 {
     $flag = false;
     if (is_null($this->parentAddon)) {
         $flag = !is_null($this->flag);
     } else {
         $flag = $this->parentAddon->hasFlag();
     }
     return $flag;
 }
Ejemplo n.º 2
0
 /**
  * This builds a query for returning all the records to index from the
  * database.
  *
  * @param Omeka_Db_Table         $table The table to create the SQL for.
  * @param SolrSearch_Addon_Addon $addon The addon to generate SQL for.
  *
  * @return Omeka_Db_Select $select The select statement to execute for the
  * query.
  * @author Eric Rochester <*****@*****.**>
  **/
 public function buildSelect($table, $addon)
 {
     $select = $table->select()->from($table->getTableName());
     if ($addon->hasFlag()) {
         $this->_addFlag($select, $addon);
     }
     return $select;
 }