本文整理汇总了PHP中Filter::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Filter::init方法的具体用法?PHP Filter::init怎么用?PHP Filter::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Filter
的用法示例。
在下文中一共展示了Filter::init方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
function init()
{
parent::init();
//$this->addClass('span3');
$this->addClass('float-right stacked span4');
$this->template->trySet('fieldset', 'atk-row');
$this->template->tryDel('button_row');
$this->search_field = $this->addField('line', 'q', '')->setNoSave();
$this->search_field->addButton('')->setHtml(' ')->setIcon('search')->js('click', $this->js()->submit());
}
示例2: init
/**
* Initialization
*
* @return void
*/
function init()
{
parent::init();
// template fixes
$this->addClass('atk-form atk-form-stacked atk-form-compact atk-move-right');
$this->template->trySet('fieldset', 'atk-row');
$this->template->tryDel('button_row');
$this->addClass('atk-col-3');
// add field
$this->search_field = $this->addField('Line', 'q', '')->setAttr('placeholder', 'Search')->setNoSave();
// cancel button
if ($this->show_cancel && $this->recall($this->search_field->short_name)) {
$this->add('View', null, 'cancel_button')->setClass('atk-cell')->add('HtmlElement')->setElement('A')->setAttr('href', 'javascript:void(0)')->setClass('atk-button')->setHtml('<span class="icon-cancel atk-swatch-red"></span>')->js('click', array($this->search_field->js()->val(null), $this->js()->submit()));
}
// search button
$this->add('HtmlElement', null, 'form_buttons')->setElement('A')->setAttr('href', 'javascript:void(0)')->setClass('atk-button')->setHtml('<span class="icon-search"></span>')->js('click', $this->js()->submit());
}
示例3: init
function init()
{
parent::init();
$this->js(true)->_load('ui.atk4_form')->atk4_form();
//on field change we should change a name of a button also: 'clear' in the name will clear fields
/*
$ff->js('focus',array(
$x->js()->show(),
$s->js()->hide()
));
$ff->js('blur',array(
$x->js()->hide(),
$s->js()->show()
));
*/
//$this->addSubmit('Go');
}
示例4: init
/**
* Initialization
*
* @return void
*/
function init()
{
parent::init();
// template fixes
$this->addClass('float-right span4 atk-quicksearch');
$this->template->trySet('fieldset', 'atk-row');
$this->template->tryDel('button_row');
// add field
$this->search_field = $this->addField('Line', 'q', '')->setNoSave();
// add buttonset
$this->bset = $this->bset_position == 'after' ? $this->search_field->afterField() : $this->search_field->beforeField();
$this->bset = $this->bset->add($this->bset_class);
// cancel button
if ($this->show_cancel && $this->recall($this->search_field->short_name)) {
$this->bset->addButton('', array('options' => array('text' => false)))->setHtml(' ')->setIcon($this->cancel_icon)->js('click', array($this->search_field->js()->val(null), $this->js()->submit()));
}
// search button
$this->bset->addButton('', array('options' => array('text' => false)))->setHtml(' ')->setIcon($this->submit_icon)->js('click', $this->js()->submit());
}
示例5: EventsManager
$eventsManager = new EventsManager();
// Listen for events produced in the dispatcher using the Security plugin
$eventsManager->attach('dispatch:beforeExecuteRoute', new SecurityPlugin());
// Handle exceptions and not-found exceptions using NotFoundPlugin
// $eventsManager->attach('dispatch:beforeException', new NotFoundPlugin);
$dispatcher = new Dispatcher();
// Assign the events manager to the dispatcher
$dispatcher->setEventsManager($eventsManager);
file_put_contents('e3.txt', 'f', FILE_APPEND);
return $dispatcher;
});
$di->set('voltService', function ($view, $di) {
$volt = new Volt($view, $di);
$compiler = $volt->getCompiler();
$filter = new Filter($compiler);
$filter->init();
$compiler->setOptions(array("compiledPath" => "./view/compiled-files/", "compiledExtension" => ".php", "compileAlways" => true));
return $volt;
});
// Registering the view component
$di->set('view', function () {
$view = new View();
$view->setViewsDir(__DIR__ . '/view');
$view->registerEngines(array(".phtml" => 'voltService'));
return $view;
});
$di['tag'] = function () {
return new AbTag();
};
$di->set('db', function () {
$config = ApplicationConfig::getMySQLConnection();