芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/timucuy2124.gob.mx/plugins/editors-xtd/menu/menu.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 menu button * * @since 3.7.0 */ class PlgButtonMenu extends CMSPlugin { /** * Load the language file on instantiation. * * @var boolean * @since 3.7.0 */ protected $autoloadLanguage = true; /** * Display the button * * @param string $name The name of the button to add * * @since 3.7.0 * @return CMSObject */ public function onDisplay($name) { /* * Use the built-in element view to select the menu item. * Currently uses blank class. */ $user = Factory::getUser(); if ($user->authorise('core.create', 'com_menus') || $user->authorise('core.edit', 'com_menus')) { $link = 'index.php?option=com_menus&view=items&layout=modal&tmpl=component&' . Session::getFormToken() . '=1&editor=' . $name; $button = new CMSObject; $button->modal = true; $button->link = $link; $button->text = Text::_('PLG_EDITORS-XTD_MENU_BUTTON_MENU'); $button->name = $this->_type . '_' . $this->_name; $button->icon = 'list'; $button->iconSVG = '
'; $button->options = [ 'height' => '300px', 'width' => '800px', 'bodyHeight' => '70', 'modalWidth' => '80', ]; return $button; } } }