本文整理汇总了PHP中WFRequest类的典型用法代码示例。如果您正苦于以下问题:PHP WFRequest类的具体用法?PHP WFRequest怎么用?PHP WFRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WFRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
function __construct()
{
parent::__construct();
$request = WFRequest::getInstance();
// Setup plugin XHR callback functions
$request->setRequest(array($this, 'showPreview'));
$this->execute();
}
示例2: __construct
public function __construct()
{
parent::__construct();
$request = WFRequest::getInstance();
$request->setRequest(array($this, 'getFileDetails'));
$browser = $this->getBrowser();
$browser->addEvent('onUpload', array($this, 'onUpload'));
}
示例3: __construct
/**
* @access protected
*/
public function __construct()
{
parent::__construct();
// add a request to the stack
$request = WFRequest::getInstance();
$request->setRequest(array($this, 'loadTemplate'));
if ($this->getParam('allow_save', 1)) {
$request->setRequest(array($this, 'createTemplate'));
}
}
示例4: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
public function __construct()
{
parent::__construct();
$extensions = self::loadExtensions('links');
// Load all link extensions
foreach ($extensions as $link) {
$this->extensions[] = $this->getLinkExtension($link);
}
$request = WFRequest::getInstance();
$request->setRequest(array($this, 'getLinks'));
}
示例5: __construct
/**
* @access protected
*/
public function __construct()
{
// call parent
parent::__construct();
// get the mediaplayer extension
$mediaplayer = $this->getMediaPlayer();
$request = WFRequest::getInstance();
// Setup plugin XHR callback functions
$request->setRequest(array($this, 'getDimensions'));
$request->setRequest(array($this, 'getFileDetails'));
}
示例6: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
public function __construct()
{
parent::__construct();
$engine = $this->getEngine();
if (!$engine) {
self::error('No Spellchecker Engine available');
}
$request = WFRequest::getInstance();
// Setup plugin XHR callback functions
$request->setRequest(array($engine, 'checkWords'));
$request->setRequest(array($engine, 'getSuggestions'));
$request->setRequest(array($engine, 'ignoreWord'));
$request->setRequest(array($engine, 'ignoreWords'));
$request->setRequest(array($engine, 'learnWord'));
$this->execute();
}
示例7: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
public function __construct()
{
parent::__construct();
$request = WFRequest::getInstance();
$request->setRequest(array($this, 'doSearch'));
$wf = WFEditorPlugin::getInstance();
$plugins = $wf->getParam('search.link.plugins');
if ($plugins) {
foreach ($plugins as $plugin) {
// get saerch plugins
JPluginHelper::importPlugin('search', $plugin);
}
} else {
JPluginHelper::importPlugin('search');
}
}
示例8: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
function __construct()
{
parent::__construct();
$config = $this->getConfig();
$engine = $this->getEngine();
if (isset($config['general.remote_rpc_url'])) {
$this->remoteRPC();
}
$request = WFRequest::getInstance();
// Setup plugin XHR callback functions
$request->setRequest(array($engine, 'checkWords'));
$request->setRequest(array($engine, 'getSuggestions'));
$request->setRequest(array($engine, 'ignoreWord'));
$request->setRequest(array($engine, 'ignoreWords'));
$request->setRequest(array($engine, 'learnWord'));
$this->execute();
}
示例9: __construct
/**
* Constructor activating the default information of the class
*
* @access protected
*/
public function __construct()
{
parent::__construct();
$request = WFRequest::getInstance();
$request->setRequest(array($this, 'doSearch'));
$request->setRequest(array($this, 'getAreas'));
$wf = WFEditorPlugin::getInstance();
$plugins = $wf->getParam('search.link.plugins');
// use tested defaults
if (empty($plugins)) {
$plugins = array('categories', 'contacts', 'content', 'newsfeeds', 'weblinks');
}
foreach ($plugins as $plugin) {
// get saerch plugins
JPluginHelper::importPlugin('search', $plugin);
}
}
示例10: execute
public function execute() {
WFToken::checkToken() or die('Access to this resource is restricted');
// JSON request or upload action
if ($this->isRequest()) {
$request = WFRequest::getInstance();
$request->process();
} else {
$wf = WFEditor::getInstance();
$version = $this->getVersion();
$name = $this->getName();
// process javascript languages
if (JRequest::getWord('task') == 'loadlanguages') {
wfimport('admin.classes.language');
$parser = new WFLanguageParser(array(
'plugins' => array($name),
'sections' => array('dlg', $name . '_dlg', 'colorpicker'),
'mode' => 'plugin'
));
$data = $parser->load();
$parser->output($data);
}
// load core language
WFLanguage::load('com_jce', JPATH_ADMINISTRATOR);
// Load Plugin language
WFLanguage::load('com_jce_' . trim($this->getName()));
// set default plugin version
$plugin_version = $this->getPluginVersion();
// add plugin version
if ($plugin_version && $plugin_version != $version) {
$version .= '-' . $plugin_version;
}
// create the document
$document = WFDocument::getInstance(array(
'version' => $version,
'title' => WFText::_('WF_' . strtoupper($this->getName() . '_TITLE')),
'name' => $name,
'language' => WFLanguage::getTag(),
'direction' => WFLanguage::getDir(),
'compress_javascript' => $this->getParam('editor.compress_javascript', 0),
'compress_css' => $this->getParam('editor.compress_css', 0)
));
// set standalone mode
$document->set('standalone', JRequest::getInt('standalone', 0));
// create display
$this->display();
// ini language
$document->addScript(array('index.php?option=com_jce&view=editor&' . $document->getQueryString(array('task' => 'loadlanguages', 'lang' => WFLanguage::getCode()))), 'joomla');
// pack assets if required
$document->pack(true, $this->getParam('editor.compress_gzip', 0));
// get the view
$view = $this->getView();
// set body output
$document->setBody($view->loadTemplate());
// render document
$document->render();
}
}
示例11: display
/**
* Display the plugin
*/
public function display()
{
$browser = $this->getBrowser();
$document = WFDocument::getInstance();
if (JRequest::getCmd('dialog', 'plugin') == 'plugin') {
$browser->addAction('view_mode', '', 'switchMode', WFText::_('WF_IMGMANAGER_EXT_CHANGE_MODE'));
if ($this->canEdit()) {
$request = WFRequest::getInstance();
if ($this->getParam('imgmanager_ext.image_editor', 1)) {
$browser->addButton('file', 'image_editor', array('action' => 'editImage', 'title' => WFText::_('WF_BUTTON_EDIT_IMAGE'), 'restrict' => 'jpg,jpeg,png'));
}
if ($this->getParam('imgmanager_ext.thumbnail_editor', 1)) {
$browser->addButton('file', 'thumb_create', array('action' => 'createThumbnail', 'title' => WFText::_('WF_BUTTON_CREATE_THUMBNAIL'), 'trigger' => true));
$browser->addButton('file', 'thumb_delete', array('action' => 'deleteThumbnail', 'title' => WFText::_('WF_BUTTON_DELETE_THUMBNAIL'), 'trigger' => true));
}
}
if ($this->getParam('imgmanager_ext.insert_multiple', 1)) {
$browser->addButton('file', 'insert_multiple', array('action' => 'selectMultiple', 'title' => WFText::_('WF_BUTTON_INSERT_MULTIPLE'), 'multiple' => true, 'single' => false));
}
// get parent display data
parent::display();
// create new tabs instance
$tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));
// Add tabs
$tabs->addTab('image');
$tabs->addTab('rollover', $this->getParam('tabs_rollover', 1));
$tabs->addTab('advanced', $this->getParam('tabs_advanced', 1));
// Load Popups instance
$popups = WFPopupsExtension::getInstance(array('map' => array('href' => 'popup_src'), 'text' => false, 'default' => $this->getParam('imgmanager_ext.popups.default', '')));
$popups->addTemplate('popup');
$popups->display();
$document->addScript(array('canvas', 'imgmanager'), 'plugins');
$document->addStyleSheet(array('imgmanager'), 'plugins');
// load settings
$document->addScriptDeclaration('ImageManagerDialog.settings=' . json_encode($this->getSettings()) . ';');
} else {
if ($this->getParam('imgmanager_ext.image_editor', 1) == 0) {
JError::raiseError(403, WFText::_('RESTRICTED'));
}
// cleanup tmp files
$this->cleanEditorTmp();
$view = $this->getView();
$view->setLayout('editor');
$view->addTemplatePath(WF_EDITOR_PLUGIN . '/tmpl');
$lists = array();
$lists['resize'] = $this->getPresetsList('resize');
$lists['crop'] = $this->getPresetsList('crop');
$view->assign('lists', $lists);
$document->setTitle(WFText::_('WF_IMGMANAGER_EXT_TITLE') . '::' . WFText::_('WF_IMGMANAGER_EXT_EDITOR_TITLE'));
$wf = new WFEditorPlugin();
// bypass parent and use plugin view
$wf->display();
// get UI Theme
$theme = $this->getParam('editor.dialog_theme', 'jce');
$document->addScript(array('canvas', 'editor'), 'plugins');
$document->addStyleSheet(array('editor.css'), 'plugins');
$document->addScriptDeclaration('tinyMCEPopup.onInit.add(EditorDialog.init, EditorDialog);');
}
$document->addScript(array('transform'), 'plugins');
$document->addStyleSheet(array('transform'), 'plugins');
}
示例12: setRequest
/**
* Set a WFRequest item
* @access public
* @param array $request
*/
public function setRequest($request)
{
$xhr = WFRequest::getInstance();
$xhr->setRequest($request);
}
示例13: execute
public function execute()
{
WFToken::checkToken() or die('RESTRICTED ACCESS');
// JSON request or upload action
if ($this->isRequest()) {
$request = WFRequest::getInstance();
$request->process();
} else {
$this->loadLanguage('com_jce', JPATH_ADMINISTRATOR);
// Load Plugin language
$this->loadPluginLanguage();
$version = $this->getVersion();
$name = $this->getName();
$xml = JApplicationHelper::parseXMLInstallFile(WF_EDITOR_PLUGINS . DS . $name . DS . $name . '.xml');
if (isset($xml['version'])) {
$version = $xml['version'];
}
// create the document
$document = WFDocument::getInstance(array('version' => $version, 'title' => WFText::_('WF_' . strtoupper($this->getName() . '_TITLE')), 'name' => $name, 'language' => $this->getLanguageTag(), 'direction' => $this->getLanguageDir(), 'compress_javascript' => $this->getParam('editor.compress_javascript', 0), 'compress_css' => $this->getParam('editor.compress_css', 0)));
// set standalone mode
$document->set('standalone', JRequest::getInt('standalone', 0));
// create display
$this->display();
$document = WFDocument::getInstance();
// set standalone mode (for File Browser etc)
if ($document->get('standalone') == 1) {
// remove some scripts
$document->removeScript('tiny_mce_popup', 'tiny_mce');
$document->removeScript('tiny_mce_utils', 'libraries');
}
// pack assets if required
$document->pack(true, $this->getParam('editor.compress_gzip', 0));
// get the view
$view = $this->getView();
// set body output
$document->setBody($view->loadTemplate());
// render document
$document->render();
}
}
示例14: processXHR
/**
* Process an ajax call and return result
*
* @access public
* @return string
*/
function processXHR($array = false)
{
$request =& WFRequest::getInstance();
$request->processXHR($array);
}
示例15: __construct
function __construct()
{
parent::__construct();
$request = WFRequest::getInstance();
$request->setRequest(array($this, 'getFileDetails'));
}