當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Section::getCMSFields方法代碼示例

本文整理匯總了PHP中Section::getCMSFields方法的典型用法代碼示例。如果您正苦於以下問題:PHP Section::getCMSFields方法的具體用法?PHP Section::getCMSFields怎麽用?PHP Section::getCMSFields使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Section的用法示例。


在下文中一共展示了Section::getCMSFields方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getCMSFields

 /**
  * CMS Fields
  * @var FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab("Root.Main", array(TextareaField::create('Title')->setRows(1), HTMLEditorField::create('Content')));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
開發者ID:coreiho,項目名稱:silverstripe-sections,代碼行數:11,代碼來源:ContentSection.php

示例2: getCMSFields

 /**
  * CMS Fields
  * @return array
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab("Root.Main", array(SortableUploadField::create('Images', 'Current Image(s)')));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
開發者ID:coreiho,項目名稱:silverstripe-sections,代碼行數:11,代碼來源:GallerySection.php

示例3: getCMSFields

 /**
  * CMS Fields
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab("Root.Main", array(DropdownField::create('FormPageID', 'Select a page', UserDefinedForm::get()->map('ID', 'Title'))));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
開發者ID:coreiho,項目名稱:silverstripe-sections,代碼行數:11,代碼來源:FormSection.php

示例4: getCMSFields

 /**
  * CMS Fields
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab("Root.Main", array(DropdownField::create('ShowHome', 'Show home', array("1" => "Yes", "0" => "No"), 1)));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
開發者ID:coreiho,項目名稱:silverstripe-sections,代碼行數:11,代碼來源:BreadcrumbSection.php

示例5: getCMSFields

 /**
  * CMS Fields
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab("Root.Main", array(TextareaField::create('Quote'), TextareaField::create('Citation')->setRows(1)->setDescription('Who cited/quoted this?')));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
開發者ID:coreiho,項目名稱:silverstripe-sections,代碼行數:11,代碼來源:QuoteSection.php

示例6: getCMSFields

 /**
  * CMS Fields
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $listGridConfig = GridFieldConfig_RelationEditor::create();
     if ($this->Items()->Count() > 0) {
         $listGridConfig->addComponent(new GridFieldOrderableRows());
     }
     $fields->addFieldToTab('Root.Main', GridField::create('Items', 'List', $this->Items(), $listGridConfig));
     return $fields;
 }
開發者ID:helpfulrobot,項目名稱:coreiho-silverstripe-sections,代碼行數:14,代碼來源:ListSection.php

示例7: getCMSFields

 /**
  * CMS Fields
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $mosaicGridConfig = GridFieldConfig_RelationEditor::create();
     if ($this->mosaicImages()->Count() > 0) {
         $mosaicGridConfig->addComponent(new GridFieldOrderableRows());
     }
     $fields->addFieldToTab('Root.Main', GridField::create('MosaicImages', 'Mosaic Images', $this->MosaicImages(), $mosaicGridConfig));
     return $fields;
 }
開發者ID:scottgimblett,項目名稱:silverstripe-sections-mosaic,代碼行數:14,代碼來源:MosaicSection.php

示例8: getCMSFields

 /**
  * CMS Fields
  * @return array
  */
 public function getCMSFields()
 {
     $linksGridConfig = GridFieldConfig_RelationEditor::create();
     if ($this->Links()->Count() > 0) {
         $linksGridConfig->addComponent(new GridFieldOrderableRows());
     }
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab("Root.Main", array(TextareaField::create('Title')->setRows(1), HTMLEditorField::create('Content'), SortableUploadField::create('Images', 'Current Image(s)'), GridField::create('Links', 'Links', $this->Links(), $linksGridConfig)));
     return $fields;
 }
開發者ID:helpfulrobot,項目名稱:coreiho-silverstripe-sections,代碼行數:14,代碼來源:ImageBannerSection.php

示例9: getCMSFields

 /**
  * CMS Fields
  * @return array
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $PeopleConfig = GridFieldConfig_RecordEditor::create();
     if ($this->People()->Count() > 0) {
         $PeopleConfig->addComponent(new GridFieldOrderableRows());
     }
     $fields->addFieldsToTab('Root.Main', array(TextareaField::create('Title')->setRows(1), HTMLEditorField::create('Content'), GridField::create('People', 'Current People(s)', $this->People(), $PeopleConfig)));
     return $fields;
 }
開發者ID:helpfulrobot,項目名稱:coreiho-silverstripe-sections,代碼行數:14,代碼來源:PeopleSection.php

示例10: getCMSFields

 /**
  * CMS Fields
  * @return array
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $TeaserConfig = GridFieldConfig_RecordEditor::create();
     if ($this->LinkList()->Count() > 0) {
         $TeaserConfig->addComponent(new GridFieldOrderableRows());
     }
     $fields->addFieldsToTab('Root.Main', array(TextareaField::create('Title')->setRows(1), DropdownField::create('LinkType', 'Type', array("currentchildren" => "List all sub pages of this page", "children" => "Specify a page and list all its sub pages", "specify" => "Specify each link")), DisplayLogicWrapper::create(TreeDropdownField::create('ParentPageID', 'Select a page', 'SiteTree'))->displayIf("LinkType")->isEqualTo("children")->end(), DisplayLogicWrapper::create(GridField::create('LinkList', 'Current Link(s)', $this->LinkList(), $TeaserConfig))->displayIf("LinkType")->isEqualTo("specify")->end()));
     return $fields;
 }
開發者ID:helpfulrobot,項目名稱:coreiho-silverstripe-sections,代碼行數:14,代碼來源:LinkSection.php

示例11: getCMSFields

 /**
  * CMS Fields
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $bannerGridConfig = GridFieldConfig_RelationEditor::create();
     if ($this->Banners()->Count() > 0) {
         $bannerGridConfig->addComponent(new GridFieldOrderableRows());
     }
     $fields->addFieldToTab('Root.Main', GridField::create('Banners', 'Banner', $this->Banners(), $bannerGridConfig));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
開發者ID:coreiho,項目名稱:silverstripe-sections,代碼行數:15,代碼來源:BannerSection.php

示例12: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldsToTab("Root.Main", array(HTMLEditorField::create('Content')));
     return $fields;
 }
開發者ID:helpfulrobot,項目名稱:plato-creative-plato-silverstripe-sections,代碼行數:6,代碼來源:ContentSection.php

示例13: getCMSFields

 /**
  * CMS Fields
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->removeByName(array('Main', 'AdminTitle', 'MenuTitle', 'Public'));
     return $fields;
 }
開發者ID:coreiho,項目名稱:silverstripe-sections,代碼行數:10,代碼來源:MainSection.php


注:本文中的Section::getCMSFields方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。