本文整理汇总了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);
}
示例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);
}
示例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);
}
示例4: __construct
public function __construct(Role $model)
{
parent::__construct($model);
}
示例5: __construct
public function __construct(ImageFileModel $model)
{
parent::__construct($model);
}
示例6: __construct
public function __construct(Group $model)
{
parent::__construct($model);
}
示例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;
}
示例8: array
function __construct($seed, $module, $subPanel, $options = array())
{
$this->subPanel = $subPanel;
parent::__construct($seed, $module, 'DetailView', $options);
}