當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Editor::setHeight方法代碼示例

本文整理匯總了PHP中Editor::setHeight方法的典型用法代碼示例。如果您正苦於以下問題:PHP Editor::setHeight方法的具體用法?PHP Editor::setHeight怎麽用?PHP Editor::setHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Editor的用法示例。


在下文中一共展示了Editor::setHeight方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: editor

 /**
  * FormHandler::editor()
  *
  * Create a editor on the form
  *
  * @param string $title: The title of the field
  * @param string $name: The name of the field
  * @param string $validator: The validator which should be used to validate the value of the field
  * @param string $path: Path on the server where we have to upload the files
  * @param string $toolbar: The toolbar we have to use
  * @param string $skin: The skin to use
  * @param int $width: The width of the field
  * @param int $height: The height of the field
  * @param boolean $useArrayKeyAsValue: If the array key's are the values for the options in the field
  * @param string $extra: CSS, Javascript or other which are inserted into the HTML tag
  * @return void
  * @access public
  * @author Teye Heimans
  */
 function editor($title, $name, $validator = null, $path = null, $toolbar = null, $skin = null, $width = null, $height = null, $config = null)
 {
     require_once FH_INCLUDE_DIR . 'fields/class.TextArea.php';
     require_once FH_INCLUDE_DIR . 'fields/class.Editor.php';
     // create a new editor
     $fld = new Editor($this, $name);
     if (!empty($validator)) {
         $fld->setValidator($validator);
     }
     if (!is_null($path)) {
         $fld->setServerPath($path);
     }
     if (!empty($toolbar)) {
         $fld->setToolbar($toolbar);
     }
     if (!empty($skin)) {
         $fld->setSkin($skin);
     }
     if (!empty($width)) {
         $fld->setWidth($width);
     }
     if (!empty($height)) {
         $fld->setHeight($height);
     }
     if (is_array($config)) {
         $fld->setConfig($config);
     }
     // register the field
     $this->_registerField($name, $fld, $title);
 }
開發者ID:jwiegel,項目名稱:FormHandler,代碼行數:49,代碼來源:class.FormHandler.php

示例2: getEditorConfig

 /**
  * A convenience wrapper to create an Editor configuration
  * bean.  Allows for three sizes of editor, SMALL, MEDIUM, and LARGE.
  * If no size is given, it will default to MEDIUM.  Also accepts
  * optional name and content.
  */
 protected function getEditorConfig($size = null, $name = null, $content = null)
 {
     $size_opts = array(EDITOR::SMALL => "150", EDITOR::MEDIUM => "300", EDITOR::LARGE => "400");
     $editor = new Editor();
     $height = $size ? $size_opts[$size] : $size_opts[Editor::MEDIUM];
     $editor->setHeight($height);
     if ($name != null) {
         $editor->setName($name);
     }
     if ($content != null) {
         $editor->setContent($content);
     }
     return $editor;
 }
開發者ID:justinlyon,項目名稱:scc,代碼行數:20,代碼來源:MasterPage.php


注:本文中的Editor::setHeight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。