本文整理汇总了PHP中Editor::setWidth方法的典型用法代码示例。如果您正苦于以下问题:PHP Editor::setWidth方法的具体用法?PHP Editor::setWidth怎么用?PHP Editor::setWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Editor
的用法示例。
在下文中一共展示了Editor::setWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}