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


PHP CheckboxField::FieldHolder方法代码示例

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


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

示例1: FieldHolder

 public function FieldHolder()
 {
     $html = "<div class=\"display_anything_field upload_anything_field\">";
     $id = $this->controller->{$this->name}()->getField('ID');
     $migrated_value = $this->controller->{$this->name}()->getField('Migrated');
     $migrator = FALSE;
     if ($this->detect_image_gallery_module && $migrated_value == 0) {
         //display only if we want to detect imagegallery albums and it's not already migrated
         $list = $this->ImageGalleryAlbums();
         if (!empty($list)) {
             $migrator = TRUE;
             $html .= "<div class=\"field_content migrate\">";
             $html .= "<fieldset><h5>Display Anything has detected an ImageGallery album associated with this page</h5>";
             $html .= "<p>Do you wish to migrate it to your new gallery?<p>";
             $html .= "<p>Migration notes:</p><ul>";
             $html .= "<li>The original ImageGallery album will remain untouched.</li>";
             $html .= "<li>Files will be copied alongside current files, this will allow you to remove the old gallery as and when required.</li>";
             $html .= "</ul>";
             $migrate = new DropDownField("{$this->name}[{$id}][MigrateImageGalleryAlbumID]", "Choose an album to migrate images from", $list, '', NULL, '[Do not migrate]');
             $html .= $migrate->FieldHolder();
             $html .= "</fieldset>";
             $html .= "</div>";
         }
     } else {
         if ($migrated_value == 1) {
             $migrator = TRUE;
         }
     }
     $html .= "<div class=\"field_content\">";
     $html .= "<fieldset><h5>Gallery settings and options</h5>";
     $title = new TextField("{$this->name}[{$id}][Title]", "Title", $this->controller->{$this->name}()->getField('Title'));
     $html .= $title->FieldHolder();
     $description = new TextareaField("{$this->name}[{$id}][Description]", "Description", 3, NULL, $this->controller->{$this->name}()->getField('Description'));
     $html .= $description->FieldHolder();
     $visible = new CheckboxField("{$this->name}[{$id}][Visible]", "Publicly Visible", $this->controller->{$this->name}()->getField('Visible') == 1 ? TRUE : FALSE);
     $html .= $visible->FieldHolder();
     if ($migrator && $migrated_value == 1) {
         //only need to show this post migration
         $migrated = new CheckboxField("{$this->name}[{$id}][Migrated]", "Image Gallery migration complete (uncheck and save to display migration options)", TRUE);
         $html .= $migrated->FieldHolder();
     }
     $html .= "</fieldset></div>";
     $html .= "<div class=\"field_content\">";
     $html .= "<fieldset><h5>Gallery Items</h5>";
     if (!empty($id)) {
         $html .= parent::FieldHolder();
     } else {
         $html .= "<div class=\"message\"><p>Gallery items can be uploaded after the gallery is saved for the first time</p></div>";
     }
     $html .= "</fieldset></div>";
     $html .= "</div>";
     return $html;
 }
开发者ID:nyeholt,项目名称:DisplayAnything,代码行数:53,代码来源:DisplayAnythingGalleryField.php


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