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


PHP TabSet::create方法代码示例

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


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

示例1: getCMSFields

 /**
  * getCMSFields
  * Construct the FieldList used in the CMS. To provide a
  * smarter UI we don't use the scaffolding provided by
  * parent::getCMSFields.
  * 
  * @return FieldList
  */
 public function getCMSFields()
 {
     Requirements::css('torindul-silverstripe-shop/css/LeftAndMain.css');
     //Create the FieldList and push the Root TabSet on to it.
     $fields = FieldList::create($root = TabSet::create('Root', Tab::create("Main", HeaderField::create("Add/Edit Order Status"), CompositeField::create(TextField::create("Title", "Friendly Name")->setRightTitle("The name of your custom order status. i.e. Pending, Awaiting Stock."), TextareaField::create("Content", "Friendly Description")->setRightTitle("This will be shown to your customers. What do you wish to tell them about this status?")))));
     return $fields;
 }
开发者ID:micschk,项目名称:torindul-silverstripe-shop,代码行数:15,代码来源:Order_Statuses.php

示例2: getCMSFields

 /**
  * @return FieldList
  */
 public function getCMSFields()
 {
     /** =========================================
          * @var FieldList $fields
          * @var FieldGroup $settings
          * @var UploadField $image
          * @var GridFieldConfig_RelationEditor $config
          * @var GridField $gridField
         ===========================================*/
     $fields = FieldList::create(TabSet::create('Root'));
     $fields->addfieldToTab('Root.Main', $title = TextField::create('Title'));
     $title->setRightTitle('Title used in the cms as a visual cue for this piece of content.');
     $fields->addFieldToTab('Root.Main', $settings = FieldGroup::create(array(CheckboxField::create('IsFullWidth', 'Container full width'))));
     $settings->setTitle('Settings');
     $fields->addFieldToTab('Root.Main', HeaderField::create('', 'Style'));
     $fields->addFieldToTab('Root.Main', DesignField::create('Style', 'Container', '.container', array('padding-top' => 'TextField', 'padding-bottom' => 'TextField', 'margin-top' => 'TextField', 'margin-bottom' => 'TextField', 'color' => 'ColorField', 'background' => 'ColorField')));
     $fields->addFieldToTab('Root.Main', HeaderField::create('', 'Background (optional)', 4));
     $fields->addFieldToTab('Root.Main', $image = UploadField::create('Image', _t('PageBuilderContainer.IMAGE', 'Image')));
     $image->setAllowedExtensions(array('jpeg', 'jpg', 'gif', 'png'));
     $image->setFolderName('Uploads/site-builder/containers');
     $fields->addFieldToTab('Root.Main', DropdownField::create('BackgroundType', 'Type', $this->dbObject('BackgroundType')->enumValues()));
     $config = GridFieldConfig_RelationEditor::create(10);
     $config->addComponent(GridFieldOrderableRows::create('SortOrder'))->addComponent(new GridFieldDeleteAction());
     $gridField = GridField::create('Items', 'Items', $this->Items(), $config);
     $gridField->addExtraClass('hide');
     $fields->addFieldToTab('Root.Main', $gridField);
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:toastnz-silverstripe-site-builder,代码行数:31,代码来源:PageBuilderContainer.php

示例3: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     $fields->addFieldToTab('Root', Tab::create("GoogleAnalytics", _t('GoogleAnalyzer.TABTITLE', "Google Analytics")));
     $fields->addFieldToTab("Root.GoogleAnalytics", TabSet::create("Stats", _t('GoogleAnalyzer.STATS', "Stats")));
     $fields->addFieldToTab('Root.GoogleAnalytics.Stats', Tab::create("Performance", _t('GoogleAnalyzer.PERFORMANCE', "Performance")));
     $fields->addFieldToTab("Root.GoogleAnalytics.Stats.Performance", new GooglePerformanceChart($this->owner));
 }
开发者ID:helpfulrobot,项目名称:jelicanin-silverstripe-googleanalytics,代码行数:7,代码来源:GoogleAnalyzer.php

示例4: getCMSFields

 public function getCMSFields()
 {
     $fields = FieldList::create(TabSet::create('Root'));
     $fields->addFieldsToTab('Root.Main', array(TextField::create('Title'), HTMLEditorField::create('Description'), $upload = UploadField::create('DownloadFile', 'Download File')));
     $upload->setFolderName('downloads');
     return $fields;
 }
开发者ID:tcaiger,项目名称:mSupplyNZ,代码行数:7,代码来源:Download.php

示例5: getCMSFields

 /**
  * getCMSFields
  * Construct the FieldList used in the CMS. To provide a
  * smarter UI we don't use the scaffolding provided by
  * parent::getCMSFields.
  * 
  * @return FieldList
  */
 public function getCMSFields()
 {
     Requirements::css('torindul-silverstripe-shop/css/LeftAndMain.css');
     //Create the FieldList and push the Root TabSet on to it.
     $fields = FieldList::create($root = TabSet::create('Root', Tab::create("Main", HeaderField::create("Add/Edit Tax Zone"), CompositeField::create(DropdownField::create("Enabled", "Enable this zone?", array("1" => "Yes", "2" => "No"))->setRightTitle($this->SystemCreated == 1 && $this->exists() ? "DISABLED: You can not disable the default tax zone." : "If enabled your store will use the rates defined in this zone for customers in the selected country.")->setDisabled($this->SystemCreated == 1 && $this->exists() ? true : false), !$this->exists() ? CountryDropdownField::create("Title", "Country")->setRightTitle($this->SystemCreated == 1 && $this->exists() ? "DISABLED: You can not select a country as this zone applies to all countries." : "Select the country this zone applies to.")->setDisabled($this->SystemCreated == 1 && $this->exists() ? true : false) : "", $this->exists() ? GridField::create("TaxZones_TaxRates", "Tax Rates within the '" . $this->Title . "' Tax Zone", $this->TaxRates(), GridFieldConfig_RecordEditor::create()) : ""))));
     return $fields;
 }
开发者ID:micschk,项目名称:torindul-silverstripe-shop,代码行数:15,代码来源:TaxZones.php

示例6: getCMSFields

 public function getCMSFields()
 {
     if ($this->ID == 0) {
         $categorydropdown = TextField::create('CategoryDisclaimer')->setTitle('Category')->setDisabled(true)->setValue('You can assign a category once you have saved the record for the first time.');
     } else {
         $categories = ListCategory::get()->filter("ListPageID", "{$this->ListPageID}")->sort("Category ASC");
         $map = $categories ? $categories->map('ID', 'Category', 'Please Select') : array();
         if ($map) {
             $categorydropdown = new DropdownField('ListCategoryID', 'Category', $map);
             $categorydropdown->setEmptyString("-- Please Select --");
         } else {
             $categorydropdown = new DropdownField('ListCategoryID', 'Category', $map);
             $categorydropdown->setEmptyString("There are no categories created yet");
         }
     }
     $ImageField = UploadField::create('Photo')->setDescription('(Allowed filetypes: jpg, jpeg, png, gif)');
     $ImageField->folderName = 'ListPage';
     $ImageField->getValidator()->allowedExtensions = array('jpg', 'jpeg', 'gif', 'png');
     $DocumentField = UploadField::create('Resource')->setTitle('Resource/Document')->setDescription('(Allowed filetypes: pdf, doc, docx, txt, ppt, or pptx)');
     $DocumentField->folderName = "ListPage";
     $DocumentField->getValidator()->allowedExtensions = array('pdf', 'doc', 'docx', 'txt', 'ppt', 'pptx');
     $LinkField = TextField::create('Link')->setTitle('Link URL');
     $fields = FieldList::create(TabSet::create('Root'));
     $fields->addFieldsToTab('Root.Main', array($categorydropdown, TextField::create('Title'), OptionSetField::create('LinkType')->setTitle('')->setSource($this->dbObject('LinkType')->enumValues()), TextField::create('Link')->setTitle('Link URL')->displayIf('LinkType')->isEqualTo('Link')->andIf('LinkType')->isNotEqualTo('Resource')->end(), DisplayLogicWrapper::create($DocumentField)->displayIf('LinkType')->isEqualTo('Resource')->andIf('LinkType')->isNotEqualTo('Link')->end(), $ImageField, HTMLEditorField::create('Content')));
     return $fields;
 }
开发者ID:andrewhoule,项目名称:silverstripe-listpage,代码行数:26,代码来源:ListItem.php

示例7: getCMSFields

 /**
  * getCMSFields
  * Construct the FieldList used in the CMS. To provide a
  * smarter UI we don't use the scaffolding provided by
  * parent::getCMSFields.
  * 
  * @return FieldList
  */
 public function getCMSFields()
 {
     Requirements::css('torindul-silverstripe-shop/css/LeftAndMain.css');
     //Create the FieldList and push the Root TabSet on to it.
     $fields = FieldList::create($root = TabSet::create('Root', Tab::create("Main", HeaderField::create("Add/Edit Tax Class"), CompositeField::create(TextField::create("Title", "Class Name")->setRightTitle("i.e. Zero Rate, Standard Rate.")))));
     return $fields;
 }
开发者ID:micschk,项目名称:torindul-silverstripe-shop,代码行数:15,代码来源:TaxClasses.php

示例8: getCMSFields

 /**
  * @return FieldList 
  */
 public function getCMSFields()
 {
     // Get NotifiedOn implementors
     $types = ClassInfo::implementorsOf('NotifiedOn');
     $types = array_combine($types, $types);
     unset($types['NotifyOnThis']);
     if (!$types) {
         $types = array();
     }
     array_unshift($types, '');
     // Available keywords
     $keywords = $this->getKeywords();
     if (count($keywords)) {
         $availableKeywords = '<div class="field"><div class="middleColumn"><p><u>Available Keywords:</u> </p><ul><li>$' . implode('</li><li>$', $keywords) . '</li></ul></div></div>';
     } else {
         $availableKeywords = "Available keywords will be shown if you select a NotifyOnClass";
     }
     // Identifiers
     $identifiers = $this->config()->get('identifiers');
     if (count($identifiers)) {
         $identifiers = array_combine($identifiers, $identifiers);
     }
     $fields = FieldList::create();
     $relevantMsg = 'Relevant for (note: this notification will only be sent if the context of raising the notification is of this type)';
     $fields->push(TabSet::create('Root', Tab::create('Main', DropdownField::create('Identifier', _t('SystemNotification.IDENTIFIER', 'Identifier'), $identifiers), TextField::create('Title', _t('SystemNotification.TITLE', 'Title')), TextField::create('Description', _t('SystemNotification.DESCRIPTION', 'Description')), DropdownField::create('NotifyOnClass', _t('SystemNotification.NOTIFY_ON_CLASS', $relevantMsg), $types), TextField::create('CustomTemplate', _t('SystemNotification.TEMPLATE', 'Template (Optional)'))->setAttribute('placeholder', $this->config()->get('default_template')), LiteralField::create('AvailableKeywords', $availableKeywords))));
     if ($this->config()->html_notifications) {
         $fields->insertBefore(HTMLEditorField::create('NotificationHTML', _t('SystemNotification.TEXT', 'Text')), 'AvailableKeywords');
     } else {
         $fields->insertBefore(TextareaField::create('NotificationText', _t('SystemNotification.TEXT', 'Text')), 'AvailableKeywords');
     }
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:sheadawson-silverstripe-notifications,代码行数:35,代码来源:SystemNotification.php

示例9: getCMSFields

 function getCMSFields()
 {
     $fields = FieldList::create(TabSet::create('Root'));
     $fields->addFieldToTab('Root.Main', new TextField('Title'));
     $fields->addFieldToTab('Root.Main', new CurrencyField('Price'));
     return $fields;
 }
开发者ID:ormandroid,项目名称:ss_boilerplate,代码行数:7,代码来源:MenuVariation.php

示例10: updateCMSFields

 /**
  * @param FieldList $fields
  */
 public function updateCMSFields(FieldList $fields)
 {
     /** =========================================
          * @var TextareaField $address
          * @var TextareaField $postalAddress
          * @var TextField $mailChimpAPI
          * @var TextareaField $mailChimpSuccessMessage
         ===========================================*/
     if (!$fields->fieldByName('Root.Settings')) {
         $fields->addFieldToTab('Root', TabSet::create('Settings'));
     }
     /** -----------------------------------------
      * Details
      * ----------------------------------------*/
     $address = TextareaField::create('Address', 'Address');
     $address->setRows(8);
     $postalAddress = TextareaField::create('PostalAddress', 'Postal Address');
     $postalAddress->setRows(8);
     $fields->findOrMakeTab('Root.Settings.Details');
     $fields->addFieldsToTab('Root.Settings.Details', array(HeaderField::create('', 'Company Details'), Textfield::create('Phone', 'Phone Number'), Textfield::create('Email', 'Public Email Address'), $address, $postalAddress, TextField::create('Facebook', 'Facebook'), TextField::create('LinkedIn', 'LinkedIn'), TextField::create('Pinterest', 'Pinterest'), TextField::create('TwitterHandle', 'Twitter Handle')));
     /** -----------------------------------------
      * Subscription
      * ----------------------------------------*/
     $mailChimpAPI = TextField::create('MailChimpAPI', 'API Key');
     $mailChimpSuccessMessage = TextareaField::create('MailChimpSuccessMessage', 'Success Message (optional)');
     $mailChimpAPI->setRightTitle('<a href="https://us9.admin.mailchimp.com/account/api-key-popup/" target="_blank"><i>How do I get my MailChimp API Key?</i></a>');
     $mailChimpSuccessMessage->setRows(2)->setRightTitle('Message displayed when a user has successfully subscribed to a list.');
     $fields->findOrMakeTab('Root.Settings.Subscription', 'Subscription');
     $fields->addFieldsToTab('Root.Settings.Subscription', array(HeaderField::create('', 'Newsletter Subscription'), LiteralField::create('', '<p>The API key, and list ID are necessary for the Newsletter Subscription form to function.</p>'), $mailChimpAPI, TextField::create('MailChimpListID', 'List ID'), $mailChimpSuccessMessage));
 }
开发者ID:toastnz,项目名称:quicksilver,代码行数:33,代码来源:SiteConfigExtension.php

示例11: getCMSFields

 public function getCMSFields()
 {
     $fields = FieldList::create(TabSet::create('Root'));
     $fields->addFieldToTab('Root.Main', new DropdownField('Type', 'Type', $this->dbObject('Type')->enumValues()));
     $fields->addFieldToTab('Root.Main', new TextField('Name', 'Name'));
     $fields->addFieldToTab('Root.Main', new TextareaField('Description', 'Description'));
     $fields->addFieldToTab('Root.Main', new TextareaField('Address', 'Address'));
     $fields->addFieldToTab('Root.Main', new TextField('Latitude', 'Latitude'));
     $fields->addFieldToTab('Root.Main', new TextField('Longitude', 'Longitude'));
     $fields->addFieldToTab('Root.Main', new TextField('LocationMessage', 'Message to display for this location'));
     $fields->addFieldToTab('Root.Main', new TextField('Website', 'Website'));
     $fields->addFieldToTab('Root.Main', new TextField('BookingLink', 'BookingLink'));
     $start_date = new DatetimeField('BookingStartDate', 'Booking Block - Start Date');
     $start_date->getDateField()->setConfig('showcalendar', true);
     $start_date->setConfig('dateformat', 'dd/MM/yyyy');
     $fields->addFieldToTab('Root.Main', $start_date);
     $end_date = new DatetimeField('BookingEndDate', 'Booking Block - End Date');
     $end_date->getDateField()->setConfig('showcalendar', true);
     $end_date->setConfig('dateformat', 'dd/MM/yyyy');
     $fields->addFieldToTab('Root.Main', $end_date);
     $fields->addFieldToTab('Root.Main', new TextField('InRangeBookingGraphic', 'URL of graphic of an in range stay'));
     $fields->addFieldToTab('Root.Main', new TextField('OutOfRangeBookingGraphic', 'URL of graphic of an out of range stay'));
     $fields->addFieldToTab('Root.Main', new CheckboxField('IsSoldOut', 'This location is <strong>sold out</strong> (applies to hotels only)'));
     $fields->addFieldToTab('Root.Main', new CheckboxField('DisplayOnSite', 'Show this location on the website. Will be hidden if unchecked.'));
     $fields->addFieldToTab('Root.Main', new CheckboxField('DetailsPage', 'Send people to a details page first?'));
     $fields->addFieldToTab('Root.Main', new TextField('DistanceFromVenue', 'Distance From Venue'));
     $fields->addFieldToTab('Root.Main', new TextField('PublicTransitInstructions', 'Public Transit Instructions'));
     return $fields;
 }
开发者ID:balajijegan,项目名称:openstack-org,代码行数:29,代码来源:SummitLocation.php

示例12: getCMSFields

 public function getCMSFields()
 {
     $fields = FieldList::create(TabSet::create('Root'))->text('Title')->text('Code', 'Code', '', 5)->textarea('Description')->numeric('SessionCount', 'Number of sessions')->numeric('AlternateCount', 'Number of alternates')->checkbox('VotingVisible', "This category is visible to voters")->checkbox('ChairVisible', "This category is visible to track chairs")->hidden('SummitID', 'SummitID');
     if ($this->ID > 0) {
         //tags
         $config = new GridFieldConfig_RelationEditor(100);
         $config->removeComponentsByType(new GridFieldDataColumns());
         $config->removeComponentsByType(new GridFieldDetailForm());
         $completer = $config->getComponentByType('GridFieldAddExistingAutocompleter');
         $completer->setResultsFormat('$Tag');
         $completer->setSearchFields(array('Tag'));
         $completer->setSearchList(Tag::get());
         $editconf = new GridFieldDetailForm();
         $editconf->setFields(FieldList::create(TextField::create('Tag', 'Tag'), DropdownField::create('ManyMany[Group]', 'Group', array('topics' => 'Topics', 'speaker' => 'Speaker', 'openstack projects mentioned' => 'OpenStack Projects Mentioned'))));
         $summaryfieldsconf = new GridFieldDataColumns();
         $summaryfieldsconf->setDisplayFields(array('Tag' => 'Tag', 'Group' => 'Group'));
         $config->addComponent($editconf);
         $config->addComponent($summaryfieldsconf, new GridFieldFilterHeader());
         $tags = new GridField('AllowedTags', 'Tags', $this->AllowedTags(), $config);
         $fields->addFieldToTab('Root.Main', $tags);
         // extra questions for call-for-presentations
         $config = new GridFieldConfig_RelationEditor();
         $config->removeComponentsByType('GridFieldAddNewButton');
         $multi_class_selector = new GridFieldAddNewMultiClass();
         $multi_class_selector->setClasses(array('TrackTextBoxQuestionTemplate' => 'TextBox', 'TrackCheckBoxQuestionTemplate' => 'CheckBox', 'TrackCheckBoxListQuestionTemplate' => 'CheckBoxList', 'TrackRadioButtonListQuestionTemplate' => 'RadioButtonList', 'TrackDropDownQuestionTemplate' => 'ComboBox', 'TrackLiteralContentQuestionTemplate' => 'Literal'));
         $config->addComponent($multi_class_selector);
         $questions = new GridField('ExtraQuestions', 'Track Specific Questions', $this->ExtraQuestions(), $config);
         $fields->addFieldToTab('Root.Main', $questions);
     }
     return $fields;
 }
开发者ID:hogepodge,项目名称:openstack-org,代码行数:31,代码来源:PresentationCategory.php

示例13: getCMSFields

 function getCMSFields()
 {
     $fields = FieldList::create(TabSet::create(Root));
     $fields->addFieldToTab("Root.Main", TextField::create('Name', 'Series Name'));
     // $fields->addFieldToTab("Root.Main", UploadField::create('Icon', 'Series Icon'));
     return $fields;
 }
开发者ID:krissihall,项目名称:sm_ss,代码行数:7,代码来源:DataObjects.php

示例14: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     $fields->insertBefore($shoptab = Tab::create('Shop', 'Shop'), 'Access');
     $fields->addFieldsToTab("Root.Shop", TabSet::create("ShopTabs", $maintab = Tab::create("Main", TreeDropdownField::create('TermsPageID', _t("ShopConfig.TERMSPAGE", 'Terms and Conditions Page'), 'SiteTree'), TreeDropdownField::create("CustomerGroupID", _t("ShopConfig.CUSTOMERGROUP", "Group to add new customers to"), "Group"), UploadField::create('DefaultProductImage', _t('ShopConfig.DEFAULTIMAGE', 'Default Product Image'))), $countriestab = Tab::create("Countries", CheckboxSetField::create('AllowedCountries', _t('ShopConfig.ALLOWED_COUNTRIES', 'Allowed Ordering and Shipping Countries'), self::config()->iso_3166_country_codes))));
     $fields->removeByName("CreateTopLevelGroups");
     $countriestab->setTitle(_t('ShopConfig.ALLOWED_COUNTRIES_TAB_TITLE', "Allowed Countries"));
 }
开发者ID:NobrainerWeb,项目名称:silverstripe-shop,代码行数:7,代码来源:ShopConfig.php

示例15: getCMSFields

 /**
  * getCMSFields
  * Construct the FieldList used in the CMS. To provide a
  * smarter UI we don't use the scaffolding provided by
  * parent::getCMSFields.
  * 
  * @return FieldList
  */
 public function getCMSFields()
 {
     Requirements::css('torindul-silverstripe-shop/css/LeftAndMain.css');
     //Create the FieldList and push the Root TabSet on to it.
     $fields = FieldList::create($root = TabSet::create('Root', Tab::create("Main", HeaderField::create($this->SystemName), CompositeField::create(TextField::create("Title", "Friendly Name")->setRightTitle("This is the name your customers would see against this courier."), DropdownField::create("Enabled", "Enable this courier?", array("0" => "No", "1" => "Yes"))->setEmptyString("(Select one)")->setRightTitle("Can customers use this courier?")))));
     return $fields;
 }
开发者ID:micschk,项目名称:torindul-silverstripe-shop,代码行数:15,代码来源:Courier.php


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