Example #1
0
 /**
  * Execute the ipOpts to get the list of options to return to the client-
  * side
  *
  * @param  Database $db Database instance
  * @return Array        Array of value / label options for the list
  * @internal
  */
 public function optionsExec($db)
 {
     $table = $this->_optsTable;
     if (!$table) {
         return false;
     } else {
         if (is_callable($table) && is_object($table)) {
             return $table();
         } else {
             return $db->selectDistinct($table, $this->_optsValue . ' as value, ' . $this->_optsLabel . ' as label', null, 'label asc')->fetchAll();
         }
     }
 }