本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例12: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldsToTab("Root.Main", array(HTMLEditorField::create('Content')));
return $fields;
}
示例13: getCMSFields
/**
* CMS Fields
* @return FieldList
*/
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->removeByName(array('Main', 'AdminTitle', 'MenuTitle', 'Public'));
return $fields;
}