當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。