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


PHP ReadonlyField::setRightTitle方法代码示例

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


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

示例1: updateSettingsFields

 /**
  * standard SS method
  * @var Array
  **/
 public function updateSettingsFields(FieldList $fields)
 {
     $fields->addFieldToTab("Root.Facebook", new HeaderField(_t("MetaTagsSTE.FB_HOW_THIS_PAGE_IS_SHARED", "How is this page shared on Facebook?")));
     $fields->addFieldToTab("Root.Facebook", $fieldTitle = new ReadonlyField("fb_title", _t("MetaTagsSTE.FB_TITLE", "Title"), $this->owner->Title));
     $fields->addFieldToTab("Root.Facebook", $fieldType = new ReadonlyField("fb_type", _t("MetaTagsSTE.FB_TITLE", "Type"), "website"));
     $fields->addFieldToTab("Root.Facebook", $fieldSiteName = new ReadonlyField("fb_type", _t("MetaTagsSTE.FB_SITE_NAME", "Site Name"), SiteConfig::current_site_config()->Title));
     $fields->addFieldToTab("Root.Facebook", $fieldDescription = new ReadonlyField("fb_description", _t("MetaTagsSTE.FB_DESCRIPTION", "Description (from MetaDescription)"), $this->owner->MetaDescription));
     $fields->addFieldToTab("Root.Facebook", $shareOnFacebookImageField = new UploadField("ShareOnFacebookImage", _t("MetaTagsSTE.FB_IMAGE", "Image")));
     $shareOnFacebookImageField->setFolderName("OpenGraphShareImages");
     $shareOnFacebookImageField->setRightTitle("Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images that are 600 x 315 pixels to display link page posts with larger images.");
     $fields->addFieldToTab("Root.Facebook", $shareOnFacebookImageField = new LiteralField("fb_try_it_out", '<h3><a href="https://www.facebook.com/sharer/sharer.php?u=' . urlencode($this->owner->AbsoluteLink()) . '">' . _t("MetaTagsSTE.FB_TRY_IT_OUT", "Share on Facebook Now") . '</a></h3>', $this->owner->ShareOnFacebookImage()));
     //right titles
     $fieldTitle->setRightTitle(_t("MetaTagsSTE.FB_TITLE_RIGHT", "Uses the Page Title"));
     $fieldType->setRightTitle(_t("MetaTagsSTE.FB_TYPE_RIGHT", "Can not be changed"));
     $fieldSiteName->setRightTitle(_t("MetaTagsSTE.FB_SITE_NAME_RIGHT", "Can be set in the site settings"));
     $fieldDescription->setRightTitle(_t("MetaTagsSTE.FB_DESCRIPTION", "Description is set in the Metadata section of each page."));
     $shareOnFacebookImageField->setRightTitle(_t("MetaTagsSTE.FB_HOW_TO_CHOOSE_IMAGE", "If no image is set then the Facebook user can choose an image from the page - with options retrieved by Facebook."));
 }
开发者ID:helpfulrobot,项目名称:zucchi-metatags,代码行数:22,代码来源:MetaTagsSTE.php

示例2: getCMSFields

 /**
  */
 public function getCMSFields()
 {
     $cmsUsers = Member::mapInCMSGroups();
     $fields = new FieldList(new TabSet('Root'));
     $fields->addFieldToTab('Root.Main', new TextField('Title', _t('WorkflowDefinition.TITLE', 'Title')));
     $fields->addFieldToTab('Root.Main', new TextareaField('Description', _t('WorkflowDefinition.DESCRIPTION', 'Description')));
     if ($this->ID) {
         $fields->addFieldToTab('Root.Main', new CheckboxSetField('Users', _t('WorkflowDefinition.USERS', 'Users'), $cmsUsers));
         $fields->addFieldToTab('Root.Main', new TreeMultiselectField('Groups', _t('WorkflowDefinition.GROUPS', 'Groups'), 'Group'));
     }
     if (class_exists('AbstractQueuedJob')) {
         $before = _t('WorkflowDefinition.SENDREMINDERDAYSBEFORE', 'Send reminder email after ');
         $after = _t('WorkflowDefinition.SENDREMINDERDAYSAFTER', ' days without action.');
         $fields->addFieldToTab('Root.Main', new FieldGroup(_t('WorkflowDefinition.REMINDEREMAIL', 'Reminder Email'), new LabelField('ReminderEmailBefore', $before), new NumericField('RemindDays', ''), new LabelField('ReminderEmailAfter', $after)));
     }
     if ($this->ID) {
         if ($this->Template) {
             $template = $this->workflowService->getNamedTemplate($this->Template);
             $fields->addFieldToTab('Root.Main', new ReadonlyField('Template', _t('WorkflowDefinition.TEMPLATE_NAME', 'Source Template'), $this->Template));
             $fields->addFieldToTab('Root.Main', new ReadonlyField('TemplateDesc', _t('WorkflowDefinition.TEMPLATE_INFO', 'Template Info'), $template ? $template->getDescription() : ''));
             $fields->addFieldToTab('Root.Main', $tv = new ReadonlyField('TemplateVersion', _t('WorkflowDefinition:TEMPLATE_VERSION', 'Template Version')));
             $tv->setRightTitle(sprintf(_t('WorkflowDefinition.LATEST_VERSION', 'Latest version is %s'), $template->getVersion()));
         }
         $fields->addFieldToTab('Root.Main', new WorkflowField('Workflow', _t('WorkflowDefinition.WORKFLOW', 'Workflow'), $this));
     } else {
         // add in the 'template' info
         $templates = $this->workflowService->getTemplates();
         if (is_array($templates)) {
             $items = array('' => '');
             foreach ($templates as $template) {
                 $items[$template->getName()] = $template->getName();
             }
             $templates = array_combine(array_keys($templates), array_keys($templates));
             $fields->addFieldToTab('Root.Main', $dd = new DropdownField('Template', _t('WorkflowDefinition.CHOOSE_TEMPLATE', 'Choose template (optional)'), $items));
             $dd->setRightTitle('If set, this workflow definition will be automatically updated if the template is changed');
         }
         $message = _t('WorkflowDefinition.ADDAFTERSAVING', 'You can add workflow steps after you save for the first time.');
         $fields->addFieldToTab('Root.Main', new LiteralField('AddAfterSaving', "<p class='message notice'>{$message}</p>"));
     }
     if ($this->ID && Permission::check('VIEW_ACTIVE_WORKFLOWS')) {
         $active = $this->Instances()->filter(array('WorkflowStatus' => array('Active', 'Paused')));
         $active = new GridField('Active', 'Active Workflow Instances', $active, new GridFieldConfig_RecordEditor());
         $active->getConfig()->removeComponentsByType('GridFieldAddNewButton');
         $active->getConfig()->removeComponentsByType('GridFieldDeleteAction');
         if (!Permission::check('REASSIGN_ACTIVE_WORKFLOWS')) {
             $active->getConfig()->removeComponentsByType('GridFieldEditButton');
             $active->getConfig()->addComponent(new GridFieldViewButton());
             $active->getConfig()->addComponent(new GridFieldDetailForm());
         }
         $completed = $this->Instances()->filter(array('WorkflowStatus' => array('Complete', 'Cancelled')));
         $config = new GridFieldConfig_Base();
         $config->addComponent(new GridFieldEditButton());
         $config->addComponent(new GridFieldDetailForm());
         $completed = new GridField('Completed', 'Completed Workflow Instances', $completed, $config);
         $fields->addFieldToTab('Root.Active', $active);
         $fields->addFieldToTab('Root.Completed', $completed);
     }
     return $fields;
 }
开发者ID:normann,项目名称:advancedworkflow,代码行数:61,代码来源:WorkflowDefinition.php


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