當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Filter::init方法代碼示例

本文整理匯總了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());
 }
開發者ID:romaninsh,項目名稱:atkSchool,代碼行數:10,代碼來源:QuickSearch.php

示例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());
 }
開發者ID:easyconn,項目名稱:atk4,代碼行數:22,代碼來源:QuickSearch.php

示例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');
 }
開發者ID:respond,項目名稱:atk4,代碼行數:17,代碼來源:QuickSearch.php

示例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('&nbsp;')->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('&nbsp;')->setIcon($this->submit_icon)->js('click', $this->js()->submit());
 }
開發者ID:TigerBui,項目名稱:atk4,代碼行數:24,代碼來源:QuickSearch.php

示例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();
開發者ID:healerkx,項目名稱:AdminBuildr,代碼行數:31,代碼來源:index.php


注:本文中的Filter::init方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。