本文整理汇总了PHP中EB::request方法的典型用法代码示例。如果您正苦于以下问题:PHP EB::request方法的具体用法?PHP EB::request怎么用?PHP EB::request使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EB
的用法示例。
在下文中一共展示了EB::request方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->my = JFactory::getUser();
$this->config = EB::config();
$this->app = JFactory::getApplication();
$this->input = EB::request();
}
示例2: __construct
public function __construct($location, $name = null, $useOverride = false)
{
static $defaultWorkspace;
$this->app = JFactory::getApplication();
$this->input = EB::request();
$this->config = EB::config();
$this->doc = JFactory::getDocument();
// Determines if this is a module section
if ($location == 'module') {
$this->isModule = true;
$location = 'site';
}
if (!isset($defaultWorkspace)) {
$override = $this->app->getTemplate();
$defaultWorkspace = array('site' => strtolower($this->config->get('theme_site')), 'site_base' => strtolower($this->config->get('theme_site_base')), 'admin' => strtolower($this->config->get('theme_admin')), 'admin_base' => strtolower($this->config->get('theme_admin_base')), 'module' => null, 'override' => $override);
}
$this->workspace = $defaultWorkspace;
$workspace = array();
// Internally, override is a location.
if ($useOverride) {
$location = 'override';
}
// For specific template, else default template will be used.
if (!empty($name)) {
$workspace[$location] = $name;
}
// Because we can't do late static binding on PHP < 5.3.
// Used by $this->override() method.
$this->class = __CLASS__;
parent::__construct('EASYBLOG', $workspace, $location);
}
示例3: __construct
public function __construct()
{
$this->config = EB::config();
$this->app = JFactory::getApplication();
$this->input = EB::request();
// Determines if the current request is for debug
$this->debug = $this->input->get('debug', false, 'bool');
}
示例4: __construct
public function __construct()
{
$this->app = JFactory::getApplication();
$this->input = EB::request();
$config = EB::config();
$key = $config->get('integrations_flickr_api_key');
$secret = $config->get('integrations_flickr_secret_key');
parent::__construct($key, $secret);
}
示例5: __construct
public function __construct(&$items, $cache = true)
{
$this->items = $items;
$this->cache = $cache;
$this->my = JFactory::getUser();
$this->config = EB::config();
$this->app = JFactory::getApplication();
$this->input = EB::request();
$this->limitstart = $this->input->get('limitstart', 0, 'int');
}
示例6: __construct
public function __construct()
{
$this->my = JFactory::getUser();
$this->app = JFactory::getApplication();
$this->input = EB::request();
$this->acl = EB::acl();
$this->config = EB::config();
// Set the user project
$this->user = EB::user($this->my->id);
}
示例7: __construct
public function __construct()
{
// Get the config object
$this->config = EB::config();
// Get app settings
$this->app = JFactory::getApplication();
$this->input = EB::request();
// Assign the key and secret
$this->key = $this->config->get('amazon_key');
$this->secret = $this->config->get('amazon_secret');
}
示例8: __construct
public function __construct($config = array())
{
parent::__construct($config);
$this->app = JFactory::getApplication();
$this->input = EB::request();
$this->doc = JFactory::getDocument();
$this->config = EB::config();
$this->my = JFactory::getUser();
$this->info = EB::info();
if ($this->doc->getType() == 'ajax') {
$this->ajax = EB::ajax();
}
}
示例9: __construct
public function __construct()
{
$this->config = EB::getConfig();
$this->jconfig = JFactory::getConfig();
$this->app = JFactory::getApplication();
$this->doc = JFactory::getDocument();
$this->my = JFactory::getUser();
$this->input = EB::request();
$this->info = EB::info();
$this->theme = EB::getTemplate(null, array('view' => $this, 'admin' => true));
if ($this->doc->getType() == 'ajax') {
$this->ajax = EB::ajax();
}
parent::__construct();
}
示例10: __construct
public function __construct()
{
// EasyBlog's configuration
$this->config = EB::config();
$this->jconfig = EB::jconfig();
// Joomla's document object
$this->doc = JFactory::getDocument();
// Joomla's application object
$this->app = JFactory::getApplication();
// Request input object
$this->input = EB::request();
// Current logged in user.
$this->my = JFactory::getUser();
// String library
$this->string = EB::string();
$this->lang = JFactory::getLanguage();
}
示例11: __construct
public function __construct()
{
$this->doc = JFactory::getDocument();
$this->app = JFactory::getApplication();
$this->my = JFactory::getUser();
$this->config = EB::config();
$this->info = EB::info();
$this->jconfig = EB::jconfig();
$this->acl = EB::acl();
// If this is a dashboard theme, we need to let the theme object know
$options = array('paramsPrefix' => $this->paramsPrefix);
// If this is an ajax document, we should pass the $ajax library to the client
if ($this->doc->getType() == 'ajax') {
//we need to load frontend language from here incase it was called from backend.
JFactory::getLanguage()->load('com_easyblog', JPATH_ROOT);
$this->ajax = EB::ajax();
}
// Create an instance of the theme so child can start setting variables to it.
$this->theme = EB::template(null, $options);
// Set the input object
$this->input = EB::request();
}
示例12: __construct
public function __construct()
{
$this->jConfig = EB::jConfig();
$this->app = JFactory::getApplication();
$this->input = EB::request();
$this->config = EB::config();
$this->apiKey = $this->config->get('integrations_facebook_api_key');
$this->apiSecret = $this->config->get('integrations_facebook_secret_key');
// Default redirection url
$this->redirect = rtrim(JURI::root(), '/') . '/administrator/index.php?option=com_easyblog&task=facebook.grant';
// Determines if there's a "system" in the url
$system = $this->input->get('system', false, 'bool');
if ($system) {
$this->redirect .= '&system=1';
}
// Determines if there's a "userId" in the url
$userId = $this->input->get('userId', null, 'default');
if ($userId) {
$this->redirect .= '&userId=' . $userId;
}
parent::__construct(array('appId' => $this->apiKey, 'secret' => $this->apiSecret));
}
示例13: published
/**
* Renders publish / unpublish icon.
*
* @since 1.0
* @access public
* @param object The object to check against.
* @param string The controller to be called.
* @param string The key for the object.
* @param Array An optional array of tasks
* @param Array An optional array of tooltips
* @param boolean An optional boolean of enforce disabled state
*
* @author Mark Lee <mark@stackideas.com>
*/
public static function published($obj, $controllerName = '', $key = '', $tasks = array(), $tooltip = array(), $disabled = false)
{
$input = EB::request();
$view = $input->get('view', '', 'cmd');
$layout = $input->get('layout', '', 'cmd');
// If primary key is not provided, then we assume that we should use 'state' as the key property.
$key = !empty($key) ? $key : 'state';
$publishTask = isset($tasks[0]) ? $tasks[0] : $controllerName . '.publish';
$unpublishTask = isset($tasks[1]) ? $tasks[1] : $controllerName . '.unpublish';
$allowed = $disabled ? false : true;
switch ($obj->{$key}) {
case '2':
case EASYBLOG_POST_SCHEDULED:
$class = 'scheduled';
$tooltip = JText::_('COM_EASYBLOG_SCHEDULED');
$allowed = false;
if ($view == 'blogs' && $layout == 'templates') {
$class = 'unpublish';
$tooltip = JText::_('COM_EASYBLOG_GRID_BLANK_TEMPLATE');
}
break;
case EASYBLOG_POST_DRAFT:
$class = 'draft';
$tooltip = JText::_('COM_EASYBLOG_DRAFT');
$allowed = false;
break;
case EASYBLOG_POST_ARCHIVED:
$class = 'archived';
$tooltip = JText::_('COM_EASYBLOG_GRID_TOOLTIP_ARCHIVED');
$allowed = false;
break;
case EASYBLOG_POST_PUBLISHED:
$class = 'publish';
$tooltip = isset($tooltip[1]) ? $tooltip[1] : 'COM_EASYBLOG_GRID_TOOLTIP_PUBLISH';
break;
case EASYBLOG_POST_UNPUBLISHED:
$class = 'unpublish';
$tooltip = isset($tooltip[0]) ? $tooltip[0] : 'COM_EASYBLOG_GRID_TOOLTIP_UNPUBLISH';
break;
case EASYBLOG_POST_TRASHED:
$class = 'trash';
$tooltip = JText::_('COM_EASYBLOG_TRASHED');
break;
}
if (is_array($tooltip)) {
$tooltip = '';
}
if (is_string($tooltip) && !empty($tooltip)) {
$tooltip = JText::_($tooltip);
}
$task = $obj->{$key} ? $unpublishTask : $publishTask;
$theme = EB::getTemplate();
$theme->set('allowed', $allowed);
$theme->set('tooltip', $tooltip);
$theme->set('task', $task);
$theme->set('class', $class);
return $theme->output('admin/html/grid.published');
}
示例14: defined
* @copyright Copyright (C) 2010 - 2015 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasyBlog is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
jimport('joomla.filesystem.file');
$engine = JPATH_ADMINISTRATOR . '/components/com_easyblog/includes/easyblog.php';
if (!JFile::exists($engine)) {
return;
}
require_once $engine;
$input = EB::request();
$option = $input->get('option', '', 'cmd');
$view = $input->get('view', '', 'cmd');
$id = $input->get('id', 0, 'int');
// Allowed views
$allowed = array('entry', 'categories', 'teamblog');
if ($option != 'com_easyblog') {
return;
}
if (!in_array($view, $allowed)) {
return;
}
if (!$id) {
return;
}
$type = 'entry';