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