當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。