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


PHP Widget::getCMSFields方法代码示例

本文整理汇总了PHP中Widget::getCMSFields方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::getCMSFields方法的具体用法?PHP Widget::getCMSFields怎么用?PHP Widget::getCMSFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Widget的用法示例。


在下文中一共展示了Widget::getCMSFields方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab("Root.Main", $fields->dataFieldByName("WidgetName"), "Enabled");
     $fields->addFieldToTab("Root.Main", $fields->dataFieldByName("WidgetLabel"), "Enabled");
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:gdmedia-silverstripe-widget-twitter-widgets,代码行数:7,代码来源:TwitterWidgetsWidget.php

示例3: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->merge(new FieldSet(new TextField("Title", _t("TagCloudWidget.TILE", "Title")), new TextField("Limit", _t("TagCloudWidget.LIMIT", "Limit number of tags")), new OptionsetField("Sortby", _t("TagCloudWidget.SORTBY", "Sort by"), array("alphabet" => _t("TagCloudWidget.SBAL", "alphabet"), "frequency" => _t("TagCloudWidget.SBFREQ", "frequency")))));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:nicmart,项目名称:comperio-site,代码行数:7,代码来源:TagCloudWidget.php

示例4: getCMSFields

 public function getCMSFields()
 {
     $this->beforeUpdateCMSFields(function (&$fields) {
         $fields->merge(array(new TextField('Title', _t('TwitterWidget.FIELD_TITLE', 'Title'), null, 255), new NumericField('TweetCount', _t('TwitterWidget.FIELD_TWEET_COUNT', 'Tweet Count'))));
     });
     return parent::getCMSFields();
 }
开发者ID:tractorcow,项目名称:silverstripe-twitter,代码行数:7,代码来源:TwitterWidget.php

示例5: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->merge(new FieldList(new TextField('Title', _t('CategoryCloudWidget.TILE', 'Title')), new NumericField('Limit', _t('CategoryCloudWidget.LIMIT', 'Limit'))));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:ioti-silverstripe-blogcategories,代码行数:7,代码来源:CategoryCloudWidget.php

示例6: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->merge(new FieldSet(new TextField("WidgetTitle", 'Custom title for widget'), new NumericField('ShowLastYears', 'Nr of years to show all months for'), new CheckboxField('ShowChildren', 'Show blog entries for selected date')));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:exadium-blogarchivemenuwidget,代码行数:7,代码来源:BlogArchiveMenuWidget.php

示例7: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->merge(new FieldList(TextField::create("Title", _t("TagCloudWidget.TILE", "Title"))));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:i-lateral-silverstripe-discussions,代码行数:7,代码来源:DiscussionsCategoriesWidget.php

示例8: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->merge(new FieldList(TextField::create("Title", _t("TagCloudWidget.TILE", "Title")), TextField::create("Limit", _t("TagCloudWidget.LIMIT", "Limit number of tags")), OptionsetField::create("SortParam"), OptionsetField::create("SortOrder")));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:i-lateral,项目名称:silverstripe-discussions,代码行数:7,代码来源:DiscussionsTagsWidget.php

示例9: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->merge(new FieldSet(new OptionsetField('DisplayMode', _t('ArchiveWidget.DispBY', 'Display by'), array('month' => _t('ArchiveWidget.MONTH', 'month'), 'year' => _t('ArchiveWidget.YEAR', 'year')))));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:nicmart,项目名称:comperio-site,代码行数:7,代码来源:ArchiveWidget.php

示例10: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->merge(new FieldSet(new TextField("RSSTitle", _t('RSSWidget.CT', "Custom title for the feed")), new TextField("RssUrl", _t('RSSWidget.URL', "URL of the other page's RSS feed.  Please make sure this URL points to an RSS feed.")), new NumericField("NumberToShow", _t('RSSWidget.NTS', "Number of Items to show"))));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:nicmart,项目名称:comperio-site,代码行数:7,代码来源:RSSWidget.php

示例11: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab("Root.Main", new TextField('WidgetLabel', 'Widget Label'), "Enabled");
     $fields->addFieldToTab("Root.Main", new TextField('WidgetName', 'Widget Name'), "Enabled");
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:gdmedia-silverstripe-widget-userform,代码行数:7,代码来源:UserFormWidget.php

示例12: 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

示例13: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab("Root.Main", new TextField('WidgetLabel', 'Widget Label'), "Enabled");
     $fields->addFieldToTab("Root.Main", new TextField('WidgetName', 'Widget Name'), "Enabled");
     $fields->addFieldToTab("Root.Main", new TextField('WidgetName', 'Widget Name'), "Enabled");
     $fields->addFieldToTab('Root.Main', new TextField('BtnText', 'Button label'));
     $fields->addFieldToTab('Root.Main', new TreeDropdownField("MoreLinkID", "Button link", "SiteTree"));
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:burnbright-silverstripe-testimonials,代码行数:10,代码来源:TestimonialWidget.php

示例14: getCMSFields

 /**
  * {@inheritdoc}
  */
 public function getCMSFields()
 {
     $this->beforeUpdateCMSFields(function ($fields) {
         /**
          * @var FieldList $fields
          */
         $fields->merge(array(DropdownField::create('BlogID', _t('BlogRecentPostsWidget.Blog', 'Blog'), Blog::get()->map()), NumericField::create('NumberOfPosts', _t('BlogRecentPostsWidget.NumberOfPosts', 'Number of Posts'))));
     });
     return parent::getCMSFields();
 }
开发者ID:sunnysideup,项目名称:silverstripe-blog,代码行数:13,代码来源:BlogRecentPostsWidget.php

示例15: getCMSFields

 /**
  * {@inheritdoc}
  */
 public function getCMSFields()
 {
     $this->beforeUpdateCMSFields(function (FieldList $fields) {
         $fields[] = DropdownField::create('BlogID', _t('BlogCategoriesWidget.Blog', 'Blog'), Blog::get()->map());
         $fields[] = NumericField::create('Limit', _t('BlogCategoriesWidget.Limit.Label', 'Limit'), 0)->setDescription(_t('BlogCategoriesWidget.Limit.Description', 'Limit the number of categories shown by this widget (set to 0 to show all categories).'))->setMaxLength(3);
         $fields[] = DropdownField::create('Order', _t('BlogCategoriesWidget.Sort.Label', 'Sort'), array('Title' => 'Title', 'Created' => 'Created', 'LastUpdated' => 'Updated'))->setDescription(_t('BlogCategoriesWidget.Sort.Description', 'Change the order of categories shown by this widget.'));
         $fields[] = DropdownField::create('Direction', _t('BlogCategoriesWidget.Direction.Label', 'Direction'), array('ASC' => 'Ascending', 'DESC' => 'Descending'))->setDescription(_t('BlogCategoriesWidget.Direction.Description', 'Change the direction of ordering of categories shown by this widget.'));
     });
     return parent::getCMSFields();
 }
开发者ID:helpfulrobot,项目名称:silverstripe-blog,代码行数:13,代码来源:BlogCategoriesWidget.php


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