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


PHP CheckboxField::setId方法代码示例

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


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

示例1: __construct

 /**
  * Class constructor
  *
  */
 public function __construct($plugins)
 {
     parent::__construct('configForm');
     $language = OW::getLanguage();
     $values = OW::getConfig()->getValues('uheader');
     if ($plugins['photo']) {
         $field = new CheckboxField('photo_share');
         $field->setId('photo_share_check');
         $field->setValue($values['photo_share']);
         $this->addElement($field);
         $field = new TextField('photo_album_name');
         $field->setValue(OW::getLanguage()->text('uheader', 'default_photo_album_name'));
         $field->setRequired();
         $this->addElement($field);
     }
     $field = new TextField('cover_height');
     $field->setValue($values['cover_height']);
     $field->addValidator(new IntValidator(self::COVER_MIN_HEIGHT, self::COVER_MAX_HEIGHT));
     $field->setRequired();
     $this->addElement($field);
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('uheader', 'config_save_label'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:29,代码来源:admin.php

示例2: __construct

 /**
  * Class constructor
  *
  */
 public function __construct($plugins)
 {
     parent::__construct('configForm');
     $language = OW::getLanguage();
     $values = OW::getConfig()->getValues('attachments');
     if ($plugins['video']) {
         $field = new CheckboxField('video_share');
         $field->setValue($values['video_share']);
         $this->addElement($field);
     }
     if ($plugins['links']) {
         $field = new CheckboxField('link_share');
         $field->setValue($values['link_share']);
         $this->addElement($field);
     }
     if ($plugins['photo']) {
         $field = new CheckboxField('photo_share');
         $field->setId('photo_share_check');
         $field->setValue($values['photo_share']);
         $this->addElement($field);
         $field = new TextField('photo_album_name');
         $field->setValue(OW::getLanguage()->text('attachments', 'default_photo_album_name'));
         $field->setRequired();
         $this->addElement($field);
     }
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('attachments', 'config_save_label'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:34,代码来源:admin.php

示例3: __construct

 /**
  * Class constructor
  *
  */
 public function __construct()
 {
     parent::__construct('configForm');
     $language = OW::getLanguage();
     $values = OW::getConfig()->getValues('utags');
     $field = new CheckboxField('copy_photo');
     $field->setId('copy_photo_check');
     $field->setValue($values['copy_photo']);
     $this->addElement($field);
     $field = new TextField('photo_album_name');
     $field->setValue(OW::getLanguage()->text('utags', 'default_photo_album_name'));
     $field->setRequired();
     $this->addElement($field);
     $field = new CheckboxField('crop_photo');
     $field->setValue($values['crop_photo']);
     $this->addElement($field);
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('utags', 'config_save_label'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:25,代码来源:admin.php

示例4: __construct

 public function __construct($entityType, $actions, $features, $info)
 {
     parent::__construct("HINT_ConfigurationForm");
     $language = OW::getLanguage();
     $this->actions = $actions;
     $this->entityType = $entityType;
     // Actions
     foreach ($actions as $action) {
         $field = new CheckboxField("action-" . $action["key"]);
         $field->setId("action-" . $action["key"]);
         $field->addAttribute("data-key", $action["key"]);
         $field->setValue($action["active"]);
         $field->setLabel($action["label"]);
         $field->addAttribute("class", "h-refresher");
         $this->addElement($field);
     }
     // Additional Features
     $field = new CheckboxField("uheader_enabled");
     $field->setId("feature_uheader");
     $field->setValue($features["cover"]);
     $field->addAttribute("class", "h-refresher");
     $field->addAttribute("data-key", "cover");
     $this->addElement($field);
     // User Information
     $line0Options = HINT_BOL_Service::getInstance()->getInfoLineSettings($entityType, HINT_BOL_Service::INFO_LINE0);
     $field = new Selectbox("info_" . HINT_BOL_Service::INFO_LINE0);
     $field->setId("info0");
     foreach ($line0Options as $lineOption) {
         $field->addOption($lineOption["key"], $lineOption["label"]);
     }
     if (!empty($info[HINT_BOL_Service::INFO_LINE0]["key"])) {
         $field->setValue($info[HINT_BOL_Service::INFO_LINE0]["key"]);
     }
     $this->addElement($field);
     $questions = $this->findQuestions();
     $questionOptions = array();
     foreach ($questions as $question) {
         $questionOptions[$question->name] = BOL_QuestionService::getInstance()->getQuestionLang($question->name);
     }
     $field = new Selectbox("info_" . HINT_BOL_Service::INFO_LINE0 . "_question");
     $field->setId("info0_q");
     $field->setOptions($questionOptions);
     if (!empty($info[HINT_BOL_Service::INFO_LINE0]["question"])) {
         $field->setValue($info[HINT_BOL_Service::INFO_LINE0]["question"]);
     }
     $this->addElement($field);
     $line1Options = HINT_BOL_Service::getInstance()->getInfoLineSettings($entityType, HINT_BOL_Service::INFO_LINE1);
     $field = new Selectbox("info_" . HINT_BOL_Service::INFO_LINE1);
     $field->setId("info1");
     foreach ($line1Options as $lineOption) {
         $field->addOption($lineOption["key"], $lineOption["label"]);
     }
     if (!empty($info[HINT_BOL_Service::INFO_LINE1]["key"])) {
         $field->setValue($info[HINT_BOL_Service::INFO_LINE1]["key"]);
     }
     $this->addElement($field);
     $field = new Selectbox("info_" . HINT_BOL_Service::INFO_LINE1 . "_question");
     $field->setId("info1_q");
     $field->setOptions($questionOptions);
     if (!empty($info[HINT_BOL_Service::INFO_LINE1]["question"])) {
         $field->setValue($info[HINT_BOL_Service::INFO_LINE1]["question"]);
     }
     $this->addElement($field);
     $line2Options = HINT_BOL_Service::getInstance()->getInfoLineSettings($entityType, HINT_BOL_Service::INFO_LINE2);
     $field = new Selectbox("info_" . HINT_BOL_Service::INFO_LINE2);
     $field->setId("info2");
     foreach ($line2Options as $lineOption) {
         $field->addOption($lineOption["key"], $lineOption["label"]);
     }
     if (!empty($info[HINT_BOL_Service::INFO_LINE2]["key"])) {
         $field->setValue($info[HINT_BOL_Service::INFO_LINE2]["key"]);
     }
     $this->addElement($field);
     $field = new Selectbox("info_" . HINT_BOL_Service::INFO_LINE2 . "_question");
     $field->setId("info2_q");
     $field->setOptions($questionOptions);
     if (!empty($info[HINT_BOL_Service::INFO_LINE2]["question"])) {
         $field->setValue($info[HINT_BOL_Service::INFO_LINE2]["question"]);
     }
     $this->addElement($field);
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('hint', 'admin_save_btn'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:85,代码来源:admin.php


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