芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/chikindzonotyucatan.gob.mx/plugins/editors-xtd/module/module.php
* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Object\CMSObject; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\CMS\Session\Session; /** * Editor Module button * * @since 3.5 */ class PlgButtonModule extends CMSPlugin { /** * 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 CMSObject 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 = Factory::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 . '&' . Session::getFormToken() . '=1'; $button = new CMSObject; $button->modal = true; $button->link = $link; $button->text = Text::_('PLG_MODULE_BUTTON_MODULE'); $button->name = $this->_type . '_' . $this->_name; $button->icon = 'cube'; $button->iconSVG = '
'; $button->options = [ 'height' => '300px', 'width' => '800px', 'bodyHeight' => '70', 'modalWidth' => '80', ]; return $button; } } }