本文整理汇总了PHP中HtmlEditorField::create方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlEditorField::create方法的具体用法?PHP HtmlEditorField::create怎么用?PHP HtmlEditorField::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlEditorField
的用法示例。
在下文中一共展示了HtmlEditorField::create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->removeByName(array('SortOrder', 'Pic', 'UID'));
$fields->addFieldsToTab('Root.Main', array(CheckboxField::create('Visible', _t('FacebookPost.VISIBLE', 'Is visible?')), DatetimeField_Readonly::create('Date', _t('FacebookPost.DATE', 'Posted on')), NumericField_Readonly::create('Likes', _t('FacebookPost.LIKES', 'Likes')), HtmlEditorField::create('Message', _t('FacebookPost.MESSAGE', 'Text'))->setRows(10)));
return $fields;
}
示例2: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->removeFieldsFromTab('Root.Main', array('Title', 'Content', 'URLSegment', 'MenuTitle'));
$fields->addFieldsToTab('Root.Main', array(HtmlEditorField::create('Content', 'Content'), HtmlEditorField::create('Content_cn', 'Content_cn'), UploadField::create('Images', 'Images', $this->Images())->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif'))->setAllowedMaxFileNumber(5)->setFolderName('AboutImages')), 'Metadata');
return $fields;
}
示例3: getCMSFields
public function getCMSFields()
{
$return = parent::getCMSFields();
$return->addFieldsToTab('Root.Main', [new ColorPaletteField('BackgroundColor', $this->fieldLabel('BackgroundColor'), ['grey-light' => '#F6F6F6', 'white' => '#FFF', 'blue-dark' => '#015790'])], 'Content');
$return->addFieldToTab('Root.Main', HtmlEditorField::create('AfterContent', 'Text to appear after the sponsors'));
return $return;
}
示例4: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->removeFieldsFromTab('Root.Main', array('Title', 'Content', 'MenuTitle'));
$fields->addFieldsToTab('Root.Main', array(TextField::create('Title', 'Title'), TextField::create('Title_cn', 'Title_cn'), HtmlEditorField::create('Content', 'Content'), HtmlEditorField::create('Content_cn', 'Content_cn'), DateField::create('Date', 'Date')->setConfig('showcalendar', true)), 'URLSegment');
return $fields;
}
示例5: updateCMSFields
/**
* @param FieldList $fields
* @return FieldList
*/
public function updateCMSFields(FieldList $fields)
{
$fields->removeByName('Content');
/** @var HtmlEditorField $content */
$fields->addFieldToTab('Root.Main', $content = HtmlEditorField::create('Content', _t('BoilerplatePageExtension.Content', 'Content')), 'Metadata');
$content->setRows(20);
}
开发者ID:helpfulrobot,项目名称:ryanpotter-silverstripe-boilerplate,代码行数:11,代码来源:BoilerplatePageExtension.php
示例6: getCMSFields
public function getCMSFields()
{
Requirements::css('widgetify/css/widgetify_cms.css');
Requirements::javascript('framework/thirdparty/jquery/jquery.js');
Requirements::javascript('widgetify/scripts/widgetify_page.js');
$fields = parent::getCMSFields();
$fields->push(HiddenField::create('WidgetifyContent', 'WidgetifyContent'));
$fields->push(HiddenField::create('ThisID', 'ThisID', $this->ID));
$tab = $fields->findOrMakeTab('Root.Main');
$tab->insertAfter(HeaderField::create('WidgetifyTitle', 'Widgetify Template', 3), 'Metadata');
if (!$this->WidgetifyTemplateID) {
$this->WidgetifyTemplateID = 0;
}
$templatesMap = DataList::create('WidgetifyTemplate')->map();
$tab->insertAfter(DropdownField::create('WidgetifyTemplateID', 'Select Template', $templatesMap)->setEmptyString('- Select -'), 'WidgetifyTitle');
$tab->insertAfter(CheckboxField::create('CSSFrontend', 'Apply template Stylesheet to front-end page'), 'WidgetifyTemplateID');
$tab->insertAfter(CheckboxField::create('JSFrontend', 'Apply template Javascript to front-end page'), 'CSSFrontend');
$tab->insertAfter(HeaderField::create('WidgetifyPreviewTitle', 'Widgetify Content', 3), 'JSFrontend');
$tab->insertAfter(LiteralField::create('WidgetifyPreview', '<div id="widgetifyPreview" class="widgetifyTemplate"></div>'), 'WidgetifyPreviewTitle');
$htmlField = HtmlEditorField::create('WidgetDynamicContent', false);
$editorFieldContents = '
<div id="WidgetDynamicContentHolder" class="WidgetDynamicContentHolder">
<p id="edit-widget-title">Edit content</p>' . $htmlField->forTemplate() . '
<p class="widget-edit-actions">
<a href="javascript:;" id="save-widget-content" class="ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary">Update</a>
<a href="javascript:;" id="cancel-widget-content" class="ss-ui-action-destructive ui-button ui-widget ui-state-default ui-button-text-icon-primary ui-corner-left ss-ui-button">Cancel</a>
</p>
</div>';
$tab->insertAfter(LiteralField::create('WidgetDynamicContentPlaceHolder', $editorFieldContents), 'WidgetifyPreview');
$fields->removeFieldFromTab('Root.Main', 'Content');
return $fields;
}
示例7: getCMSFields
public function getCMSFields()
{
$fields = FieldList::create(TextField::create('Title'), HtmlEditorField::create('Description'), $uploader = UploadField::create('Photo'));
$uploader->setFolderName('region-photos');
$uploader->getValidator()->setAllowedExtensions(array('png', 'gif', 'jpeg', 'jpg'));
return $fields;
}
示例8: getCMSFields
/**
* @return FieldList
*/
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->push(TextField::create("Title"));
$fields->push(HtmlEditorField::create("HTML", "Content"));
return $fields;
}
示例9: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->removeFieldsFromTab('Root.Main', array('Content'));
$fields->addFieldsToTab('Root.Main', array(TextField::create('PolicySummary', 'Policy Summary'), HtmlEditorField::create('PolicyDetail', 'Policy Detail'), UploadField::create('PolicyImages', 'Policy Images', $this->PolicyImages())->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png'))->setAllowedMaxFileNumber(6)->setFolderName('AboutPage'), TextField::create('RecipeSummary', 'Recipe Summary'), HtmlEditorField::create('RecipeDetail', 'Recipe Detail'), UploadField::create('RecipeImages', 'Recipe Images', $this->RecipeImages())->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png'))->setAllowedMaxFileNumber(6)->setFolderName('AboutPage'), TextField::create('ReputationSummary', 'Reputation Summary'), HtmlEditorField::create('ReputationDetail', 'Reputation Detail'), UploadField::create('ReputationImages', 'Reputation Images', $this->ReputationImages())->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png'))->setAllowedMaxFileNumber(6)->setFolderName('AboutPage')), 'Title');
return $fields;
}
示例10: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldsToTab("Root.Main", array(OptionsetField::create('Status', 'Status', array("1" => "Active", "0" => "Disabled"), 1), TextField::create('AdminTitle')->setDescription('This field is for adminisration use only and will not display on the site.'), TextareaField::create('Title', 'Title')->setRows(2), HtmlEditorField::create('Content', 'Content')));
$this->extend('updateCMSFields', $fields);
return $fields;
}
示例11: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$tinyMce = HtmlEditorField::create('Content', _t('TextBlock.CONTENT', 'Content'));
$fields->addFieldToTab('Root.Main', $tinyMce);
$this->extend('updateCMSFields', $fields);
return $fields;
}
示例12: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->removeByName('OwnerID');
$fields->removeByName('ParentID');
$fields->addFieldsToTab('Root.Main', array(CheckboxField::create('Visible', _t('FacebookTimelinePic.VISIBLE', 'Is visible?')), HtmlEditorField::create('Caption', _t('FacebookTimelinePic.CAPTION', 'Message'))->setRows(10)));
return $fields;
}
示例13: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->push(TextField::create("WidgetLabel", "Widget Label"));
$fields->push(TextField::create("WidgetTitle", "Widget Title"));
$fields->push(HtmlEditorField::create("WidgetContent", "Content"));
return $fields;
}
示例14: updateCMSFields
public function updateCMSFields(FieldList $fields)
{
$fields->addFieldToTab("Root", new Tab('CookiePolicy'));
$fields->addFieldToTab('Root.CookiePolicy', CheckboxField::create("CookiePolicyIsActive")->setTitle(_t('CookiePolicy.ISACTIVE', "Is Active")));
$fields->addFieldToTab('Root.CookiePolicy', TextField::create("CookiePolicyButtonTitle")->setTitle(_t('CookiePolicy.BUTTONTITLE', "Button Title")));
$fields->addFieldToTab('Root.CookiePolicy', HtmlEditorField::create("CookiePolicyDescription")->setTitle(_t('CookiePolicy.DESCRIPTION', "Description")));
$fields->addFieldToTab('Root.CookiePolicy', DropdownField::create("CookiePolicyPosition")->setSource(singleton('SiteConfig')->dbObject('CookiePolicyPosition')->enumValues())->setTitle(_t('CookiePolicy.POSITION', "Position")));
}
开发者ID:helpfulrobot,项目名称:jelicanin-silverstripe-cookie-policy-notification,代码行数:8,代码来源:CookiePolicy.php
示例15: updateCMSFields
public function updateCMSFields()
{
$fields = FieldList::create(TextField::create('Title'), TextareaField::create('Description'), $screenShot = UploadField::create('ScreenShot'), HtmlEditorField::create('Content'));
$fields->addFieldToTab('Root.ScreenShots', $screenShot = UploadField::create('ScreenShot'));
//Set allowed upload extensions
$screenShot->getValidator()->setAllowedExtensions(array('png', 'gif', 'jpg', 'jpeg'));
$screenShot->setFolderName('module-screenshots');
return $fields;
}