/** *@return TreeMultiselectField **/ protected function getIncludedProductsFormField() { $field = new TreeMultiselectField($name = "IncludedProducts", $title = "Included Products", $sourceObject = "SiteTree", $keyField = "ID", $labelField = "MenuTitle"); $filter = create_function('$obj', 'return ( ( $obj InstanceOf Product || $obj InstanceOf ProductGroup) && ($obj->ID != ' . $this->ID . '));'); $field->setFilterFunction($filter); return $field; }
function updateCMSFields(FieldList $fields) { $this->SetDefaultExlcuded(); $ExludedPagesField = new TreeMultiselectField("AllInOneExludedPages", "Exluded Pages", "SiteTree"); $ExludedPagesField->setDescription("Add any pages here you want to exclude from the allinone page view"); $fields->addFieldToTab('Root.AllInOne', $ExludedPagesField); return $fields; }
/** * Implement permissions for TwoStep * * @return void */ public function updateCMSFields(&$fields) { $fields->addFieldsToTab("Root.Access", array(new HeaderField(_t('SiteTreeCMSWorkflow.PUBLISHHEADER', "Who can publish this inside the CMS?"), 2), $publishTypeField = new OptionsetField("CanPublishType", "", array("Inherit" => _t('SiteTree.EDITINHERIT', "Inherit from parent page"), "LoggedInUsers" => _t('SiteTree.EDITANYONE', "Anyone who can log-in to the CMS"), "OnlyTheseUsers" => _t('SiteTree.EDITONLYTHESE', "Only these people (choose from list)")), "Inherit"), $publisherGroupsField = new TreeMultiselectField("PublisherGroups", $this->owner->fieldLabel('PublisherGroups')))); if (!$this->owner->canPublish() || !Permission::check('SITETREE_GRANT_ACCESS')) { $fields->replaceField('CanPublishType', $publishTypeField->performReadonlyTransformation()); $fields->replaceField('PublisherGroups', $publisherGroupsField->performReadonlyTransformation()); } }
/** * Update SiteConfig with the top level fields * * @param FieldSet $fields * @return void */ function updateCMSFields(&$fields) { $fields->addFieldsToTab("Root.Access", array(new HeaderField(_t('SiteConfigCMSWorkflow.PUBLISHAPPROVEDHEADER', "Who can publish requests inside the CMS?"), 2), $actionTypeField = new OptionsetField("CanPublishType", "", array("LoggedInUsers" => _t('SiteTree.EDITANYONE', "Anyone who can log-in to the CMS"), "OnlyTheseUsers" => _t('SiteTree.EDITONLYTHESE', "Only these people (choose from list)")), "OnlyTheseUsers"), $actionerGroupsField = new TreeMultiselectField("PublisherGroups", "Publisher groups"))); if (!Permission::check('ADMIN')) { $fields->replaceField('CanPublishType', $actionTypeField->performReadonlyTransformation()); $fields->replaceField('PublisherGroups', $actionerGroupsField->performReadonlyTransformation()); } }
/** * */ public function getCMSFields() { $fields = parent::getCMSFields(); // categories $treedropdown = new TreeMultiselectField('Categories', 'Categories to show and search for', 'TaxonomyTerm'); $treedropdown->setDescription('Displays FAQs with selected categories filtered. ' . 'Don\'t select any if you want to show all FAQs regardless of categories'); $treedropdown->setTreeBaseID(FAQ::getRootCategory()->ID); $fields->addFieldToTab('Root.Main', $treedropdown, 'Content'); $settings = new Tab('Settings', 'FAQ Settings'); $fields->insertBefore($settings, 'PublishingSchedule'); $fields->addFieldsToTab('Root.Settings', array(TextField::create('SinglePageLimit')->setDescription(' If set higher than 0, limits results to that many and removes pagination. '), TextField::create('CategoriesSelectAllText')->setDescription('Text to appear in on the "empty" first option in the categories selector'), TextField::create('SearchFieldPlaceholder')->setDescription('Text to appear in the search field before the user enters their question'), TextField::create('SearchFieldPlaceholder')->setDescription('Text to appear in the search field before the user enters their question'), TextField::create('SearchButtonText')->setDescription('Text for the search button'), TextField::create('SearchResultsTitle')->setDescription('Title for the FAQ search results'), TextareaField::create('NoResultsMessage')->setDescription('Text to appear when no search results are found'), TextareaField::create('SearchNotAvailable')->setDescription('Text to appear when search functionality is not available'), TextField::create('MoreLinkText')->setDescription('Text for the "Read more" link below each search result'), TextareaField::create('SearchResultsSummary')->setDescription(' Search summary string. Replacement keys: <ul> <li> <strong>%CurrentPage%</strong>: Current page number </li> <li> <strong>%TotalPages%</strong>: Total page count </li> <li> <strong>%Query%</strong>: Current search query </li> </ul> '))); // Featured FAQs tab $FeaturedFAQsTab = new Tab('FeaturedFAQs', _t('FAQPage.FeaturedFAQs', 'Featured FAQs')); $fields->insertBefore($FeaturedFAQsTab, 'PublishingSchedule'); $components = GridFieldConfig_RelationEditor::create(); $components->removeComponentsByType('GridFieldAddNewButton'); $components->removeComponentsByType('GridFieldEditButton'); $components->removeComponentsByType('GridFieldFilterHeader'); $components->addComponent(new GridFieldSortableRows('SortOrder')); $dataColumns = $components->getComponentByType('GridFieldDataColumns'); $dataColumns->setDisplayFields(array('Title' => _t('FAQPage.ColumnQuestion', 'Ref.'), 'Question' => _t('FAQPage.ColumnQuestion', 'Question'), 'Answer.Summary' => _t('FAQPage.ColumnPageType', 'Answer'), 'Category.Name' => _t('FAQPage.ColumnPageType', 'Category'))); $components->getComponentByType('GridFieldAddExistingAutocompleter')->setResultsFormat('$Question'); // warning for categories filtering on featured FAQs $differentCategories = 0; if ($this->Categories()->count() > 0) { $FAQsWithCategories = $this->FeaturedFAQs()->filter('CategoryID', $this->Categories()->column('ID'))->count(); $totalFeaturedFAQs = $this->FeaturedFAQs()->count(); $differentCategories = $totalFeaturedFAQs - $FAQsWithCategories; } $FeaturedFAQsCategoryNotice = '<p class="message %s">Only featured FAQs with selected categories will ' . 'be displayed on the site. If you have not selected a category, all of the ' . 'featured FAQs will be displayed.</p>'; if ($differentCategories) { $FeaturedFAQsCategoryNotice = sprintf('<p class="message %s">You have %d FAQs with different categories than the ones you have selected ' . 'to show on this FAQPage. These will not be displayed.</p>', $differentCategories ? 'bad' : '', $differentCategories); } $fields->addFieldsToTab('Root.FeaturedFAQs', array(LiteralField::create('FeaturedFAQsCategoryNotice', $FeaturedFAQsCategoryNotice), GridField::create('FeaturedFAQs', _t('FAQPage.FeaturedFAQs', 'Featured FAQs'), $this->FeaturedFAQs(), $components))); return $fields; }
public function getSettingsFields() { $fields = parent::getSettingsFields(); $fields->addFieldToTab('Root', new Tab('Profile'), 'Settings'); $fields->addFieldsToTab('Root.Profile', array(new CheckboxField('AllowRegistration', _t('MemberProfiles.ALLOWREG', 'Allow registration via this page')), new CheckboxField('AllowProfileEditing', _t('MemberProfiles.ALLOWEDITING', 'Allow users to edit their own profile on this page')), new CheckboxField('AllowAdding', _t('MemberProfiles.ALLOWADD', 'Allow adding members via this page')), new CheckboxField('AllowProfileViewing', _t('MemberProfiles.ALLOWPROFILEVIEWING', 'Enable public profiles?')), new CheckboxField('RequireApproval', _t('MemberProfiles.REQUIREREGAPPROVAL', 'Require registration approval by an administrator?')), $approval = new TreeMultiselectField('ApprovalGroups', _t('MemberProfiles.APPROVALGROUPS', 'Approval Groups'), 'Group'), new CheckboxField('RegistrationRedirect', _t('MemberProfiles.REDIRECTAFTERREG', 'Redirect after registration?')), new TreeDropdownField('PostRegistrationTargetID', _t('MemberProfiles.REDIRECTTOPAGE', 'Redirect To Page'), 'SiteTree'))); $approval->setDescription(_t('MemberProfiles.NOTIFYTHESEGROUPS', 'These groups will be notified to approve new registrations')); return $fields; }
function parameterFields() { $subsites = Subsite::accessible_sites('CMS_ACCESS_CMSMain'); $options = $subsites->toDropdownMap('ID', 'Title'); $subsiteField = new TreeMultiselectField('Subsites', 'Sites', $options); $subsiteField->setValue(array_keys($options)); // We don't need to make the field editable if only one subsite is available if (sizeof($options) <= 1) { $subsiteField = $subsiteField->performReadonlyTransformation(); } $fields = parent::parameterFields(); if ($fields) { $fields->insertBefore($subsiteField, $fields->First()->Name()); } else { $fields = new FieldSet($subsiteField); } return $fields; }
function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab("Root.CheckboxSet", new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map())); $fields->addFieldsToTab('Root.Tree', array(TreeDropdownField::create('HasOnePage', 'HasOnePage', 'SiteTree'), TreeMultiselectField::create('HasManyPages', 'HasManyPages', 'SiteTree'), TreeMultiselectField::create('ManyManyPages', 'ManyManyPages (with search)', 'SiteTree')->setShowSearch(true))); // $fields->addFieldToTab("Root.Tests.ComplexTableField", // new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map())); // $fields->addFieldToTab("Root.Tests.CheckboxSet", new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map())); return $fields; }
public function getCMSFields() { $fields = parent::getCMSFields(); $fields->removeByName('SiteConfigID'); if ($targetField = $fields->dataFieldByName('Target')) { $targetField->setRightTitle('ID or CSS class to find the dom element'); } $fields->removeByName('Pages'); $fields->addFieldToTab('Root.Main', TreeMultiselectField::create('Pages', 'Select Pages (leave empty for all the pages)')->setSourceObject('SiteTree')); return $fields; }
/** * Build the CMS fields for editing * @return FieldList **/ public function getCMSFields() { $fields = parent::getCMSFields(); $fields->removeByName('Pages'); // required information $fields->addFieldToTab('Root.Main', HiddenField::create('ModuleID', 'ModuleID', $this->ID)); $fields->addFieldToTab('Root.Main', LiteralField::create('html', '<h3 style="margin-bottom: 5px;">' . $this->Type() . '</h3>')); $fields->addFieldToTab('Root.Main', LiteralField::create('html', '<p><em>' . $this->getDescription() . '</em></p><br />')); $fields->addFieldToTab('Root.Main', TextField::create('Title', 'Title')); $fields->addFieldToTab('Root.Main', DropdownField::create('Position', 'Position', ModuleManager::get_positions_dropdown())->setEmptyString('Please select')); $fields->addFieldToTab("Root.Main", TreeMultiselectField::create("Pages", "Shown on pages", "SiteTree")); $fields->addFieldToTab('Root.Main', HTMLEditorField::create('Content', 'Content')); return $fields; }
function getCMSFields() { $fields = parent::getCMSFields(); $allFields = array(); $checkboxFields = array(new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map())); $fields->addFieldsToTab("Root.CheckboxSet", $checkboxFields); $allFields += $checkboxFields; $treeFields = array(TreeDropdownField::create('HasOnePageID', 'HasOnePage', 'SiteTree'), TreeDropdownField::create('HasOnePageWithSearchID', 'HasOnePageWithSearch', 'SiteTree')->setShowSearch(true), TreeMultiselectField::create('HasManyPages', 'HasManyPages', 'SiteTree'), TreeMultiselectField::create('ManyManyPages', 'ManyManyPages (with search)', 'SiteTree')->setShowSearch(true)); $fields->addFieldsToTab('Root.Tree', $treeFields); $allFields += $treeFields; foreach ($allFields as $field) { $field->setDescription('This is <strong>bold</strong> help text')->addExtraClass('cms-help'); // ->addExtraClass('cms-help cms-help-tooltip'); } return $fields; }
public function getCMSFields() { $fields = parent::getCMSFields(); $fields->removeFieldFromTab('Root', 'PageParents'); $fields->addFieldToTab('Root.Main', HeaderField::create('SettingsHeading', _t('BlockSet.Settings', 'Settings')), 'Title'); $fields->addFieldToTab('Root.Main', MultiValueCheckboxField::create('PageTypes', _t('BlockSet.OnlyApplyToThesePageTypes', 'Only apply to these Page Types:'), $this->pageTypeOptions())->setDescription(_t('BlockSet.OnlyApplyToThesePageTypesDescription', 'Selected Page Types will inherit this Block Set automatically. Leave all unchecked to apply to all page types.'))); $fields->addFieldToTab('Root.Main', TreeMultiselectField::create('PageParents', _t('BlockSet.OnlyApplyToChildrenOfThesePages', 'Only apply to children of these Pages:'), 'SiteTree')); $fields->addFieldToTab('Root.Main', CheckboxField::create('IncludePageParent', _t('BlockSet.ApplyBlockSetToSelectedPageParentsAsWellAsChildren', 'Apply block set to selected page parents as well as children'))); if (!$this->ID) { $fields->addFieldToTab('Root.Main', LiteralField::create('NotSaved', "<p class='message warning'>" . _t('BlockSet.YouCanAddBlocksToThisSetOnceYouHaveSavedIt', 'You can add Blocks to this set once you have saved it for the first time') . '</p>')); return $fields; } $fields->removeFieldFromTab('Root', 'Blocks'); $gridConfig = GridFieldConfig_BlockManager::create(true, true, true, true, true)->addExisting()->addComponent(new GridFieldOrderableRows()); $gridSource = $this->Blocks()->Sort('Sort'); $fields->addFieldToTab('Root.Main', HeaderField::create('BlocksHeading', _t('Block.PLURALNAME', 'Blocks'))); $fields->addFieldToTab('Root.Main', GridField::create('Blocks', _t('Block.PLURALNAME', 'Blocks'), $gridSource, $gridConfig)); return $fields; }
/** * Used in getCSMFields * @return TreeMultiselectField **/ protected function getProductGroupsTable() { $field = new TreeMultiselectField($name = "AlsoShowProducts", $title = _t("ProductGroup.OTHERPRODUCTSSHOWINTHISGROUP", "Other products shown in this group ..."), $sourceObject = "SiteTree", $keyField = "ID", $labelField = "MenuTitle"); $filter = create_function('$obj', 'return ( ( $obj InstanceOf ProductGroup || $obj InstanceOf Product) && ($obj->ParentID != ' . $this->ID . '));'); $field->setFilterFunction($filter); return $field; }
/** * Adds the fields for the MirrorProductGroups tab * * @param FieldList $fields FieldList to add fields to * * @return void */ public function getFieldsForProductGroups($fields) { $productGroupHolder = SilvercartTools::PageByIdentifierCode('SilvercartProductGroupHolder'); $silvercartProductGroupDropdown = new TreeDropdownField('SilvercartProductGroupID', $this->fieldLabel('SilvercartProductGroup'), 'SiteTree'); if ($productGroupHolder) { $productGroupHolderID = $productGroupHolder->ID; } else { $productGroupHolderID = 0; } $silvercartProductGroupDropdown->setTreeBaseID($productGroupHolderID); if ($this->exists()) { $silvercartProductGroupMirrorPagesField = new TreeMultiselectField('SilvercartProductGroupMirrorPages', $this->fieldLabel('SilvercartProductGroupMirrorPages'), 'SiteTree'); $silvercartProductGroupMirrorPagesField->setTreeBaseID($productGroupHolderID); $fields->removeByName('SilvercartProductGroupMirrorPages'); $fields->insertBefore($silvercartProductGroupDropdown, 'ProductNumberGroup'); $fields->insertAfter($silvercartProductGroupMirrorPagesField, 'SilvercartProductGroupID'); } else { $fields->insertBefore($silvercartProductGroupDropdown, 'ProductNumberGroup'); } }
/** * Display the search engine specific configuration, and the search page specific analytics and suggestions. */ public function getCMSFields() { $fields = parent::getCMSFields(); Requirements::css(EXTENSIBLE_SEARCH_PATH . '/css/extensible-search.css'); // Determine the search engine extensions that are available. $engines = array(); foreach (self::config()->search_engine_extensions as $extension => $display) { // The search engine extensions may define an optional display title. if (is_numeric($extension)) { $extension = $display; } // Determine whether the search engine extensions have been applied correctly. if (ClassInfo::exists($extension) && ClassInfo::exists("{$extension}_Controller") && $this->hasExtension($extension) && ModelAsController::controller_for($this)->hasExtension("{$extension}_Controller")) { $engines[$extension] = $display; } } // Determine whether the full-text search engine is available. $configuration = Config::inst(); $classes = $configuration->get('FulltextSearchable', 'searchable_classes'); if (is_array($classes) && count($classes) > 0) { $engines['Full-Text'] = 'Full-Text'; } // Display the search engine selection. $fields->addFieldToTab('Root.Main', DropdownField::create('SearchEngine', 'Search Engine', $engines)->setHasEmptyDefault(true)->setRightTitle('This needs to be saved before further customisation is available'), 'Title'); // Determine whether a search engine has been selected. if ($this->SearchEngine && isset($engines[$this->SearchEngine])) { // Display a search engine specific notice. $fields->addFieldToTab('Root.Main', LiteralField::create('SearchEngineNotice', "<p class='extensible-search notice'><strong>{$engines[$this->SearchEngine]} Search Page</strong></p>"), 'Title'); // Determine whether the search engine supports hierarchy filtering. $hierarchy = self::$supports_hierarchy; if ($this->SearchEngine !== 'Full-Text') { foreach ($this->extension_instances as $instance) { if (get_class($instance) === $this->SearchEngine) { $instance->setOwner($this); if (isset($instance::$supports_hierarchy)) { $hierarchy = $instance::$supports_hierarchy; } $instance->clearOwner(); break; } } } // The search engine may only support limited hierarchy filtering for multiple sites. if ($hierarchy || ClassInfo::exists('Multisites')) { // Display the search trees selection. $fields->addFieldToTab('Root.Main', $tree = TreeMultiselectField::create('SearchTrees', 'Search Trees', 'SiteTree'), 'Content'); // Determine whether the search engine only supports limited hierarchy filtering. if (!$hierarchy) { // Update the search trees to reflect this. $tree->setDisableFunction(function ($page) { return $page->ParentID != 0; }); $tree->setRightTitle('This <strong>search engine</strong> only supports limited hierarchy'); } } // Display the sorting selection. $fields->addFieldToTab('Root.Main', DropdownField::create('SortBy', 'Sort By', $this->getSelectableFields()), 'Content'); $fields->addFieldToTab('Root.Main', DropdownField::create('SortDirection', 'Sort Direction', array('DESC' => 'Descending', 'ASC' => 'Ascending')), 'Content'); // Display the start with listing selection. $fields->addFieldToTab('Root.Main', CheckboxField::create('StartWithListing', 'Start With Listing?')->addExtraClass('start-with-listing'), 'Content'); // Display the results per page selection. $fields->addFieldToTab('Root.Main', NumericField::create('ResultsPerPage'), 'Content'); } else { // The search engine has not been selected. $fields->addFieldToTab('Root.Main', LiteralField::create('SearchEngineNotification', "<p class='extensible-search notification'><strong>Select a Search Engine</strong></p>"), 'Title'); } // Determine whether analytics have been enabled. if ($configuration->get('ExtensibleSearch', 'enable_analytics')) { // Determine the search page specific analytics. $history = $this->History(); $query = new SQLSelect("Term, COUNT(*) AS Frequency, ((COUNT(*) * 100.00) / {$history->count()}) AS FrequencyPercentage, AVG(Time) AS AverageTimeTaken, (Results > 0) AS Results", 'ExtensibleSearch', "ExtensibleSearchPageID = {$this->ID}", array('Frequency' => 'DESC', 'Term' => 'ASC'), 'Term'); // These will require display formatting. $analytics = ArrayList::create(); foreach ($query->execute() as $result) { $result = ArrayData::create($result); $result->FrequencyPercentage = sprintf('%.2f %%', $result->FrequencyPercentage); $result->AverageTimeTaken = sprintf('%.5f', $result->AverageTimeTaken); $result->Results = $result->Results ? 'true' : 'false'; $analytics->push($result); } // Instantiate the analytic summary. $fields->addFieldToTab('Root.SearchAnalytics', $summary = GridField::create('Summary', 'Summary', $analytics)->setModelClass('ExtensibleSearch')); $summaryConfiguration = $summary->getConfig(); // Update the display columns. $summaryDisplay = array('Term' => 'Search Term', 'Frequency' => 'Frequency', 'FrequencyPercentage' => 'Frequency %', 'AverageTimeTaken' => 'Average Time Taken (s)', 'Results' => 'Has Results?'); $summaryConfiguration->getComponentByType('GridFieldDataColumns')->setDisplayFields($summaryDisplay); // Instantiate an export button. $summaryConfiguration->addComponent($summaryExport = new GridFieldExportButton()); $summaryExport->setExportColumns($summaryDisplay); // Update the custom summary fields to be sortable. $summaryConfiguration->getComponentByType('GridFieldSortableHeader')->setFieldSorting(array('FrequencyPercentage' => 'Frequency')); $summaryConfiguration->removeComponentsByType('GridFieldFilterHeader'); // Instantiate the analytic history. $fields->addFieldToTab('Root.SearchAnalytics', $history = GridField::create('History', 'History', $history)->setModelClass('ExtensibleSearch')); $historyConfiguration = $history->getConfig(); // Instantiate an export button. $historyConfiguration->addComponent(new GridFieldExportButton()); // Update the custom summary fields to be sortable. $historyConfiguration->getComponentByType('GridFieldSortableHeader')->setFieldSorting(array('TimeSummary' => 'Created', 'TimeTakenSummary' => 'Time', 'SearchEngineSummary' => 'SearchEngine')); $historyConfiguration->removeComponentsByType('GridFieldFilterHeader'); } // Determine whether suggestions have been enabled. if ($configuration->get('ExtensibleSearchSuggestion', 'enable_suggestions')) { // Appropriately restrict the approval functionality. $user = Member::currentUserID(); if (Permission::checkMember($user, 'EXTENSIBLE_SEARCH_SUGGESTIONS')) { Requirements::javascript(EXTENSIBLE_SEARCH_PATH . '/javascript/extensible-search-approval.js'); } // Determine the search page specific suggestions. $fields->addFieldToTab('Root.SearchSuggestions', GridField::create('Suggestions', 'Suggestions', $this->Suggestions(), $suggestionsConfiguration = GridFieldConfig_RecordEditor::create())->setModelClass('ExtensibleSearchSuggestion')); // Update the custom summary fields to be sortable. $suggestionsConfiguration->getComponentByType('GridFieldSortableHeader')->setFieldSorting(array('FrequencySummary' => 'Frequency', 'FrequencyPercentage' => 'Frequency', 'ApprovedField' => 'Approved')); $suggestionsConfiguration->removeComponentsByType('GridFieldFilterHeader'); } // Allow extension customisation. $this->extend('updateExtensibleSearchPageCMSFields', $fields); return $fields; }
/** * Used in getCSMFields * @return TreeMultiselectField **/ protected function getProductGroupsTable() { $field = new TreeMultiselectField($name = "ProductGroups", $title = _t("Product.THISPRODUCTSHOULDALSOBELISTEDUNDER", "This product is also listed under ..."), $sourceObject = "SiteTree", $keyField = "ID", $labelField = "MenuTitle"); if ($this->ParentID) { $filter = create_function('$obj', 'return ( ( $obj InstanceOf ProductGroup) && ($obj->ID != ' . $this->ParentID . '));'); $field->setFilterFunction($filter); } return $field; }
public function getFormFields($buyable) { return \CompositeField::create(\LiteralField::create('Recommended_FindBy-OtherCategory-Message', '<p class="message field desc selectionGroup-desc">' . _t('Product.Recommended_FindBy-OtherCategory-Message', 'Recommended products will be pulled from the selected categories') . '</p>'), \TreeMultiselectField::create('Recommended_Categories', _t('Product.Categories', 'Categories'), 'ProductCategory', 'ID', 'MenuTitle')); }
/** * Set dummy callback so that filterMarking() is triggered. * * @param String $name * @param String $title * @param String $sourceObject * @param String $keyField * @param String $labelField */ function __construct($name, $title, $sourceObject = "Group", $keyField = "ID", $labelField = "Title") { parent::__construct($name, $title, $sourceObject, $keyField, $labelField); $this->value = 'unchanged'; $this->filterCallback = 'dummyTrigger'; }