本文整理汇总了PHP中Icinga\Data\Filter\Filter::fromQuerystring方法的典型用法代码示例。如果您正苦于以下问题:PHP Filter::fromQuerystring方法的具体用法?PHP Filter::fromQuerystring怎么用?PHP Filter::fromQuerystring使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Icinga\Data\Filter\Filter
的用法示例。
在下文中一共展示了Filter::fromQuerystring方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: eventgridAction
public function eventgridAction()
{
$this->addTitleTab('eventgrid', $this->translate('Event Grid'), $this->translate('Show the Event Grid'));
$form = new StatehistoryForm();
$form->setEnctype(Zend_Form::ENCTYPE_URLENCODED);
$form->setMethod('get');
$form->setTokenDisabled();
$form->setUidDisabled();
$form->render();
$this->view->form = $form;
$this->params->remove('view');
$orientation = $this->params->shift('vertical', 0) ? 'vertical' : 'horizontal';
/*
$orientationBox = new SelectBox(
'orientation',
array(
'0' => mt('monitoring', 'Vertical'),
'1' => mt('monitoring', 'Horizontal')
),
mt('monitoring', 'Orientation'),
'horizontal'
);
$orientationBox->applyRequest($this->getRequest());
*/
$query = $this->backend->select()->from('eventgrid', array('day', $form->getValue('state')));
$this->params->remove(array('objecttype', 'from', 'to', 'state', 'btn_submit'));
$this->view->filter = Filter::fromQuerystring((string) $this->params);
$query->applyFilter($this->view->filter);
$this->applyRestriction('monitoring/filter/objects', $query);
$this->view->summary = $query;
$this->view->column = $form->getValue('state');
// $this->view->orientationBox = $orientationBox;
$this->view->orientation = $orientation;
}