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


PHP TextField::setRightTitle方法代码示例

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


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

示例1: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     // Main
     $fields->addFieldToTab('Root.Main', $gaCode = new TextField('GACode', 'Google Analytics account'));
     $gaCode->setRightTitle('Account number to be used all across the site (in the format <strong>UA-XXXXX-X</strong>)');
     $fields->addFieldToTab('Root.Main', $showTitle = new CheckboxField('ShowTitleInHeader', 'Show title in header'), 'Tagline');
     /* @var $logoField UploadField */
     $logoField = new UploadField('Logo', 'Large logo, to appear in the header.');
     $logoField->setAllowedFileCategories('image');
     $logoField->setConfig('allowedMaxFileNumber', 1);
     $mobileLogoField = new UploadField('LogoMobile', 'Mobile logo, to appear in the header.');
     $mobileLogoField->setAllowedFileCategories('image');
     $mobileLogoField->setConfig('allowedMaxFileNumber', 1);
     $fields->addFieldToTab('Root.Main', $logoField);
     $fields->addFieldToTab('Root.Main', $this->getLogoOffSetField());
     $fields->addFieldToTab('Root.Main', $mobileLogoField);
     $fields->addFieldToTab('Root.Main', $this->getMobileLogoOffSetField());
     //Footer
     $fields->addFieldToTab('Root.Footer', $footerLogoField = new UploadField('FooterLogo', 'Footer logo, to appear in the bottom right.'));
     $footerLogoField->setAllowedFileCategories('image');
     $footerLogoField->setConfig('allowedMaxFileNumber', 1);
     $fields->addFieldToTab('Root.Footer', $footerLink = new TextField('FooterLogoLink', 'Footer Logo link'));
     $footerLink->setRightTitle('Please include the protocol (ie, http:// or https://) unless it is an internal link.');
     $fields->addFieldToTab('Root.Footer', new TextField('FooterLogoDescription', 'Footer Logo description'));
     $fields->addFieldToTab('Root.Footer', new TreeMultiselectField('FooterLinks', 'Footer Links', 'SiteTree'));
     $fields->addFieldToTab('Root.Footer', new TextField('Copyright', 'Copyright'));
 }
开发者ID:guru-digital,项目名称:gdm-ss-express,代码行数:27,代码来源:SSGDMExpressSiteConfig.php

示例2: updateCMSFields

 /**
  * standard SS method
  * @var Array
  **/
 public function updateCMSFields(FieldList $fields)
 {
     //separate MetaTitle
     if (Config::inst()->get("MetaTagsContentControllerEXT", "use_separate_metatitle") == 1) {
         $fields->addFieldToTab('Root.Main.Metadata', $allowField0 = new TextField('MetaTitle', _t('SiteTree.METATITLE', 'Meta Title')), "MetaDescription");
         $allowField0->setRightTitle(_t("SiteTree.METATITLE_EXPLANATION", "Leave this empty to use the page title"));
     }
     //info about automation
     $fields->addFieldToTab('Root.Main.Metadata', $allowField1 = new CheckboxField('AutomateMetatags', _t('MetaManager.UPDATEMETA', 'Automatically update Meta Description and Navigation Label? ')));
     $automatedFields = $this->updatedFieldsArray();
     $updatedFieldString = "";
     if (count($automatedFields)) {
         $updatedFieldString = "" . _t("MetaManager.UPDATED_EXTERNALLY", "Based on your current settings, the following fields will be automatically updated at all times") . ": <em>" . implode("</em>, <em>", $automatedFields) . "</em>.";
         foreach ($automatedFields as $fieldName => $fieldTitle) {
             $oldField = $fields->dataFieldByName($fieldName);
             if ($oldField) {
                 $newField = $oldField->performReadonlyTransformation();
                 //$newField->setTitle($newField->Title());
                 $newField->setRightTitle(_t("MetaTags.AUTOMATICALLY_UPDATED", "Automatically updated when you save this page (see metadata settings)."));
                 $fields->replaceField($fieldName, $newField);
             }
         }
     }
     $fields->removeByName('ExtraMeta');
     $linkToManager = Config::inst()->get("MetaTagCMSControlPages", "url_segment") . '/';
     $fields->addFieldToTab('Root.Main.Metadata', new LiteralField("LinkToManagerHeader", "<blockquote style='padding-left: 12px;'>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tOpen the Meta Tag Manager to\n\t\t\t\t\t\t<a href=\"{$linkToManager}\" target=\"_blank\">Review and Edit</a>\n\t\t\t\t\t\tthe Meta Data for all pages on this site.\n\t\t\t\t\t\tAlso make sure to review the general settings for\n\t\t\t\t\t\t<a href=\"/admin/settings/\">Search Engines</a>. {$updatedFieldString}\n\t\t\t\t\t</p>\n\t\t\t\t</blockquote>"));
     if ($this->owner->URLSegment == RootURLController::get_default_homepage_link()) {
         $newField = $fields->dataFieldByName('URLSegment');
         $newField->setRightTitle("Careful: changing the URL from 'home' to anything else means that this page will no longer be the home page");
         $fields->replaceField('URLSegment', $newField);
     }
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:zucchi-metatags,代码行数:37,代码来源:MetaTagsSTE.php

示例3: getCMSFields

 public function getCMSFields()
 {
     //Fetch curret fields and store in Fields
     $fields = parent::getCMSFields();
     //Remove Fields
     $fields->removeFieldFromTab("Root.Main", array("SortOrder", "CalendarID", "Title", "Content", "StartDate", "StartTime", "EndDate", "EndTime", "Location"));
     //Event Title
     $Title = new TextField("Title", "Event Title");
     $Title->setRightTitle("Enter the event title. i.e. sports day.");
     //Start Date & Time
     $StartDate = new DateField("StartDate", "Start Date");
     $StartDate->setConfig('showcalendar', 1);
     $StartDate->setConfig('dateformat', 'dd/MM/YYYY');
     $StartTime = new TimeField("StartTime", "Start Time (Optional)");
     $StartTime->setConfig('use_strtotime', 1);
     //End Date & Time
     $EndDate = new DateField("EndDate", "End Date (Optional)");
     $EndDate->setConfig('showcalendar', 1);
     $EndDate->setConfig('dateformat', 'dd/MM/YYYY');
     $EndTime = new TimeField("EndTime", "End Time (Optional)");
     $StartTime->setConfig('use_strtotime', 1);
     //Location
     $Location = new AddressTextField("Location", "Event Location", "AIzaSyA-folYpPWGiFcpBZURJpf610nO6FJtqqQ");
     $Location->SetRightTitle("Optional. Begin typing and you will see address suggestions (Beta). Powered by Google.");
     $Location->addExtraClass("text");
     //Event Description
     $Description = new HTMLEditorField("Content", "Event Description");
     //Group Start and End Date & Time Fields
     $Times = FieldGroup::create($StartDate, $StartTime, $EndDate, $EndTime)->setTitle('Timings');
     //Add Fields to the CMS
     $fields->addFieldsToTab("Root.Main", array($Title, $Times, $Location, $Description));
     //Return Fields to the CMS
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:torindul-torindul-silverstripe-calendar,代码行数:34,代码来源:CalendarEvent.php

示例4: updateSiteCMSFields

 public function updateSiteCMSFields(FieldList $fields)
 {
     $fields->addFieldToTab('Root.Main', $gaCode = new TextField('GACode', 'Google Analytics account'));
     $gaCode->setRightTitle('Account number to be used all across the site (in the format <strong>UA-XXXXX-X</strong>)');
     $fields->addFieldToTab('Root.SocialMedia', $facebookURL = new TextField('FacebookURL', 'Facebook UID or username'));
     $facebookURL->setRightTitle('Facebook link (everything after the "http://facebook.com/", eg http://facebook.com/<strong>username</strong> or http://facebook.com/<strong>pages/108510539573</strong>)');
     $fields->addFieldToTab('Root.SocialMedia', $twitterUsername = new TextField('TwitterUsername', 'Twitter username'));
     $twitterUsername->setRightTitle('Twitter username (eg, http://twitter.com/<strong>username</strong>)');
     $fields->addFieldToTab('Root.SocialMedia', $addThisID = new TextField('AddThisProfileID', 'AddThis Profile ID'));
     $addThisID->setRightTitle('Profile ID to be used all across the site (in the format <strong>ra-XXXXXXXXXXXXXXXX</strong>)');
     $fields->addFieldToTab('Root.Logos/Icons', $favIconField = new UploadField('FavIcon', 'Favicon, in .ico format, dimensions of 16x16, 32x32, or 48x48'));
     $favIconField->getValidator()->setAllowedExtensions(array('ico'));
     $favIconField->setConfig('allowedMaxFileNumber', 1);
     $fields->addFieldToTab('Root.Logos/Icons', $atIcon144 = new UploadField('AppleTouchIcon144', 'Apple Touch Web Clip and Windows 8 Tile Icon (dimensions of 144x144, PNG format)'));
     $atIcon144->getValidator()->setAllowedExtensions(array('png'));
     $atIcon144->setConfig('allowedMaxFileNumber', 1);
     $fields->addFieldToTab('Root.Logos/Icons', $atIcon114 = new UploadField('AppleTouchIcon114', 'Apple Touch Web Clip Icon (dimensions of 114x114, PNG format)'));
     $atIcon114->getValidator()->setAllowedExtensions(array('png'));
     $atIcon114->setConfig('allowedMaxFileNumber', 1);
     $fields->addFieldToTab('Root.Logos/Icons', $atIcon72 = new UploadField('AppleTouchIcon72', 'Apple Touch Web Clip Icon (dimensions of 72x72, PNG format)'));
     $atIcon72->getValidator()->setAllowedExtensions(array('png'));
     $atIcon72->setConfig('allowedMaxFileNumber', 1);
     $fields->addFieldToTab('Root.Logos/Icons', $atIcon57 = new UploadField('AppleTouchIcon57', 'Apple Touch Web Clip Icon (dimensions of 57x57, PNG format)'));
     $atIcon57->getValidator()->setAllowedExtensions(array('png'));
     $atIcon57->setConfig('allowedMaxFileNumber', 1);
 }
开发者ID:helpfulrobot,项目名称:silverstripe-australia-ba-sis,代码行数:26,代码来源:SISSite.php

示例5: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     $type = new DropdownField('EventType', _t('ScoutDistrict.Events.TYPE', 'Type'), array('section-meeting' => _t('ScoutDistrict.Enum.SECTIONMEETING', 'Section Meeting'), 'leaders-meeting' => _t('ScoutDistrict.Enum.LEADERSMEETING', 'Leaders Meeting'), 'activity' => _t('ScoutDistrict.Enum.ACTIVITY', 'Activity'), 'fundraising' => _t('ScoutDistrict.Enum.FUNDRAISING', 'Fundraising'), 'committee' => _t('ScoutDistrict.Enum.COMMITTEE', 'Committee'), 'camp' => _t('ScoutDistrict.Enum.CAMP', 'Camp'), 'group' => _t('ScoutDistrict.Enum.GROUP', 'Group'), 'district' => _t('ScoutDistrict.Enum.DISTRICT', 'District'), 'training' => _t('ScoutDistrict.Enum.TRAINING', 'Training'), 'other' => _t('ScoutDistrict.Enum.OTHER', 'Other')));
     $type->setRightTitle(_t('ScoutDistrict.Events.TYPE_HELP', 'What Type of event is this'))->addExtraClass('help');
     $location = new TextField('EventLocation', _t('ScoutDistrict.Events.LOCATION', 'Location'));
     $location->setRightTitle(_t('ScoutDistrict.Events.LOCATION_HELP', 'Where is the event being held'))->addExtraClass('help');
     $latitude = new TextField('EventLatitude', _t('ScoutDistrict.Events.LATITUDE', 'Latitude'));
     $latitude->setRightTitle(_t('ScoutDistrict.Events.LATITUDE_HELP', 'Latitude of event Location'))->addExtraClass('help');
     $longitude = new TextField('EventLongitude', _t('ScoutDistrict.Events.LONGITUDE', 'Longitude'));
     $longitude->setRightTitle(_t('ScoutDistrict.Events.LONGITUDE_HELP', 'Longitude of event Location'))->addExtraClass('help');
     $bookingDetails = new TextareaField('EventBookingDetails', _t('ScoutDistrict.Events.BOOKINGDETAILS', 'Booking Details'));
     $bookingDetails->setRightTitle(_t('ScoutDistrict.Events.BOOKINGDETAILS_HELP', 'Details of how to book a place for the Event'))->addExtraClass('help');
     $bookingURL = new TextField('EventBookingURL', _t('ScoutDistrict.Events.BOOKINGURL', 'Booking URL'));
     $bookingURL->setRightTitle(_t('ScoutDistrict.Events.BOOKINGURL_HELP', 'The URL of an external site to book a place'))->addExtraClass('help');
     $fields->addFieldsToTab('Root.Scouts', array($type, $location, $latitude, $longitude, $bookingDetails, $bookingURL));
     $thumbnail = new UploadField('ThumbnailImage', _t('ScoutDistrict.Events.THUMBNAIL', 'Thumbnail Image'));
     $thumbnail->setFolderName('event/thumbnail');
     $thumbnail->setRightTitle(_t('ScoutDistrict.Events.THUMBNAIL_HELP', 'A small image for displaying in listing/aggregated content'))->addExtraClass('help');
     $image = new UploadField('Image', _t('ScoutDistrict.Events.IMAGE', 'Image'));
     $image->setFolderName('event/image');
     $image->setRightTitle(_t('ScoutDistrict.Events.IMAGE_HELP', 'A Larger image for displaying in event header'))->addExtraClass('help');
     $files = new UploadField('Files', _t('ScoutDistrict.Events.FILE', 'Files'));
     $files->setFolderName('event/file');
     $files->setRightTitle(_t('ScoutDistrict.Events.FILE_HELP', 'This can be a file containing information about the event or an application form, etc'))->addExtraClass('help');
     $fields->addFieldsToTab('Root.Files', array($thumbnail, $image, $files));
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:phpboyscout-silverstripe-scouts,代码行数:27,代码来源:ScoutCalenderEventExtension.php

示例6: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     $metaFieldTitle = new TextField("MetaTitle", $this->owner->fieldLabel('MetaTitle'));
     $metaFieldTitle->setRightTitle(_t('SiteTree.METATITLEHELP', 'Shown at the top of the browser window and used as the "linked text" by search engines.'))->addExtraClass('help');
     $fields->insertBefore($metaFieldTitle, Config::inst()->get('MetaTitleExtension', 'InsertBefore'));
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:kinglozzer-metatitle,代码行数:7,代码来源:MetaTitleExtension.php

示例7: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $field = new TextField('Mobi2GoStoreName');
     $field->setRightTitle('eg. [store-name].mobi2go.com');
     $fields->addFieldsToTab('Root.Main', $field, 'Metadata');
     $fields->removeFieldFromTab('Root.Main', 'Content');
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:mobi2go-mobi2go-silverstripe,代码行数:9,代码来源:Mobi2GoPage.php

示例8: getFormField

 /**
  * @return TextField|TextareaField
  */
 public function getFormField()
 {
     if ($rows = $this->Rows > 1) {
         $field = new TextareaField($this->getFormFieldName(), $this->Title, $this->Rows);
     } else {
         $field = new TextField($this->getFormFieldName(), $this->Title);
     }
     $field->setRightTitle(sprintf('<a href="#" class="ss-metadatasetfield-showreplacements">Available keyword replacements</a>'));
     return $field;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-australia-metadata,代码行数:13,代码来源:MetadataTextField.php

示例9: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     /* -----------------------------------------
         * Comments
        ------------------------------------------*/
     $fields->findOrMakeTab('Root.Settings.Comments', 'Comments');
     $fields->addFieldsToTab('Root.Settings.Comments', array($disqusForumShortName = new TextField('DisqusForumShortName', 'Disqus forum shortname')));
     if (!SiteConfig::current_site_config()->DisqusForumShortName) {
         $disqusForumShortName->setRightTitle('Enables Disqus commenting on blog items. Sign up for your Disqus account at: <a href="http://disqus.com/" target="_blank">http://disqus.com/</a>');
     }
 }
开发者ID:ormandroid,项目名称:ss_boilerplate,代码行数:11,代码来源:BlogConfig.php

示例10: getCMSFields

 /**
  *
  *@return FieldList
  **/
 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $dispatchedOnLabel = _t("OrderStatusLog.DISPATCHEDON", "Dispatched on");
     $fields->replaceField("DispatchedOn", $dispatchedOnField = new TextField("DispatchedOn", $dispatchedOnLabel));
     $dispatchedOnField->setRightTitle(_t("OrderStatusLog.DISPATCHED_ON_NOTE", "Please use year-month-date, e.g. 2015-11-23"));
     $dispatchLinkField = $fields->dataFieldByName("DispatchLink");
     $dispatchLinkField->setRightTitle(_t("OrderStatusLog.LINK_EXAMPLE", "e.g. http://www.ups.com/mytrackingnumber"));
     $dispatchLinkField = $fields->dataFieldByName("Note");
     $dispatchLinkField->setTitle(_t("OrderStatusLog.NOTE_NEW_TITLE", "Customer Message (*)"));
     $dispatchLinkField->setRightTitle(_t("OrderStatusLog.NOTE_NOTE", "This field is required"));
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-ecommerce,代码行数:17,代码来源:OrderStatusLog_DispatchPhysicalOrder.php

示例11: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     /* -----------------------------------------
         * Advanced
        ------------------------------------------*/
     $fields->addFieldToTab('Root.Main', new HeaderField('', _t('PortfolioHolder.SettingsText', 'Settings')), 'Content');
     $fields->addFieldToTab('Root.Main', $items = new TextField('Items', 'Items'), 'Content');
     $items->setRightTitle('How many items to display on each page');
     $fields->addFieldToTab('Root.Main', $columns = new DropdownField('Columns', 'Columns', array('One Item (Full Width)', 'Two Items', 'Three Items', 'Four Items')), 'Content');
     $columns->setRightTitle('How many items to display on each row');
     return $fields;
 }
开发者ID:ormandroid,项目名称:ss_boilerplate,代码行数:13,代码来源:PortfolioHolder.php

示例12: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->addFieldToTab("Root.Profiles", $defaultEmailTextField = new TextField("DefaultEmail"));
     $defaultEmailTextField->setRightTitle(_t("StaffProfilesPage.DEFAULT_EMAIL_EXPLANATION", "This is the default email that will be used if a staff member does not have a unique email"));
     $fields->addFieldToTab("Root.Profiles", $subjectLineTextField = new TextField("SubjectLine"));
     $subjectLineTextField->setRightTitle(_t("StaffProfilesPage.SUBJECT_LINE_EXPLANATION", "Subject line for email, you can use [" . implode("], [", array_keys(Config::inst()->get("StaffProfile", "subject_place_holders"))) . "]" . " as placeholders"));
     $fields->addFieldToTab("Root.Profiles", new GridField("StaffProfiles", "Staff Profiles", StaffProfile::get(), $config = GridFieldConfig_RelationEditor::create()));
     if (class_exists("GridFieldSortableRows")) {
         $config->addComponent(new GridFieldSortableRows('Sort'));
     }
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:linkdup-silverstripe-staffprofiles,代码行数:13,代码来源:StaffProfilesPage.php

示例13: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     $geoCountry = new CountryDropdownField('GeoCountry', _t('GeoTags.GEOCOUNTRY', 'Country'));
     $geoCountry->setRightTitle(_t('GeoTags.GEOCOUNTY_HELP', 'The Country of origin'))->addExtraClass('help');
     $geoRegion = new TextField('GeoRegion', _t('GeoTags.GEOREGION', 'REGION'));
     $geoRegion->setRightTitle(_t('GeoTags.GEOREGION_HELP', 'The Region in the Country of origin. Must use appropriate iso3166 region code'))->addExtraClass('help');
     $geoPlacename = new TextField('GeoPlacename', _t('GeoTags.GEOPLACENAME', 'Placename'));
     $geoPlacename->setRightTitle(_t('GeoTags.GEOPLACENAME_HELP', 'The Placename tag is provided primarily for resource recognition; it is anticipated that this field be harvested by automated agents and presented to the user in search engine results in a similar manner to the description META tag. This field is free-text, and typically would be used for city, county and state names. It could, however, be used for resource discovery'))->addExtraClass('help');
     $geoLong = new TextField('GeoLongitude', _t('GeoTags.GEOLONGITUDE', 'Longitude'));
     $geoLong->setRightTitle(_t('GeoTags.GEOLONGITUDE_HELP', 'The Longitude for the location'))->addExtraClass('help');
     $geoLat = new TextField('GeoLatitude', _t('GeoTags.GEOLATITUDE', 'Latitude'));
     $geoLat->setRightTitle(_t('GeoTags.GEOLATITUDE_HELP', 'The Latitude for the location'))->addExtraClass('help');
     $fields->addFieldsToTab('Root.GeoTags', array($geoCountry, $geoRegion, $geoPlacename, $geoLong, $geoLat));
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:zucchi-geotags,代码行数:15,代码来源:GeoTagsExtension.php

示例14: getCMSFields

 function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->removeFieldFromTab('Root.Main', 'Content');
     $fields->addFieldToTab('Root.Main', $url = new TextField('IFrameURL', 'Iframe URL'), 'Metadata');
     $url->setRightTitle('Can be absolute (<em>http://silverstripe.com</em>) or relative to this site (<em>about-us</em>).');
     $fields->addFieldToTab('Root.Main', DropdownField::create('ForceProtocol', 'Force protocol?')->setSource(array('http://' => 'http://', 'https://' => 'https://'))->setEmptyString('')->setDescription('Avoids mixed content warnings when iframe content is just available under a specific protocol'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new CheckboxField('AutoHeight', 'Auto height (only works with same domain URLs)'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new CheckboxField('AutoWidth', 'Auto width (100% of the available space)'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new NumericField('FixedHeight', 'Fixed height (in pixels)'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new NumericField('FixedWidth', 'Fixed width (in pixels)'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new HtmlEditorField('Content', 'Content (appears above iframe)'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new HtmlEditorField('BottomContent', 'Content (appears below iframe)'), 'Metadata');
     $fields->addFieldToTab('Root.Main', new HtmlEditorField('AlternateContent', 'Alternate Content (appears when user has iframes disabled)'), 'Metadata');
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-iframe,代码行数:16,代码来源:IFramePage.php

示例15: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     /* -----------------------------------------
         * Settings
        ------------------------------------------*/
     $fields->addFieldToTab('Root.Main', $columns = new DropdownField('Columns', _t('BlogHolder.ColumnsLabel', 'Columns'), array('One Item (Full Width)', 'Two Items', 'Three Items', 'Four Items')), 'Content');
     $columns->setRightTitle('Items per row');
     $fields->addFieldToTab('Root.Main', $items = new TextField('Items', _t('BlogHolder.ItemsLabel', 'Items')), 'Content');
     $items->setRightTitle('Items displayed per page');
     /* -----------------------------------------
         * Blog Sidebar
        ------------------------------------------*/
     $fields->addFieldToTab('Root.BlogSidebar', new HtmlEditorField('BlogSidebarContent', _t('BlogHolder.BlogSidebarLabel', 'Content For the Sidebar')));
     return $fields;
 }
开发者ID:ormandroid,项目名称:ss_boilerplate,代码行数:16,代码来源:BlogHolder.php


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