- md5
- 7ac6b69dfe63b0d0e11d492d8e2b78ff
- sha1
- 4f1ea70344af4cc5a94fe6441284ada1594c87ac
- sha256
- cb9852999d08d5750e18c0911520bc7eb751823a8fbe084124e13e7c7c151c39
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
<?php
/**
* @package Joomla.Plugin
* @subpackage Editors-xtd.module
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Editor Module button
*
* @since 3.5
*/
class PlgButtonModule extends JPlugin
{
/**
* Load the language file on instantiation.
*
* @var boolean
* @since 3.5
*/
protected $autoloadLanguage = true;
/**
* Display the button
*
* @param string $name The name of the button to add
*
* @return JObject The button options as JObject
*
* @since 3.5
*/
public function onDisplay($name)
{
/*
* Use the built-in element view to select the module.
* Currently uses blank class.
*/
$user = JFactory::getUser();
if ($user->authorise('core.create', 'com_modules')
|| $user->authorise('core.edit', 'com_modules')
|| $user->authorise('core.edit.own', 'com_modules'))
{
$link = 'index.php?option=com_modules&view=modules&layout=modal&tmpl=component&editor='
. $name . '&' . JSession::getFormToken() . '=1';
$button = new JObject;
$button->modal = true;
$button->class = 'btn btn-secondary';
$button->link = $link;
$button->text = JText::_('PLG_MODULE_BUTTON_MODULE');
$button->name = 'file-add';
$button->options = array(
'height' => '300px',
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
);
return $button;
}
}
}
No other release has this exact content. See every version of this file.