当前位置: 首页>>代码示例>>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;未经允许,请勿转载。