本文整理汇总了PHP中WFDocument::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP WFDocument::getInstance方法的具体用法?PHP WFDocument::getInstance怎么用?PHP WFDocument::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WFDocument
的用法示例。
在下文中一共展示了WFDocument::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Display the plugin
*/
function display()
{
parent::display();
$document = WFDocument::getInstance();
$settings = $this->getSettings();
if ($document->get('standalone') == 1) {
$document->addScript(array('browser'), 'component');
// load the language file
if (is_file(WF_EDITOR . DS . 'tiny_mce' . DS . 'langs' . DS . $this->getLanguage() . '_dlg.js')) {
$document->addScript(array('langs/' . $this->getLanguage() . '_dlg.js'), 'tiny_mce');
} else {
$document->addScript(array('langs/en_dlg.js'), 'tiny_mce');
}
$options = array('plugin' => array('root' => JURI::root(), 'site' => JURI::base(true) . '/'), 'manager' => $settings);
// add element
if (JRequest::getCmd('element')) {
$options['element'] = JRequest::getCmd('element');
}
$document->addScriptDeclaration('jQuery(document).ready(function($){$.WFBrowserWidget.init(' . json_encode($options) . ');});');
$document->addStyleSheet(array('dialog'), 'libraries');
} else {
$document->addScript(array('browser'), 'plugins');
$document->addScriptDeclaration('BrowserDialog.settings=' . json_encode($settings) . ';');
}
}
示例2: display
function display()
{
// Load css
$document = WFDocument::getInstance();
$document->addStyleSheet(array('flexicontentlinks'), 'extensions/links/flexicontentlinks/css');
// убрать?
}
示例3: display
public function display()
{
parent::display();
$document = WFDocument::getInstance();
// get all popups extensions
$popups = parent::loadExtensions('popups');
$config = $this->getProperties();
if ($config) {
// Create global config
$document->addScriptDeclaration('WFExtensions.Popups.setConfig(' . json_encode($config) . ');');
}
// Create an instance of each popup and check if enabled
foreach ($popups as $name) {
$popup = $this->getPopupExtension($name);
if ($popup->isEnabled()) {
$this->addPopup($name);
$params = $popup->getParams();
if (!empty($params)) {
$document->addScriptDeclaration('WFExtensions.Popups.setParams("' . $name . '",' . json_encode($params) . ');');
}
}
}
$tabs = WFTabs::getInstance();
// Add popup tab and assign popups reference to document
if (count($this->getPopups())) {
$tabs->addTab('popups', 1);
$tabs->getPanel('popups')->assign('popups', $this);
}
}
示例4: display
public function display()
{
parent::display();
$document = WFDocument::getInstance();
$document->addScript(array('link'), 'extensions.search.js');
$document->addStylesheet(array('link'), 'extensions.search.css');
}
示例5: display
public function display()
{
parent::display();
$document = WFDocument::getInstance();
$document->addScript(array('clipboard'), 'plugins');
$document->addStyleSheet(array('clipboard'), 'plugins');
}
示例6: display
/**
* Display the plugin
*/
public function display() {
parent::display();
$document = WFDocument::getInstance();
$document->addScript(array('mediamanager'), 'plugins');
$document->addStyleSheet(array('mediamanager'), 'plugins');
$settings = $this->getSettings();
$document->addScriptDeclaration('MediaManagerDialog.settings=' . json_encode($settings) . ';');
$tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));
// Add tabs
$tabs->addTab('file', 1, array('plugin' => $this));
$tabs->addTab('media', $this->getParam('tabs_media', 1), array('plugin' => $this));
$tabs->addTab('advanced', $this->getParam('tabs_advanced', 1));
// Load Popups instance
$popups = WFPopupsExtension::getInstance(array(
// map src value to popup link href
'map' => array('href' => 'src'),
'default' => $this->getParam('mediamanager.popups.default', '')
));
$popups->display();
// Load Media Player instance
$mediaplayer = $this->getMediaPlayer();
$mediaplayer->display();
// Load video aggregators (Youtube, Vimeo etc)
$this->loadAggregators();
}
示例7: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
function __construct()
{
parent::__construct();
$document =& WFDocument::getInstance();
// Load Extensions Object
$document->addScript(array('extensions'));
}
示例8: display
function display()
{
parent::display();
$document = WFDocument::getInstance();
$document->addScript(array('paste'), 'plugins');
$document->addStyleSheet(array('paste'), 'plugins');
}
示例9: display
public function display()
{
$document = WFDocument::getInstance();
$view = $this->getView();
$view->addTemplatePath(WF_EDITOR_PLUGIN . '/tmpl');
$document->setTitle(WFText::_('WF_' . strtoupper($this->getName() . '_TITLE')));
$theme = $this->getParam('source.theme', 'textmate');
//$editor = 'codemirror';
$document->addScript(array('tiny_mce_popup'), 'tiny_mce');
$document->addScript(array('editor', 'format'), 'plugins');
$document->addStyleSheet(array('editor'), 'plugins');
$document->addScript(array('codemirror-compressed'), 'jce.tiny_mce.plugins.source.js.codemirror');
$document->addStyleSheet(array('codemirror', 'theme/' . $theme), 'jce.tiny_mce.plugins.source.css.codemirror');
/*switch ($editor) {
case 'ace':
$document->addScript(array('ace', 'mode-html'), 'jce.tiny_mce.plugins.source.js.ace');
if ($theme != 'textmate') {
$document->addScript(array('theme-' . $theme), 'jce.tiny_mce.plugins.source.js.ace');
}
break;
case 'codemirror':
$document->addScript(array('codemirror-compressed'), 'jce.tiny_mce.plugins.source.js.codemirror');
$document->addStyleSheet(array('codemirror', 'theme/' . $theme), 'jce.tiny_mce.plugins.source.css.codemirror');
break;
}*/
}
示例10: display
/**
* Display the plugin
* @access public
*/
public function display() {
parent::display();
$document = WFDocument::getInstance();
$settings = $this->getSettings();
if ($document->get('standalone') == 1) {
$document->addScript(array('browser'), 'component');
$element = JRequest::getCmd('element', '');
$options = array(
'plugin' => array(
'root' => JURI::root(),
'site' => JURI::base(true) . '/'
),
'manager' => $settings,
'element' => $element
);
$document->addScriptDeclaration('jQuery(document).ready(function($){$.WFBrowserWidget.init(' . json_encode($options) . ');});');
$document->addStyleSheet(array(
'dialog'
), 'libraries');
} else {
$document->addScript(array('browser'), 'plugins');
$document->addScriptDeclaration('BrowserDialog.settings=' . json_encode($settings) . ';');
}
}
示例11: display
public function display()
{
parent::display();
$document = WFDocument::getInstance();
$document->addScript(array('link.full'), 'libraries');
foreach ($this->extensions as $extension) {
$extension->display();
}
}
示例12: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
function __construct($options = array())
{
// only if enabled
if (self::isEnabled()) {
$document = WFDocument::getInstance();
$document->addScript('window', 'extensions/popups/window/js');
$document->addStyleSheet('window', 'extensions/popups/window/css');
}
}
示例13: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
public function __construct()
{
if (self::isEnabled()) {
$scripts = array();
$document = WFDocument::getInstance();
$document->addScript('widgetkit', 'extensions/popups/widgetkit/js');
$document->addStyleSheet('widgetkit', 'extensions/popups/widgetkit/css');
}
}
示例14: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
function __construct($options = array())
{
if (self::isEnabled()) {
$scripts = array();
$document = WFDocument::getInstance();
$document->addScript('rokbox', 'extensions/popups/rokbox/js');
$document->addStyleSheet('rokbox', 'extensions/popups/rokbox/css');
}
}
示例15: display
public function display()
{
parent::display();
$document = WFDocument::getInstance();
$document->addScript(array('colorpicker'), 'libraries');
$document->addScript(array('colorpicker'), 'plugins');
$document->addStyleSheet(array('colorpicker'), 'plugins');
$document->addScriptDeclaration('ColorPicker.settings=' . json_encode($this->getSettings()) . ';');
}