textOperators() public static method

Returns human readable descriptions of all operator types.
public static textOperators ( ) : array
return array Hash with operator types and descriptions.
Exemplo n.º 1
0
 public function __construct($vars)
 {
     parent::__construct($vars, $vars->get('edit') ? _("Edit Text Criterion") : _("Add Text Criterion"), 'Whups_Form_Query_TextCriterion');
     $this->addHidden('', 'edit', 'boolean', false);
     $this->addVariable(_("Text"), 'text', 'text', true);
     $this->addVariable(_("Match Operator"), 'operator', 'enum', true, false, null, array(Whups_Query::textOperators()));
     $this->addVariable(_("Search Summary"), 'summary', 'boolean', false);
     $this->addVariable(_("Search Comments"), 'comments', 'boolean', false);
 }
Exemplo n.º 2
0
 public function __construct($vars)
 {
     parent::__construct($vars, $vars->get('edit') ? _("Edit User Criterion") : _("Add User Criterion"), 'Whups_Form_Query_UserCriterion');
     $this->addHidden('', 'edit', 'boolean', false);
     $this->addVariable(_("User ID"), 'user', 'text', true);
     $this->addVariable(_("Match Operator"), 'operator', 'enum', true, false, null, array(Whups_Query::textOperators()));
     $this->addVariable(_("Search Owners"), 'owners', 'boolean', false);
     $this->addVariable(_("Search Requester"), 'requester', 'boolean', false);
     $this->addVariable(_("Search Comments"), 'comments', 'boolean', false);
 }
Exemplo n.º 3
0
 public function __construct(&$vars)
 {
     global $whups_driver;
     parent::__construct($vars, $vars->get('edit') ? _("Edit Attribute Criterion") : _("Add Attribute Criterion"), 'Whups_Form_Query_AttributeCriterion');
     $this->addHidden('', 'edit', 'boolean', false);
     try {
         $this->attribs = $whups_driver->getAttributesForType();
         if ($this->attribs) {
             $this->addVariable(_("Match"), 'text', 'text', true);
             $this->addVariable(_("Match Operator"), 'operator', 'enum', true, false, null, array(Whups_Query::textOperators()));
             foreach ($this->attribs as $id => $attribute) {
                 $this->addVariable(sprintf(_("Search %s Attribute"), $attribute['human_name']), "a{$id}", 'boolean', false);
             }
         } else {
             $this->addVariable(_("Search Attribute"), 'attribute', 'invalid', true, false, null, array(_("There are no attributes defined.")));
         }
     } catch (Whups_Exception $e) {
         $this->addVariable(_("Search Attribute"), 'attribute', 'invalid', true, false, null, array($e->getMessage()));
     }
 }