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