当前位置: 首页>>代码示例>>PHP>>正文


PHP Engine_Form::init方法代码示例

本文整理汇总了PHP中Engine_Form::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Engine_Form::init方法的具体用法?PHP Engine_Form::init怎么用?PHP Engine_Form::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Engine_Form的用法示例。


在下文中一共展示了Engine_Form::init方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Music:'));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
 }
开发者ID:robeendey,项目名称:ce,代码行数:7,代码来源:Search.php

示例2: init

 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setMethod('GET')->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array('page' => null)));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Polls:'));
     $this->addElement('Select', 'show', array('label' => 'Show', 'multiOptions' => array('1' => 'Everyone\'s Polls', '2' => 'Only My Friends\' Polls'), 'onchange' => 'searchPolls();'));
     $this->addElement('Select', 'closed', array('label' => 'Status', 'onchange' => 'searchPolls();', 'multiOptions' => array('' => 'All Polls', '0' => 'Only Open Polls', '1' => 'Only Closed Polls')));
     $this->addElement('Select', 'order', array('label' => 'Browse By:', 'onchange' => 'searchPolls();', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
 }
开发者ID:robeendey,项目名称:ce,代码行数:9,代码来源:Search.php

示例3: init

 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()))->setMethod('GET');
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Music:'));
     $this->addElement('Select', 'show', array('label' => 'Show', 'multiOptions' => array('1' => 'Everyone\'s Playlists', '2' => 'Only My Friends\' Playlists')));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
     $this->addElement('Hidden', 'user');
     $this->addElement('Hidden', 'page', array('order' => 100));
     $this->addElement('Button', 'search_bt', array('label' => 'Search', 'type' => 'submit', 'order' => 101));
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:11,代码来源:MusicSearch.php

示例4: init

 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Albums:'));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
     // prepare categories
     $categories = Engine_Api::_()->getDbtable('categories', 'album')->getCategoriesAssoc();
     if (count($categories) > 0) {
         $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories));
     }
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:12,代码来源:Search.php

示例5: init

 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Albums:'));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
     // prepare categories
     $categories = Engine_Api::_()->getDbtable('categories', 'album')->getCategoriesAssoc();
     if (count($categories) > 0) {
         $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories));
     }
     $this->addElement('Button', 'submit_btn', array('label' => 'Search', 'type' => 'submit', 'ignore' => true));
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:13,代码来源:AlbumSearch.php

示例6: init

 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Albums:'));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
     // prepare categories
     $categories = Engine_Api::_()->album()->getCategories();
     if (count($categories) != 0) {
         $categories_prepared[0] = "";
         foreach ($categories as $category) {
             $categories_prepared[$category->category_id] = $category->category_name;
         }
         // category field
         $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories_prepared));
     }
 }
开发者ID:robeendey,项目名称:ce,代码行数:17,代码来源:Search.php

示例7: init

 public function init()
 {
     $this->setAttribs(array('id' => 'login_contactimporter_form', 'class' => 'global_form'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));
     parent::init();
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $type = $request->getParam('type');
     $provider = $request->getParam('provider');
     $label = "Email";
     if ($type == 'user') {
         $label = "Username";
     }
     $this->addElement('Text', 'email', array('label' => $label, 'required' => true));
     $this->addElement('Password', 'password', array('label' => 'Password', 'required' => true));
     $this->addElement('Hidden', 'provider', array('value' => $provider));
     $this->addElement('Button', 'submit', array('label' => 'Import Contacts', 'type' => 'submit', 'link' => true, 'ignore' => true, 'decorators' => array('ViewHelper')));
     $this->addElement('Button', 'cancel', array('label' => 'Cancel', 'link' => true, 'href' => '', 'onclick' => 'parent.Smoothbox.close();', 'decorators' => array('ViewHelper')));
     // DisplayGroup: buttons
     $this->addDisplayGroup(array('submit', 'cancel'), 'buttons', array('decorators' => array('FormElements', 'DivDivDivWrapper')));
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:19,代码来源:Login.php


注:本文中的Engine_Form::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。