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


PHP NumericField::setRightTitle方法代码示例

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


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

示例1: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->removeByName("Title");
     $fields->removeByName("animation");
     $fields->removeByName("easing");
     $fields->removeByName("direction");
     $fields->removeByName("reverse");
     $fields->removeByName("dynamicLoading");
     $fields->removeByName("animationLoop");
     $fields->removeByName("slideshow");
     $fields->removeByName("slideshowSpeed");
     $fields->removeByName("animationSpeed");
     $fields->removeByName("randomize");
     $fields->removeByName("showControlNav");
     $animationTypes = $this->dbObject("animation")->enumValues();
     $easingTypes = $this->dbObject("easing")->enumValues();
     $directions = $this->dbObject("direction")->enumValues();
     // Main
     $field_Title = new TextField("Title", _t("FlexSlider.Title"));
     $field_Title->setRightTitle(_t("FlexSlider.TitleDescription"));
     $field_slideshow = new CheckboxField("slideshow", _t("FlexSlider.slideshow"));
     $field_animationLoop = new CheckboxField("animationLoop", _t("FlexSlider.animationLoop"));
     $field_animation = new Dropdownfield("animation", _t("FlexSlider.animationType"), $animationTypes);
     $field_direction = new Dropdownfield("direction", _t("FlexSlider.direction"), $directions);
     $field_easing = new Dropdownfield("easing", _t("FlexSlider.easingType"), $easingTypes);
     $field_easing->setRightTitle(_t("FlexSlider.easingTypeDescription"));
     $field_slideshowSpeedvalue = !$this->ID ? FlexSlider::$defaults["slideshowSpeed"] : $this->slideshowSpeed;
     $field_slideshowSpeed = new NumericField("slideshowSpeed", _t("FlexSlider.slideshowSpeed"), $field_slideshowSpeedvalue);
     $field_slideshowSpeed->setRightTitle(_t("FlexSlider.slideshowSpeedDescription"));
     $field_animationSpeedvalue = !$this->ID ? FlexSlider::$defaults["animationSpeed"] : $this->animationSpeed;
     $field_animationSpeed = new NumericField("animationSpeed", _t("FlexSlider.animationSpeed"), $field_animationSpeedvalue);
     $field_animationSpeed->setRightTitle(_t("FlexSlider.animationSpeedDescription"));
     $field_randomize = new CheckboxField("randomize", _t("FlexSlider.randomize"));
     $field_showControlNav = new CheckboxField("showControlNav", _t("FlexSlider.showControlNav"));
     $FieldsArray = array($field_Title, $field_slideshow, $field_animationLoop, $field_animation, $field_direction, $field_easing, $field_slideshowSpeed, $field_animationSpeed, $field_randomize, $field_showControlNav);
     $fields->addFieldsToTab('Root.Main', $FieldsArray);
     return $fields;
 }
开发者ID:vinstah,项目名称:body,代码行数:39,代码来源:FlexSlider.php

示例2: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->removeFieldFromTab("Root", "Sort");
     $fields->removeFieldFromTab("Root.Main", "AdvertisementImage");
     $fields->removeFieldFromTab("Root.Main", "AdvertisementImageID");
     $fields->removeFieldFromTab("Root.Main", "LinkedPageID");
     $fields->removeFieldFromTab("Root.Main", "ExternalLink");
     $fields->removeFieldFromTab("Root.Parents", "Parents");
     $fields->removeFieldFromTab("Root", "Parents");
     $fields->addFieldToTab("Root.Main", new ReadonlyField("Link"));
     $fields->addFieldToTab("Root.Main", $mainImageField = new UploadField($name = "AdvertisementImage", $title = $this->i18n_singular_name()));
     $mainImageField->setRightTitle(self::recommended_image_size_statement());
     $fields->addFieldToTab("Root.Main", $additionalImageField = new UploadField($name = "AdditionalImage", $title = $this->i18n_singular_name() . " " . _t("Advertisement.ADDITIONAL_IMAGE", "additional image")));
     $additionalImageField->setRightTitle(self::recommended_image_size_statement());
     if ($this->ID) {
         $treeField = new TreeMultiselectField("Parents", _t("Advertisement.GETCMSFIELDSPARENTID", "only show on ... (leave blank to show on all " . $this->i18n_singular_name() . " pages)"), "SiteTree");
         /*$callback = $this->callbackFilterFunctionForMultiSelect();
         		if($callback) {
         			$treeField->setFilterFunction ($callback);
         		}*/
         $fields->addFieldToTab("Root.ShownOn", $treeField);
     }
     $fields->addFieldToTab("Root.OptionalLink", $externalLinkField = new TextField($name = "ExternalLink", $title = _t("Advertisement.GETCMSFIELDSEXTERNALLINK", "link to external site")));
     $externalLinkField->setRightTitle(_t("Advertisement.GETCMSFIELDSEXTERNALLINK_EXPLANATION", "(e.g. http://www.wikipedia.org) - this will override an internal link"));
     $fields->addFieldToTab("Root.OptionalLink", new TreeDropdownField($name = "LinkedPageID", $title = _t("Advertisement.GETCMSFIELDSEXTERNALLINKID", "link to a page on this website"), $sourceObject = "SiteTree"));
     $fields->addFieldToTab("Root.OptionalLink", new CheckboxField($name = "RemoveInternalLink", $title = _t("Advertisement.RemoveInternalLink", "remove internal link")));
     if (class_exists("DataObjectSorterController")) {
         //sorted on parent page...
     } else {
         $fields->addFieldToTab("Root.Position", $sortField = new NumericField("Sort", _t("Advertisement.SORT", "Sort index number")));
         $sortField->setRightTitle(_t("Advertisement.SORT_EXPLANATION", "the lower the number, the earlier it shows"));
     }
     $fields->removeFieldFromTab("Root.Main", "AlternativeSortNumber");
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-advertisements,代码行数:36,代码来源:Advertisement.php


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