當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。