本文整理汇总了PHP中JPluginHelper类的典型用法代码示例。如果您正苦于以下问题:PHP JPluginHelper类的具体用法?PHP JPluginHelper怎么用?PHP JPluginHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JPluginHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: verify
public static function verify() {
if (! self::enabled ())
return true;
$app = JFactory::getApplication ();
$dispatcher = JDispatcher::getInstance ();
$results = $dispatcher->trigger ( 'onCaptchaRequired', array ('kunena.post' ) );
if (! JPluginHelper::isEnabled ( 'system', 'captcha' ) || ! $results [0]) {
$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_CAPTCHA_CANNOT_CHECK_CODE' ), 'error' );
return false;
}
if ($results [0]) {
$captchaparams = array (
JRequest::getVar ( 'captchacode', '', 'post' ),
JRequest::getVar ( 'captchasuffix', '', 'post' ),
JRequest::getVar ( 'captchasessionid', '', 'post' ) );
$results = $dispatcher->trigger ( 'onCaptchaVerify', $captchaparams );
if (! $results [0]) {
$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_CAPTCHACODE_DO_NOT_MATCH' ), 'error' );
return false;
}
}
return true;
}
开发者ID:rich20,项目名称:Kunena,代码行数:26,代码来源:captcha.php
示例2: saveOrder
public function saveOrder($pks = array(), $lft = array())
{
JPluginHelper::importPlugin('cck_storage_location');
if (!count($pks)) {
return false;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('a.id, a.pk, a.storage_location, b.id AS type_id')->from('#__cck_core AS a')->join('LEFT', '#__cck_core_types AS b ON b.name = a.cck')->where('a.id IN (' . implode(',', $pks) . ')');
$db->setQuery($query);
$results = $db->loadAssocList('id');
if (!empty($results)) {
$ids = array();
$location = null;
$user = JCck::getUser();
$user_id = $user->get('id');
foreach ($pks as $i => $pk) {
$canEdit = $user->authorise('core.edit', 'com_cck.form.' . $results[$pk]['type_id']);
$canEditOwn = $user->authorise('core.edit.own', 'com_cck.form.' . $results[$pk]['type_id']);
// Check Permissions
if (!($canEdit && $canEditOwn || $canEdit && !$canEditOwn && $results[$pk]['author_id'] != $user_id || $canEditOwn && $results[$pk]['author_id'] == $user_id)) {
unset($lft[$i]);
continue;
}
$ids[] = $results[$pk]['pk'];
if (null === $location) {
$location = $results[$pk]['storage_location'];
}
}
if ($location && count($ids)) {
return JCck::callFunc_Array('plgCCK_Storage_Location' . $location, 'onCCK_Storage_LocationSaveOrder', array($ids, $lft));
}
}
return false;
}
开发者ID:hamby,项目名称:SEBLOD,代码行数:35,代码来源:list.php
示例3: plgAcymailingContentplugin
function plgAcymailingContentplugin(&$subject, $config)
{
parent::__construct($subject, $config);
if (!isset($this->params)) {
$plugin = JPluginHelper::getPlugin('acymailing', 'contentplugin');
$this->params = new acyParameter($plugin->params);
}
$this->paramsContent = JComponentHelper::getParams('com_content');
JPluginHelper::importPlugin('content');
$this->dispatcherContent = JDispatcher::getInstance();
$excludedHandlers = array('plgContentEmailCloak', 'pluginImageShow');
$excludedNames = array('system' => array('SEOGenerator', 'SEOSimple'), 'content' => array('webeecomment', 'highslide', 'smartresizer', 'phocagallery'));
$excludedType = array_keys($excludedNames);
if (!ACYMAILING_J16) {
foreach ($this->dispatcherContent->_observers as $id => $observer) {
if (is_array($observer) and in_array($observer['handler'], $excludedHandlers)) {
$this->dispatcherContent->_observers[$id]['event'] = '';
} elseif (is_object($observer)) {
if (in_array($observer->_type, $excludedType) and in_array($observer->_name, $excludedNames[$observer->_type])) {
$this->dispatcherContent->_observers[$id] = null;
}
}
}
}
if (!class_exists('JSite')) {
include_once ACYMAILING_ROOT . 'includes' . DS . 'application.php';
}
}
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:28,代码来源:contentplugin.php
示例4: getOptions
/**
* Method to get the field options.
*
* @return array The field option objects.
* @since 1.6
*/
protected function getOptions()
{
$options = array();
$params = JComponentHelper::getParams('com_joomdle');
$app = $params->get('activities');
$option = array('value' => 'no', 'text' => JText::_('COM_JOOMDLE_NONE'));
$options[] = $option;
$option = array('value' => 'jomsocial', 'text' => 'Jomsocial');
$options[] = $option;
// Add sources added via plugins
JPluginHelper::importPlugin('joomdleactivities');
$dispatcher = JDispatcher::getInstance();
$more_sources = $dispatcher->trigger('onGetActivitiesSource', array());
if (is_array($more_sources)) {
foreach ($more_sources as $source) {
$keys = array_keys($source);
$key = $keys[0];
$source_name = array_shift($source);
$option['value'] = $key;
$option['text'] = $source_name;
$options[] = $option;
}
}
return $options;
}
开发者ID:esyacelga,项目名称:sisadmaca,代码行数:31,代码来源:activities.php
示例5: tag
function tag()
{
$doc = JFactory::getDocument();
$doc->addStyleSheet(ACYMAILING_CSS . 'frontendedition.css?v=' . filemtime(ACYMAILING_MEDIA . 'css' . DS . 'frontendedition.css'));
JPluginHelper::importPlugin('acymailing');
$dispatcher = JDispatcher::getInstance();
$tagsfamilies = $dispatcher->trigger('acymailing_getPluginType');
$defaultFamily = reset($tagsfamilies);
$app = JFactory::getApplication();
$fctplug = $app->getUserStateFromRequest(ACYMAILING_COMPONENT . ".tag", 'fctplug', $defaultFamily->function, 'cmd');
ob_start();
$defaultContents = $dispatcher->trigger($fctplug);
$defaultContent = ob_get_clean();
$js = 'function insertTag(){if(window.parent.insertTag(window.document.getElementById(\'tagstring\').value)) {acymailing_js.closeBox(true);}}';
$js .= 'function setTag(tagvalue){window.document.getElementById(\'tagstring\').value = tagvalue;}';
$js .= 'function showTagButton(){window.document.getElementById(\'insertButton\').style.display = \'inline\'; window.document.getElementById(\'tagstring\').style.display=\'inline\';}';
$js .= 'function hideTagButton(){}';
$js .= 'try{window.parent.previousSelection = window.parent.getPreviousSelection(); }catch(err){window.parent.previousSelection=false; }';
$doc->addScriptDeclaration($js);
$this->assignRef('fctplug', $fctplug);
$type = JRequest::getString('type', 'news');
$this->assignRef('type', $type);
$this->assignRef('defaultContent', $defaultContent);
$this->assignRef('tagsfamilies', $tagsfamilies);
$app = JFactory::getApplication();
$this->assignRef('app', $app);
$ctrl = JRequest::getString('ctrl');
$this->assignRef('ctrl', $ctrl);
}
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:29,代码来源:view.html.php
示例6: createObserver
public static function createObserver(JObservableInterface $observableObject, $params = array())
{
$observer = new self($observableObject);
$observer->plugin = JPluginHelper::getPlugin('system', 'jds');
$observer->params = new JRegistry($observer->plugin->params);
return $observer;
}
开发者ID:dzdevteam,项目名称:plg_system_jds,代码行数:7,代码来源:jdswatcher.php
示例7: listing
function listing()
{
JRequest::setVar('tmpl', 'component');
$statsClass = acymailing_get('class.stats');
$statsClass->saveStats();
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header("Expires: Wed, 17 Sep 1975 21:32:10 GMT");
ob_end_clean();
JPluginHelper::importPlugin('acymailing');
$this->dispatcher = JDispatcher::getInstance();
$results = $this->dispatcher->trigger('acymailing_getstatpicture');
$picture = reset($results);
if (empty($picture)) {
$picture = 'media/com_acymailing/images/statpicture.png';
}
$picture = ltrim(str_replace(array('\\', '/'), DS, $picture), DS);
$imagename = ACYMAILING_ROOT . $picture;
$handle = fopen($imagename, 'r');
if (!$handle) {
exit;
}
header("Content-type: image/png");
$contents = fread($handle, filesize($imagename));
fclose($handle);
echo $contents;
exit;
}
开发者ID:sumithMadhushan,项目名称:joomla-project,代码行数:29,代码来源:stats.php
示例8: plgContentCpTags
/**
* Constructor
*
* For php4 compatability we must not use the __constructor as a constructor for
* plugins because func_get_args ( void ) returns a copy of all passed arguments
* NOT references. This causes problems with cross-referencing necessary for the
* observer design pattern.
*/
function plgContentCpTags(&$subject)
{
parent::__construct($subject);
// load plugin parameters
$this->_plugin =& JPluginHelper::getPlugin('content', 'cptags');
$this->_params = new JParameter($this->_plugin->params);
}
开发者ID:BGCX261,项目名称:zonales-svn-to-git,代码行数:15,代码来源:cptags.php
示例9: _getArticleHTML
public static function _getArticleHTML($userid, $limit, $limitstart, $row, $app, $total, $cat, $params)
{
JPluginHelper::importPlugin('content');
$dispatcher = JDispatcher::getInstance();
$html = "";
if (!empty($row)) {
$html .= '<div class="joms-app--myarticle">';
$html .= '<ul class="joms-list">';
foreach ($row as $data) {
$text_limit = $params->get('limit', 50);
$result = $dispatcher->trigger('onPrepareContent', array(&$data, &$params, 0));
if (empty($cat[$data->catid])) {
$cat[$data->catid] = "";
}
$data->sectionid = empty($data->sectionid) ? 0 : $data->sectionid;
$link = plgCommunityMyArticles::buildLink($data->id, $data->alias, $data->catid, $cat[$data->catid], $data->sectionid);
$created = new JDate($data->created);
$date = CTimeHelper::timeLapse($created);
$html .= ' <li>';
$html .= ' <a href="' . $link . '">' . htmlspecialchars($data->title) . '</a>';
$html .= '<span class="joms-block joms-text--small joms-text--light">' . $date . '</span>';
$html .= ' </li>';
}
$html .= '</ul>';
$showall = CRoute::_('index.php?option=com_community&view=profile&userid=' . $userid . '&task=app&app=myarticles');
$html .= "<div class='joms-gap'></div><div class='list-articles--button'><small><a class='joms-button--link' href='" . $showall . "'>" . JText::_('PLG_MYARTICLES_SHOWALL') . "</a></small></div>";
$html .= '</div>';
} else {
$html .= "<p>" . JText::_("PLG_MYARTICLES_NO_ARTICLES") . "</p>";
}
return $html;
}
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:32,代码来源:myarticles.php
示例10: display
public function display($tpl = null)
{
global $mainframe;
$pathway =& $mainframe->getPathway();
$params =& $mainframe->getParams();
$model = KFactory::get('site::com.picman.model.album');
$album = $model->getItem();
// set Breadcrumbs
$pathway->addItem($album->name);
// set Document data
$document =& JFactory::getDocument();
$document->setMetaData('keywords', $album->metakey);
$document->setMetaData('description', $album->metadesc);
$document->setTitle($album->name);
// Load GData plugin
$plugin =& JPluginHelper::getPlugin('system', 'gdata');
$gdata = new JParameter($plugin->params);
// get Simple XML feed from GData Plugin
$album = "picman_album_" . $album->id;
$query = "kind=photo&access=all&thumbsize=144c&imgmax=512";
$simpleXml = plgSystemGdata::getSimpleXml($album, $query);
$this->assignRef('album', $album);
$this->assignRef('params', $params);
$this->assignRef('simpleXml', $simpleXml);
$this->assignRef('filter', $model->getFilters());
$this->assignRef('pagination', $model->getPagination());
// Display the layout
parent::display($tpl);
}
开发者ID:janssit,项目名称:www.alu-andries.be,代码行数:29,代码来源:html.php
示例11: getRequiredScope
public function getRequiredScope()
{
if (self::$requiredScope) {
return self::$requiredScope;
}
JPluginHelper::importPlugin('socialprofiles');
$app = JFactory::getApplication();
$args = array('google');
$perms = $app->triggerEvent('socialProfilesGetRequiredScope', $args);
if ($perms) {
foreach ($perms as $permArray) {
self::$requiredScope = array_merge(self::$requiredScope, $permArray);
}
}
$configModel = JFBCFactory::config();
$customPermsSetting = $configModel->getSetting('google_custom_scope');
if ($customPermsSetting != '') {
$customPermsSetting = str_replace("\r\n", ',', $customPermsSetting);
//Separate into an array to be able to merge and then take out duplicates
$customPerms = explode(',', $customPermsSetting);
foreach ($customPerms as $customPerm) {
self::$requiredScope[] = trim($customPerm);
}
}
self::$requiredScope = array_unique(self::$requiredScope);
self::$requiredScope = implode(",", self::$requiredScope);
return self::$requiredScope;
}
开发者ID:q0821,项目名称:esportshop,代码行数:28,代码来源:google.php
示例12: fetchElement
function fetchElement($name, $value, &$node, $control_name)
{
// Base name of the HTML control.
$ctrl = $control_name . '[' . $name . ']';
// Construct the various argument calls that are supported.
$attribs = ' ';
if ($v = $node->attributes('size')) {
$attribs .= 'size="' . $v . '"';
}
if ($v = $node->attributes('class')) {
$attribs .= 'class="' . $v . '"';
} else {
$attribs .= 'class="inputbox"';
}
if ($m = $node->attributes('multiple')) {
$attribs .= ' multiple="multiple"';
$ctrl .= '[]';
}
//get plugin name (plugin entryfile name)
$element = $node->attributes('element');
$db =& JFactory::getDBO();
//get plugin params from #__plugins table
$plugin = JPluginHelper::getPlugin('emailalerts', $element);
if (!empty($plugin)) {
$pluginParams = new JParameter($plugin->params);
$pluginParamsDefault = $pluginParams->_raw;
//example: plugintitle=K2-Latest Items category=1|3|4|5|2 no_of_items=5 catid=1|3|4|5|2
$new1 = explode("\n", $pluginParamsDefault);
$new2 = explode("=", $new1[2]);
$cats = str_replace('|', ',', $new2[1]);
if ($cats) {
$sql = "SELECT id ,title FROM #__categories WHERE published = 1 AND section !='com_docman' AND id IN (" . $cats . ")";
} else {
//if no category is yet selected
$sql = "SELECT id ,title FROM #__categories WHERE published = 1 AND section !='com_docman'";
}
} else {
//if plugin is not yet enabled load all categories
$sql = "SELECT id ,title FROM #__categories WHERE published = 1 AND section !='com_docman'";
}
$db->setQuery($sql);
// Query items for list.
$key = $node->attributes('key_field') ? $node->attributes('key_field') : 'value';
$val = $node->attributes('value_field') ? $node->attributes('value_field') : $name;
$options = array();
foreach ($node->children() as $option) {
$options[] = array($key => $option->attributes('value'), $val => $option->data());
}
$rows = $db->loadAssocList();
if ($rows) {
foreach ($rows as $row) {
$options[] = array($key => $row[$key], $val => $row[$val]);
}
}
if ($options) {
return JHTML::_('select.genericlist', $options, $ctrl, $attribs, $key, $val, $value, $control_name . $name);
} else {
return JText::_('NO_CATS_USER');
}
}
开发者ID:Archanciel,项目名称:joo3x_plg_jma_latestnews,代码行数:60,代码来源:JMACategoriesUsers.php
示例13: onStylesSave
public function onStylesSave(Event $event)
{
\JPluginHelper::importPlugin('gantry5');
// Trigger the onGantryThemeUpdateCss event.
$dispatcher = \JEventDispatcher::getInstance();
$dispatcher->trigger('onGantry5UpdateCss', ['theme' => $event->theme]);
}
开发者ID:Ettore495,项目名称:Ettore-Work,代码行数:7,代码来源:EventListener.php
示例14: NextendSliderWidgets
function NextendSliderWidgets($slider, $id)
{
$this->_slider = $slider;
$this->_id = $id;
$this->_widgets = array();
$this->_enabledWidgets = array();
$params = $this->_slider->_sliderParams;
if ($slider->_backend) {
return;
}
$plugins = array();
NextendPlugin::callPlugin('nextendsliderwidget', 'onNextendSliderWidgetList', array(&$plugins));
foreach ($plugins as $k => $v) {
$widget = $params->get('widget' . $k);
$display = NextendParse::parse($params->get('widget' . $k . 'display', '0|*|always|*|0|*|0'));
if ($widget != '' && (isset($display[0]) && intval($display[0]) || isset($display[2]) && intval($display[2]) || isset($display[3]) && intval($display[3]))) {
$this->_enabledWidgets[$k] = $widget;
}
}
foreach ($this->_enabledWidgets as $k => $v) {
if (nextendIsJoomla()) {
JPluginHelper::importPlugin('nextendsliderwidget' . $k);
}
$class = 'plgNextendSliderWidget' . $k . $v;
if (class_exists($class, false)) {
$this->_widgets[$k] = call_user_func(array($class, 'render'), $slider, $id, $params);
}
}
}
开发者ID:sangikumar,项目名称:IP,代码行数:29,代码来源:widgets.php
示例15: display
function display($tpl = null)
{
JHTML::_('behavior.modal');
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$model = $this->getModel();
$params = Djcatalog2Helper::getParams();
$menus = $app->getMenu('site');
$menu = $menus->getActive();
$dispatcher = JDispatcher::getInstance();
$categories = Djc2Categories::getInstance(array('state' => '1'));
$item = $model->getData();
/* If Item not published set 404 */
if ($item->id == 0 || !$item->published) {
throw new Exception(JText::_('COM_DJCATALOG2_PRODUCT_NOT_FOUND'), 404);
}
/* plugins */
JPluginHelper::importPlugin('djcatalog2');
$results = $dispatcher->trigger('onPrepareItemDescription', array(&$item, &$params, 0));
$this->assignref('categories', $categories);
$this->assignref('item', $item);
$this->assignref('images', $images);
$this->assignref('params', $params);
$this->_prepareDocument();
parent::display($tpl);
}
开发者ID:ForAEdesWeb,项目名称:AEW3,代码行数:26,代码来源:view.html.php
示例16: onDisplay
/**
* Display the button
*
* @return array A two element array of ( imageName, textToInsert )
*/
function onDisplay($name)
{
jimport('joomla.filesystem.file');
// return if system plugin is not installed
if (!JFile::exists(JPATH_PLUGINS . DS . 'system' . DS . $this->_name . DS . $this->_name . '.php')) {
return;
}
// return if NoNumber! Elements plugin is not installed
if (!JFile::exists(JPATH_PLUGINS . DS . 'system' . DS . 'nonumberelements' . DS . 'nonumberelements.php')) {
return;
}
// load the admin language file
$lang =& JFactory::getLanguage();
if ($lang->getTag() != 'en-GB') {
// Loads English language file as fallback (for undefined stuff in other language file)
$lang->load('plg_' . $this->_type . '_' . $this->_name, JPATH_ADMINISTRATOR, 'en-GB');
}
$lang->load('plg_' . $this->_type . '_' . $this->_name, JPATH_ADMINISTRATOR, null, 1);
// Load system plugin parameters
require_once JPATH_PLUGINS . DS . 'system' . DS . 'nonumberelements' . DS . 'helpers' . DS . 'parameters.php';
$parameters =& NNParameters::getParameters();
$system_params = JPluginHelper::getPlugin('system', $this->_name);
$params = $parameters->getParams($system_params->params, JPATH_PLUGINS . DS . 'system' . DS . $this->_name . DS . $this->_name . '.xml');
// Include the Helper
require_once JPATH_PLUGINS . DS . $this->_type . DS . $this->_name . DS . 'helper.php';
$class = get_class($this) . 'Helper';
$this->helper = new $class($params);
return $this->helper->render($name);
}
开发者ID:jtresca,项目名称:nysurveyor,代码行数:34,代码来源:tabber.php
示例17: display
/**
* Method to display a view.
*
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController This object to support chaining.
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
JPluginHelper::importPlugin('content');
$vName = JRequest::getCmd('view', 'images');
switch ($vName) {
case 'imagesList':
$mName = 'list';
$vLayout = JRequest::getCmd('layout', 'default');
break;
case 'images':
default:
$vLayout = JRequest::getCmd('layout', 'default');
$mName = 'manager';
$vName = 'images';
break;
}
$document = JFactory::getDocument();
$vType = $document->getType();
// Get/Create the view
$view = $this->getView($vName, $vType);
$view->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR . '/views/' . strtolower($vName) . '/tmpl');
// Get/Create the model
if ($model = $this->getModel($mName)) {
// Push the model into the view (as default)
$view->setModel($model, true);
}
// Set the layout
$view->setLayout($vLayout);
// Display the view
$view->display();
return $this;
}
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:41,代码来源:controller.php
示例18: checkDebugPluginDisabled
/**
* Check if the debug plugin is disabled.
*
* @return boolean
*/
public function checkDebugPluginDisabled()
{
if ($enabled = \JPluginHelper::isEnabled('system', 'debug')) {
$this->issues['critical'][] = sprintf("System - Debug Plugin enabled. This might cause memory issues, while compiling the LESS files.");
}
return !$enabled;
}
开发者ID:NavaINT1876,项目名称:ccustoms,代码行数:12,代码来源:CheckHelper.php
示例19: array
/**
* Helper method to return button list.
*
* This method returns the array by reference so it can be
* used to add custom buttons or remove default ones.
*
* @param JRegistry The module parameters.
*
* @return array An array of buttons
* @since 1.6
*/
public static function &getButtons($params)
{
$key = (string) $params;
if (!isset(self::$buttons[$key])) {
$context = $params->get('context', 'mod_pj_quickicon');
if ($context == 'mod_pj_quickicon') {
// Load mod_quickicon language file in case this method is called before rendering the module
JFactory::getLanguage()->load('mod_pj_quickicon');
self::$buttons[$key] = array(array('link' => JRoute::_('index.php?option=com_playjoom&view=audiotracks'), 'params' => null, 'id' => null, 'imagePath' => null, 'image' => ' fa fa-list-alt', 'text' => JText::_('MOD_PJ_QUICKICON_TRACKSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_playjoom&view=media'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-music', 'text' => JText::_('MOD_PJ_QUICKICON_ADD_TRACKS'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_playjoom&view=artists'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-users', 'text' => JText::_('MOD_PJ_QUICKICON_ARTISTSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_playjoom&view=albums'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-picture-o', 'text' => JText::_('MOD_PJ_QUICKICON_ALBUMSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_playjoom&view=covers'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-file-image-o', 'text' => JText::_('MOD_PJ_QUICKICON_COVERSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_TRACKS'), array('link' => JRoute::_('index.php?option=com_categories&view=categories&extension=com_playjoom'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-folder-o', 'text' => JText::_('MOD_PJ_QUICKICON_GENRESMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_CATEGORIES'), array('link' => JRoute::_('index.php?option=com_categories&view=categories&extension=com_playjoom.playlist'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-play', 'text' => JText::_('MOD_PJ_QUICKICON_PLAYLISTSMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_CATEGORIES'), array('link' => JRoute::_('index.php?option=com_categories&view=categories&extension=com_playjoom.trackfilter'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-filter', 'text' => JText::_('MOD_PJ_QUICKICON_TRACKFILTERMANAGER'), 'access' => array('core.manage', 'com_playjoom', 'core.create', 'com_playjoom'), 'group' => 'MOD_PJ_QUICKICON_CATEGORIES'));
//Get user objects
$user = JFactory::getUser();
if ($user->authorise('core.admin', 'com_playjoom')) {
$PJbuttons = array(array('link' => JRoute::_('index.php?option=com_users'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-user', 'text' => JText::_('MOD_QUICKICON_USER_MANAGER'), 'access' => array('core.manage', 'com_users'), 'group' => 'MOD_PJ_QUICKICON_USERS'), array('link' => JRoute::_('index.php?option=com_config'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-cogs', 'text' => JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'), 'access' => array('core.manage', 'com_config', 'core.admin', 'com_config'), 'group' => 'MOD_PJ_QUICKICON_CONFIGURATIONS'), array('link' => JRoute::_('index.php?option=com_config&view=component&component=com_playjoom'), 'params' => null, 'id' => null, 'imagePath' => '/administrator/components/com_playjoom/images/header/', 'image' => 'fa fa-cog', 'text' => JText::_('MOD_PJ_QUICKICON_PLAYJOOM_OPTIONS'), 'access' => array('core.manage', 'com_config', 'core.admin', 'com_config'), 'group' => 'MOD_PJ_QUICKICON_CONFIGURATIONS'));
//Marge standard icons with PlayJoom admin icons
self::$buttons[$key] = array_merge(self::$buttons[$key], $PJbuttons);
// Include buttons defined by published quickicon plugins
JPluginHelper::importPlugin('quickicon');
$app = JFactory::getApplication();
$arrays = (array) $app->triggerEvent('onGetIcons', array($context));
foreach ($arrays as $response) {
foreach ($response as $icon) {
$default = array('link' => null, 'image' => 'cog', 'text' => null, 'access' => true, 'group' => 'MOD_QUICKICON_EXTENSIONS');
$icon = array_merge($default, $icon);
if (!is_null($icon['link']) && !is_null($icon['text'])) {
self::$buttons[$key][] = $icon;
}
}
}
}
} else {
self::$buttons[$key] = array();
}
}
return self::$buttons[$key];
}
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:46,代码来源:helper.php
示例20: _form
function _form($tpl = null)
{
parent::_form($tpl);
// load the plugin
$row = $this->getModel()->getItem();
$import = JPluginHelper::importPlugin('Citruscart', $row->element);
}
开发者ID:joomlacorner,项目名称:citruscart,代码行数:7,代码来源:view.html.php
注:本文中的JPluginHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论