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


PHP SiteTree::getCMSFields方法代码示例

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


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

示例1: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->replaceField("Content", new TextareaField("Content", _t("SiteTree.Content", "%Content%")));
     $fields->addFieldsToTab('Root.Content.Shop', array(new Textfield("PriceValue", _t("Shop.ItemOption.PriceValue", "%PriceValue%")), new DropdownField("Modus", _t("Shop.ItemOption.Modus", "%Modus%"), singleton($this->ClassName)->dbObject('Modus')->enumValues()), new Textfield("OptionKey", _t("Shop.ItemOption.OptionKey", "%Option Key%")), new FileIFrameField('Download', _t("Shop.ItemOption.Download", "%Download%"))));
     return $fields;
 }
开发者ID:pstaender,项目名称:ShopSystem,代码行数:7,代码来源:ShopItemOption.php

示例2: getCMSFields

	function getCMSFields() {
		$fields = parent::getCMSFields();
		$fields->addFieldToTab("Root.Content.Widgets", 
			new WidgetAreaEditor("SideBar")
		);
		return $fields;
	}
开发者ID:neopba,项目名称:silverstripe-book,代码行数:7,代码来源:Page.php

示例3: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     //get all the fields...
     $fields->addFieldToTab('Root.Main', new TextField('MetaTitle', 'Meta Title'), 'MetaDescription');
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:moosylvania-moosylvania-silverstripe-boiler-plate,代码行数:7,代码来源:Page.php

示例4: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab('Root.Main', new CheckboxField('InMainNavigation', 'In Main Navigation anzeigen'));
     $fields->addFieldToTab('Root.Main', new CheckboxField('InFooterNavigation', 'In Footer Navigation anzeigen'));
     return $fields;
 }
开发者ID:jbennecker,项目名称:silverstripe-boilerplate,代码行数:7,代码来源:Page.php

示例5: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab("Root.Content.Shop", array(new TextField('ProductKey', _t("Shop.Item.ProductKey", "%ProductKey%")), new NumericField('Price', _t("Shop.Item.Price", "%Price%")), new CheckboxField('Featured', _t("Shop.Item.Featured", "%Featured%")), new TextareaField('Summary', _t("Shop.Item.Summary", "%Summary%"), 5), new TextField('StockQuantity', _t("Shop.Item.StockQuantity", "%StockQuantity%")), new DateField('StockDate', _t("Shop.Item.StockDate", "%StockDate%")), new DropdownField('Currency', _t("Shop.Item.Currency", "%Currency%"), singleton($this->ClassName)->dbObject('Currency')->enumValues()), new ReadonlyField('OrderCount', _t("Shop.Item.OrderCount", "%Orders count%", $this->OrderCount))));
     $fields->addFieldsToTab('Root.Content.' . _t("Shop.Item.Pictures", "%Pictures%"), array(new FileIFrameField('Picture', _t("Shop.Item.Picture", "%Picture%")), new TreeDropdownField('PictureFolderID', _t("Shop.Item.PictureFolder", "%PictureFolder%"), "Folder")));
     return $fields;
 }
开发者ID:pstaender,项目名称:ShopSystem,代码行数:7,代码来源:ShopItem.php

示例6: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab('Root.SideBarRight', new HTMLEditorField('ContentRight', 'Content Right'));
     $fields->addFieldToTab('Root.Main', new TextField('TitleBarTitle', 'Browser Title'), 'URLSegment');
     return $fields;
 }
开发者ID:hemant-chakka,项目名称:awss,代码行数:7,代码来源:Page.php

示例7: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->insertBefore(TextareaField::create('Intro', 'Intro'), 'Content');
     $fields->insertAfter(ColorPaletteField::create("Colour", "Colour", array('night' => '#333333', 'air' => '#009EE2', 'earth' => ' #79c608', 'passion' => '#b02635', 'people' => '#de347f', 'inspiration' => '#783980')), "Intro");
     $fields->insertBefore($image = UploadField::create('SplashImage', 'Splash Image'), 'Content');
     $image->setFolderName('Uploads/Splash-Images');
     if ($this->ClassName === "Page" || $this->ClassName === "HomePage") {
         $fields->insertAfter(HTMLEditorField::create('ExtraContent'), 'Content');
         $gridField = new GridField('FeatureItems', 'FeatureItems', $this->FeatureItems()->sort(array('Sort' => 'ASC', 'Archived' => 'ASC')), $config = GridFieldConfig_RelationEditor::create());
         $gridField->setModelClass('FeatureItem');
         $fields->addFieldToTab('Root.Features', $gridField);
         $config->addComponent(new GridFieldOrderableRows());
     } else {
         if ($this->ClassName === "CalendarPage") {
             $content = $fields->dataFieldByName('Content');
             $content->addExtraClass('no-pagebreak');
             $events = Event::get()->sort(array('StartDateTime' => 'Desc'))->filterByCallback(function ($record) {
                 return !$record->getIsPastEvent();
             });
             $gridField = new GridField('Event', 'Upcoming Events', $events, $config = GridFieldConfig_RecordEditor::create());
             $gridField->setModelClass('Event');
             $dataColumns = $config->getComponentByType('GridFieldDataColumns');
             $dataColumns->setDisplayFields(array('Title' => 'Title', 'StartDateTime' => 'Date and Time', 'DatesAndTimeframe' => 'Presentation String'));
             $fields->addFieldToTab('Root.UpcomingEvents', $gridField);
         }
     }
     return $fields;
 }
开发者ID:adrexia,项目名称:nzlarps,代码行数:29,代码来源:Page.php

示例8: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $imageField = new UploadField('PrimaryImage', 'Image');
     $imageField->getValidator()->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png'));
     $fields->addFieldToTab('Root.Main', $imageField, 'Content');
     return $fields;
 }
开发者ID:JamesWatling,项目名称:bonethug,代码行数:8,代码来源:Page.php

示例9: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $gridField = new GridField('CarouselItems', 'Carousel', $this->CarouselItems(), GridFieldConfig_RelationEditor::create());
     $gridField->setModelClass('CarouselItem');
     $fields->addFieldToTab('Root.Carousel', $gridField);
     return $fields;
 }
开发者ID:robert-h-curry,项目名称:huttclub,代码行数:8,代码来源:HomePage.php

示例10: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     //we use ToggleCompositeFields instead of tabs. it looks cleaner and 'lite'
     $fields->addFieldToTab("Root.Main", ToggleCompositeField::create('Options', _t('Page.OPTIONS', 'Options'), array(CheckboxField::create('ShowInMenus', _t('Page.SHOWREGULARMENU', 'Show in regular Menu')), $tabBehaviour = new Tab('Settings', new DropdownField("ClassName", $this->fieldLabel('ClassName'), $this->getClassDropdown()), $parentTypeSelector = new CompositeField(new OptionsetField("ParentType", _t("SiteTree.PAGELOCATION", "Page location"), array("root" => _t("SiteTree.PARENTTYPE_ROOT", "Top-level page"), "subpage" => _t("SiteTree.PARENTTYPE_SUBPAGE", "Sub-page underneath a parent page"))), $parentIDField = new TreeDropdownField("ParentID", $this->fieldLabel('ParentID'), 'SiteTree', 'ID', 'MenuTitle')))))->setHeadingLevel(4), 'Metadata');
     $fields->removeByName("ExtraMeta");
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:dospuntocero-litecms,代码行数:8,代码来源:LiteCMSBasicPage.php

示例11: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab('Root.ContactForm', new CheckboxField('ContactFormDisplay', 'Show'));
     $fields->addFieldToTab('Root.ContactForm', new EmailField('ContactFormSendTo', 'Send To Email'));
     $fields->addFieldToTab('Root.ContactForm', new TextField('ContactFormSubject', 'Subject'));
     return $fields;
 }
开发者ID:pedro2555,项目名称:aecp.pt,代码行数:8,代码来源:Page.php

示例12: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     // Add the banner image
     $fields->addFieldToTab('Root.Main', new HeaderField('BannerSection', 'Banner'), 'Content');
     $fields->addFieldToTab('Root.Main', new UploadField('BannerImage', 'Banner image'), 'Content');
     return $fields;
 }
开发者ID:pmachapman,项目名称:rcpn.org.nz,代码行数:8,代码来源:Page.php

示例13: getCMSFields

 /**
  * @return FieldList
  */
 public function getCMSFields()
 {
     /** =========================================
      * @var FieldList $fields
      * ========================================*/
     $fields = parent::getCMSFields();
     return $fields;
 }
开发者ID:toastnz,项目名称:quicksilver,代码行数:11,代码来源:Page.php

示例14: getCMSFields

 public function getCMSFields()
 {
     $f = parent::getCMSFields();
     $img = new UploadField('Banner', 'Banner Image');
     $img->setFolderName('Banners');
     $f->addFieldToTab('Root.Main', $img, 'Content');
     $f->addFieldToTab('Root.Main', new HTMLEditorField('BannerText', 'Banner Text'), 'Content');
     return $f;
 }
开发者ID:prostart,项目名称:cobblestonepath,代码行数:9,代码来源:Page.php

示例15: getCMSFields

 public function getCMSFields()
 {
     // Get the fields from the parent implementation
     $fields = parent::getCMSFields();
     //google map module
     $subtitle = new TextField('Subtitle', 'Subtitle');
     $fields->addFieldToTab('Root.Main', $subtitle, 'Content');
     return $fields;
 }
开发者ID:fanggu,项目名称:loveyourwater_ss_v3.1.6,代码行数:9,代码来源:Page.php


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