本文整理汇总了PHP中WFModelEditor::buildEditor方法的典型用法代码示例。如果您正苦于以下问题:PHP WFModelEditor::buildEditor方法的具体用法?PHP WFModelEditor::buildEditor怎么用?PHP WFModelEditor::buildEditor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WFModelEditor
的用法示例。
在下文中一共展示了WFModelEditor::buildEditor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onInit
/**
* Method to handle the onInit event.
* - Initializes the JCE WYSIWYG Editor
*
* @access public
* @param $toString Return javascript and css as a string
* @return string JavaScript Initialization string
* @since 1.5
*/
public function onInit()
{
$app = JFactory::getApplication();
$language = JFactory::getLanguage();
$document = JFactory::getDocument();
// set IE mode
//$document->setMetaData('X-UA-Compatible', 'IE=Edge', true);
// Check for existence of Admin Component
if (!is_dir(JPATH_SITE . '/components/com_jce') || !is_dir(JPATH_ADMINISTRATOR . '/components/com_jce')) {
JError::raiseWarning('SOME_ERROR_CODE', 'WF_COMPONENT_MISSING');
}
$language->load('plg_editors_jce', JPATH_ADMINISTRATOR);
$language->load('com_jce', JPATH_ADMINISTRATOR);
// load constants and loader
require_once JPATH_ADMINISTRATOR . '/components/com_jce/includes/base.php';
wfimport('admin.models.editor');
$model = new WFModelEditor();
return $model->buildEditor();
}