本文整理汇总了PHP中Chamilo\CoreBundle\Framework\Container::getHtmlEditor方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::getHtmlEditor方法的具体用法?PHP Container::getHtmlEditor怎么用?PHP Container::getHtmlEditor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chamilo\CoreBundle\Framework\Container
的用法示例。
在下文中一共展示了Container::getHtmlEditor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Class Constructor
* @param string $name
* @param string $elementLabel HTML editor label
* @param array $attributes Attributes for the textarea
* @param array $config Optional configuration settings for the online editor.
*
*/
public function __construct($name = null, $elementLabel = null, $attributes = [], $config = [])
{
if (empty($name)) {
return false;
}
parent::__construct($name, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'html_editor';
$editor = Container::getHtmlEditor();
if ($editor) {
$this->editor = $editor;
$this->editor->setName($name);
$this->editor->processConfig($config);
}
}
示例2: HTML_QuickForm_html_editor
/**
* Class constructor
* @param string HTML editor name/id
* @param string HTML editor label
* @param array Attributes for the textarea
* @param array $config Optional configuration settings for the online editor.
* @return bool
*/
public function HTML_QuickForm_html_editor($name = null, $label = null, $attributes = null, $config = null)
{
if (empty($name)) {
return false;
}
HTML_QuickForm_element::HTML_QuickForm_element($name, $label, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'html_editor';
global $fck_attribute;
$editor = Container::getHtmlEditor();
if ($editor) {
$this->editor = $editor;
$this->editor->setName($name);
$this->editor->processConfig($fck_attribute);
$this->editor->processConfig($config);
}
}