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


PHP SearchForm::__construct方法代码示例

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


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

示例1: FieldSet

 /**
  * the constructor of a Simple/basic SearchForm
  */
 function __construct($controller, $name, $fields = null, $actions = null)
 {
     if (!$fields) {
         $fields = new FieldSet($searchBy = new CompositeField(new HeaderField(_t('ProductSearchForm.SEARCHBY', 'Search Products'), 2), new HeaderField(_t('ProductSearchForm.WHERE', 'Where?'), 3), new LocationTreeDropdown('Location', ''), $categoryFields = new CompositeField(new HeaderField(_t('ProductSearchForm.SEARCHCRITERIA', 'Search Criteria'), 3), new MyTypeDropdown("ProductCategory1", 'Category #1', 'ProductCategory', null, null, false, array('Any' => 'Any Category')), new LiteralField('or1', ' or '), new MyTypeDropdown("ProductCategory2", 'Category #2', 'ProductCategory', null, null, true, array('' => '')), new LiteralField('or2', ' or '), new MyTypeDropdown("ProductCategory3", 'Category #3', 'ProductCategory', null, null, true, array('' => ''))), new TextField("keywords", _t('ProductSearchForm.KEYWORDS', 'Keywords'))), $sortBy = new CompositeField(new HeaderField(_t('ProductSearchForm.SORTBY', 'Sort Results By'), 3), new OptionsetField("sortby", "", array('PageTitle' => _t('ProductSearchForm.NAME', 'Name'), 'Category' => _t('ProductSearchForm.CATEGORY', 'Category'), 'Location' => _t('ProductSearchForm.LOCATION', 'Location')), 'PageTitle')));
         $searchBy->ID = "ProductSearchForm_SearchBy";
         $sortBy->ID = "ProductSearchForm_SortBy";
         $categoryFields->ID = "ProductSearchForm_SearchBy_Category";
     }
     if (!$actions) {
         $actions = new FieldSet(new FormAction("results", _t('ProductSearchForm.SEARCH', 'Search')));
     }
     parent::__construct($controller, $name, $fields, $actions);
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-business-directory,代码行数:16,代码来源:ProductSearchForm.php

示例2: FieldSet

 /**
  * the constructor of a Simple/basic SearchForm
  */
 function __construct($controller, $name, $fields = null, $actions = null)
 {
     if (!$fields) {
         $fields = new FieldSet($searchBy = new CompositeField(new HeaderField('SearchByHeader', _t('AdvancedSearchForm.SEARCHBY', 'SEARCH BY')), new TextField("+", _t('AdvancedSearchForm.ALLWORDS', 'All Words')), new TextField("quote", _t('AdvancedSearchForm.EXACT', 'Exact Phrase')), new TextField("any", _t('AdvancedSearchForm.ATLEAST', 'At Least One Of the Words')), new TextField("-", _t('AdvancedSearchForm.WITHOUT', 'Without the Words'))), $sortBy = new CompositeField(new HeaderField('SortByHeader', _t('AdvancedSearchForm.SORTBY', 'SORT RESULTS BY')), new OptionsetField("sortby", "", array('Relevance' => _t('AdvancedSearchForm.RELEVANCE', 'Relevance'), 'LastUpdated' => _t('AdvancedSearchForm.LASTUPDATED', 'Last Updated'), 'PageTitle' => _t('AdvancedSearchForm.PAGETITLE', 'Page Title')), 'Relevance')), $chooseDate = new CompositeField(new HeaderField('LastUpdatedHeader', _t('AdvancedSearchForm.LASTUPDATEDHEADER', 'LAST UPDATED')), new DateField("From", _t('AdvancedSearchForm.FROM', 'From')), new DateField("To", _t('AdvancedSearchForm.TO', 'To'))));
         $searchBy->ID = "AdvancedSearchForm_SearchBy";
         $searchOnly->ID = "AdvancedSearchForm_SearchOnly";
         $sortBy->ID = "AdvancedSearchForm_SortBy";
         $chooseDate->ID = "AdvancedSearchForm_ChooseDate";
     }
     if (!$actions) {
         $actions = new FieldSet(new FormAction("results", _t('AdvancedSearchForm.GO', 'Go')));
     }
     parent::__construct($controller, $name, $fields, $actions);
 }
开发者ID:comperio,项目名称:silverstripe-framework,代码行数:17,代码来源:AdvancedSearchForm.php

示例3: FieldSet

 /**
  * the constructor of a Simple/basic SearchForm
  */
 function __construct($controller, $name, $fields = null, $actions = null)
 {
     // Need this before we call parent::_construct
     $this->controller = $controller;
     if (!$fields) {
         if ($this->controller->GeoLevelName() != 'No level' && $this->controller->getBusinessCount() != 0) {
             $searchBusinessHeading = 'Search Businesses in ' . $this->controller->Title;
         } else {
             $searchBusinessHeading = _t('BusinessSearchForm.SEARCHBUSINESSES', 'Search Our Network');
         }
         $fields = new FieldSet($searchBy = new CompositeField(new HeaderField($searchBusinessHeading, 2), new HeaderField(_t('BusinessSearchForm.BUSINESSDETAILS', 'Business Details'), 4), new NumericField("floid", _t('BusinessSearchForm.FLOID', 'FLO ID')), new TextField("keywords", _t('BusinessSearchForm.KEYWORDS', 'Name or keyword')), $this->getLocationFields(), $certFields = new CompositeField(new HeaderField(_t('BusinessSearchForm.SEARCHCRITERIA', 'Product Type / Function'), 4), new MyTypeDropdown("ProductCategory1", 'Product Type', 'ProductCategory', null, null, false, array('All' => 'All')), new MyTypeDropdown("CertificationType1", 'Function', 'CertificationType', null, null, false, array('All' => 'All')), new LiteralField('andOr1', '<span class="andOr" id="andOr1">or</span>'), new MyTypeDropdown("ProductCategory2", 'Product Type', 'ProductCategory', null, null, false, array('All' => 'All')), new MyTypeDropdown("CertificationType2", 'Function', 'CertificationType', null, null, false, array('All' => 'All')), new LiteralField('andOr2', '<span class="andOr" id="andOr2">or</span>'), new MyTypeDropdown("ProductCategory3", 'Product Type', 'ProductCategory', null, null, false, array('All' => 'All')), new MyTypeDropdown("CertificationType3", 'Function', 'CertificationType', null, null, false, array('All' => 'All')), new LiteralField('addCriteria', '<div id="addRemoveCriteria"><a href="#" id="addCriteria">Add criteria</a><span id="addRemovePipe"> | </span><a href="#" id="removeCriteria">Remove criteria</a></div>'), new OptionsetField('CertificationAndOr', '', array('AND' => 'Must match ALL of the selection below', 'OR' => 'Must match ANY of the selection below'), 'AND'))), $sortBy = new HiddenField('sortby', '', 'Location'));
         $searchBy->ID = "BusinessSearchForm_SearchBy";
         $sortBy->ID = "BusinessSearchForm_SortBy";
         $certFields->ID = "BusinessSearchForm_SearchBy_CertificationCriteria";
     }
     if (!$actions) {
         $actions = new FieldSet(new FormAction("results", _t('BusinessSearchForm.SEARCH', 'Search')));
     }
     parent::__construct($controller, $name, $fields, $actions);
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-business-directory,代码行数:23,代码来源:BusinessSearchForm.php

示例4: __construct

 public function __construct(Role $model)
 {
     parent::__construct($model);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:4,代码来源:RolesSearchForm.php

示例5: __construct

 public function __construct(ImageFileModel $model)
 {
     parent::__construct($model);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:4,代码来源:ImagesSearchForm.php

示例6: __construct

 public function __construct(Group $model)
 {
     parent::__construct($model);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:4,代码来源:GroupsSearchForm.php

示例7: array

 /**
  * This builds an EmployeesSearchForm from a classic search form.
  */
 function __construct(SearchForm $oldSearchForm)
 {
     parent::__construct($oldSearchForm->seed, $oldSearchForm->module, $oldSearchForm->action);
     $this->setup(array($oldSearchForm->module => $oldSearchForm->searchdefs), array($oldSearchForm->module => $oldSearchForm->searchFields), $oldSearchForm->tpl, $oldSearchForm->displayView, $oldSearchForm->listViewDefs);
     $this->lv = $oldSearchForm->lv;
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:9,代码来源:EmployeesSearchForm.php

示例8: array

 function __construct($seed, $module, $subPanel, $options = array())
 {
     $this->subPanel = $subPanel;
     parent::__construct($seed, $module, 'DetailView', $options);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:5,代码来源:SubPanelSearchForm.php


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