Ingo_Basic_Filters::url PHP Method

url() public static method

public static url ( array $opts = [] )
$opts array Additional options:
  - mbox_search: (string) Filter results by this mailbox.
  - mbox_search_substr: (boolean) If true, do substring search instead
                        of exact match.
    public static function url(array $opts = array())
    {
        $url = Horde::url('basic.php')->add('page', 'filters');
        if (isset($opts['mbox_search'])) {
            $url->add(array('actionID' => 'mbox_search', 'searchexact' => intval(empty($opts['mbox_search_substr'])), 'searchfield' => strval($opts['mbox_search'])));
        }
        return $url;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  */
 protected function _init()
 {
     global $injector, $notification, $page_output;
     $this->_assertCategory('Ingo_Rule_System_Whitelist', _("Whitelist"));
     $ingo_storage = $injector->getInstance('Ingo_Factory_Storage')->create();
     $whitelist = $ingo_storage->getSystemRule('Ingo_Rule_System_Whitelist');
     /* Token checking & perform requested actions. */
     switch ($this->_checkToken(array('rule_update'))) {
         case 'rule_update':
             try {
                 $whitelist->addresses = $this->vars->whitelist;
                 $ingo_storage->updateRule($whitelist);
                 $notification->push(_("Changes saved."), 'horde.success');
                 $injector->getInstance('Ingo_Factory_Script')->activateAll();
             } catch (Ingo_Exception $e) {
                 $notification->push($e);
             }
             break;
     }
     /* Prepare the view. */
     $view = new Horde_View(array('templatePath' => INGO_TEMPLATES . '/basic/whitelist'));
     $view->addHelper('Horde_Core_View_Helper_Help');
     $view->addHelper('Horde_Core_View_Helper_Label');
     $view->addHelper('Text');
     $view->disabled = $whitelist->disable;
     $view->formurl = $this->_addToken(self::url());
     $view->whitelist = implode("\n", $whitelist->addresses);
     $page_output->addScriptFile('whitelist.js');
     $page_output->addInlineJsVars(array('IngoWhitelist.filtersurl' => strval(Ingo_Basic_Filters::url()->setRaw(true))));
     $this->title = _("Whitelist Edit");
     $this->output = $view->render('whitelist');
 }
All Usage Examples Of Ingo_Basic_Filters::url
Ingo_Basic_Filters