当前位置: 首页>>代码示例>>PHP>>正文


PHP HtmlEditorField::create方法代码示例

本文整理汇总了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;
 }
开发者ID:helpfulrobot,项目名称:level51-silverstripe-fb-timeline-pics,代码行数:7,代码来源:FacebookPost.php

示例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;
 }
开发者ID:shawn3a,项目名称:ss_powermoney,代码行数:7,代码来源:AboutPage.php

示例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;
 }
开发者ID:silverstripe-europe-meetup,项目名称:website-2015,代码行数:7,代码来源:SectionSponsor.php

示例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;
 }
开发者ID:shawn3a,项目名称:ss_powermoney,代码行数:7,代码来源:ArticlePage.php

示例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> &nbsp;&nbsp;
					<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;
    }
开发者ID:helpfulrobot,项目名称:nzaa-widgetify,代码行数:32,代码来源:WidgetifyPage.php

示例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;
 }
开发者ID:roopamjain01,项目名称:one_ring,代码行数:7,代码来源:Region.php

示例8: getCMSFields

 /**
  * @return FieldList
  */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->push(TextField::create("Title"));
     $fields->push(HtmlEditorField::create("HTML", "Content"));
     return $fields;
 }
开发者ID:burnbright,项目名称:silverstripe-widget-content,代码行数:10,代码来源:ContentWidget.php

示例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;
 }
开发者ID:shawn3a,项目名称:beardpapa,代码行数:7,代码来源:AboutPage.php

示例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;
 }
开发者ID:coreiho,项目名称:silverstripe-sections,代码行数:7,代码来源:SectionsListItem.php

示例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;
 }
开发者ID:bummzack,项目名称:page-blocks,代码行数:8,代码来源:TextBlock.php

示例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;
 }
开发者ID:helpfulrobot,项目名称:level51-silverstripe-fb-timeline-pics,代码行数:8,代码来源:FacebookTimelinePic.php

示例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;
 }
开发者ID:helpfulrobot,项目名称:gdmedia-silverstripe-widget-htmlcontent,代码行数:8,代码来源:HTMLContentWidget.php

示例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;
 }
开发者ID:dunatron,项目名称:onbaord-revamp,代码行数:9,代码来源:ModuleScreenshot.php


注:本文中的HtmlEditorField::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。