本文整理汇总了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;
}
示例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;
}