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


PHP HTMLEditorField::addExtraClass方法代码示例

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


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

示例1: GameFields

 public function GameFields()
 {
     $fields = new FieldList();
     // get current event
     $siteConfig = SiteConfig::current_site_config();
     $current = $siteConfig->getCurrentEventID();
     $event = Event::get()->byID($current);
     $genres = $this->getGroupedGames('Genre');
     $fields->push(new HiddenField('ID'));
     $fields->push(new TextField('Title'));
     $fields->push(new TextField('Restriction', 'Restriction (R18, PG, etc)'));
     // tag input field
     $fields->push($tagfield = new TextField('Genre', 'Genres'));
     $tagfield->addExtraClass('tag-field genre');
     // hidden field for all current genres
     $fields->push(new LiteralField('GenreList', $this->renderGenreList($genres)));
     $briefEditor = new TextAreaField('Brief', 'Brief (Short Description)');
     $briefEditor->setRows(5);
     $fields->push($briefEditor);
     $detailsEditor = CompositeField::create(new LabelField('GameDetails', 'Game Details'), $html = new HTMLEditorField('Details'), new LiteralField('editorDiv', '<div class="editable"></div>'));
     $fields->push($detailsEditor);
     $html->addExtraClass('hide');
     $detailsEditor->addExtraClass('field');
     $costuming = new TextAreaField('Costuming', 'Costuming');
     $costuming->setRows(5);
     $fields->push($costuming);
     $fields->push(new TextField('NumPlayers', 'Number of players'));
     $sessions = array();
     if ($event) {
         for ($i = 1; $i <= $event->NumberOfSessions; $i++) {
             $sessions[$i] = $i;
         }
         $session = new DropdownField('Session', 'Preferred Session', $sessions);
         $session->setEmptyString(' ');
         $fields->push($session);
     }
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:adrexia-gamesevent,代码行数:38,代码来源:SubmitGamePage.php


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