本文整理匯總了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();
}