当前位置: 首页>>代码示例>>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;未经允许,请勿转载。