File manager - Edit - /home/ferretapmx/public_html/Toolbar.zip
Back
PK "�\hD�Q�u �u Toolbar.phpnu �[��� <?php /** * @package FOF * @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ namespace FOF40\Toolbar; defined('_JEXEC') || die; use FOF40\Container\Container; use FOF40\Controller\Controller; use FOF40\Toolbar\Exception\MissingAttribute; use FOF40\Toolbar\Exception\UnknownButtonType; use FOF40\View\DataView\DataViewInterface; use FOF40\View\View; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Toolbar\ToolbarHelper as JoomlaToolbarHelper; use Joomla\Utilities\ArrayHelper; /** * The Toolbar class renders the back-end component title area and the back- * and front-end toolbars. * * @since 1.0 */ class Toolbar { /** @var array Permissions map, see the __construct method for more information */ public $perms = []; /** @var Container Component container */ protected $container; /** @var array The links to be rendered in the toolbar */ protected $linkbar = []; /** @var bool Should I render the submenu in the front-end? */ protected $renderFrontendSubmenu = false; /** @var bool Should I render buttons in the front-end? */ protected $renderFrontendButtons = false; /** @var bool Should I use the configuration file (fof.xml) of the component? */ protected $useConfigurationFile = false; /** @var null|bool Are we rendering a data-aware view? */ protected $isDataView; /** * Public constructor. * * The $config array can contain the following optional values: * * renderFrontendButtons bool Should I render buttons in the front-end of the component? * renderFrontendSubmenu bool Should I render the submenu in the front-end of the component? * useConfigurationFile bool Should we use the configuration file (fof.xml) of the component? * * @param Container $c The container for the component * @param array $config The configuration overrides, see above */ public function __construct(Container $c, array $config = []) { // Store the container reference in this object $this->container = $c; // Get a reference to some useful objects $input = $this->container->input; $platform = $this->container->platform; // Get default permissions (can be overridden by the view) $perms = (object) [ 'manage' => $this->container->platform->authorise('core.manage', $input->getCmd('option', 'com_foobar')), 'create' => $this->container->platform->authorise('core.create', $input->getCmd('option', 'com_foobar')), 'edit' => $this->container->platform->authorise('core.edit', $input->getCmd('option', 'com_foobar')), 'editstate' => $this->container->platform->authorise('core.edit.state', $input->getCmd('option', 'com_foobar')), 'delete' => $this->container->platform->authorise('core.delete', $input->getCmd('option', 'com_foobar')), ]; // Save front-end toolbar and submenu rendering flags if present in the config if (array_key_exists('renderFrontendButtons', $config)) { $this->renderFrontendButtons = $config['renderFrontendButtons']; } if (array_key_exists('renderFrontendSubmenu', $config)) { $this->renderFrontendSubmenu = $config['renderFrontendSubmenu']; } // If not in the administrative area, load the JoomlaToolbarHelper if (!$platform->isBackend()) { // Needed for tests, so we can inject our "special" helper class if (!class_exists('\Joomla\CMS\Toolbar\Toolbar')) { $platformDirs = $platform->getPlatformBaseDirs(); $path = $platformDirs['root'] . '/administrator/includes/toolbar.php'; require_once $path; } // Things to do if we have to render a front-end toolbar if ($this->renderFrontendButtons) { // Load back-end toolbar language files in front-end $platform->loadTranslations(''); // Needed for tests (we can fake we're not in the backend, but we are still in CLI!) if (!$platform->isCli()) { // Load the core Javascript HTMLHelper::_('behavior.core'); HTMLHelper::_('jquery.framework', true); } } } // Store permissions in the local toolbar object $this->perms = $perms; } /** * Renders the toolbar for the current view and task * * @param string|null $view The view of the component * @param string|null $task The exact task of the view * * @return void */ public function renderToolbar(?string $view = null, ?string $task = null): void { $input = $this->container->input; $render_toolbar = $input->getCmd('tmpl', '') != 'component'; // If there is a render_toolbar=0 in the URL, do not render a toolbar $render_toolbar = $input->getBool('render_toolbar', $render_toolbar); if (!$render_toolbar) { return; } // Get the view and task $controller = $this->container->dispatcher->getController(); $autoDetectedView = 'cpanel'; $autoDetectedTask = 'main'; if (is_object($controller) && ($controller instanceof Controller)) { $autoDetectedView = $controller->getName(); $autoDetectedTask = $controller->getTask(); } if (empty($view)) { $view = $input->getCmd('view', $autoDetectedView); } if (empty($task)) { $task = $input->getCmd('task', $autoDetectedTask); } // If there is a fof.xml toolbar configuration use it and return $view = $this->container->inflector->pluralize($view); $toolbarConfig = $this->container->appConfig->get('views.' . ucfirst($view) . '.toolbar.' . $task); $oldValues = [ 'renderFrontendButtons' => $this->renderFrontendButtons, 'renderFrontendSubmenu' => $this->renderFrontendSubmenu, 'useConfigurationFile' => $this->useConfigurationFile, ]; $newValues = [ 'renderFrontendButtons' => $this->container->appConfig->get( 'views.' . ucfirst($view) . '.config.renderFrontendButtons', $oldValues['renderFrontendButtons'] ), 'renderFrontendSubmenu' => $this->container->appConfig->get( 'views.' . ucfirst($view) . '.config.renderFrontendSubmenu', $oldValues['renderFrontendSubmenu'] ), 'useConfigurationFile' => $this->container->appConfig->get( 'views.' . ucfirst($view) . '.config.useConfigurationFile', $oldValues['useConfigurationFile'] ), ]; foreach ($newValues as $k => $v) { $this->$k = $v; } if (!empty($toolbarConfig) && $this->useConfigurationFile) { $this->renderFromConfig($toolbarConfig); return; } // Check for an onViewTask method $methodName = 'on' . ucfirst($view) . ucfirst($task); if (method_exists($this, $methodName)) { $this->$methodName(); return; } // Check for an onView method $methodName = 'on' . ucfirst($view); if (method_exists($this, $methodName)) { $this->$methodName(); return; } // Check for an onTask method $methodName = 'on' . ucfirst($task); if (method_exists($this, $methodName)) { $this->$methodName(); return; } } /** * Renders the toolbar for the component's Control Panel page * * @return void */ public function onCpanelsBrowse(): void { if ($this->container->platform->isBackend() || $this->renderFrontendSubmenu) { $this->renderSubmenu(); } if (!$this->container->platform->isBackend() && !$this->renderFrontendButtons) { return; } $option = $this->container->componentName; JoomlaToolbarHelper::title(Text::_(strtoupper($option)), str_replace('com_', '', $option)); if (!$this->isDataView()) { return; } JoomlaToolbarHelper::preferences($option); } /** * Renders the toolbar for the component's Browse pages (the plural views) * * @return void */ public function onBrowse(): void { // On frontend, buttons must be added specifically if ($this->container->platform->isBackend() || $this->renderFrontendSubmenu) { $this->renderSubmenu(); } if (!$this->container->platform->isBackend() && !$this->renderFrontendButtons) { return; } // Setup $option = $this->container->componentName; $view = $this->container->input->getCmd('view', 'cpanel'); // Set toolbar title $subtitle_key = strtoupper($option . '_TITLE_' . $view); JoomlaToolbarHelper::title(Text::_(strtoupper($option)) . ': ' . Text::_($subtitle_key), str_replace('com_', '', $option)); if (!$this->isDataView()) { return; } // Add toolbar buttons if ($this->perms->create) { JoomlaToolbarHelper::addNew(); } if ($this->perms->edit) { JoomlaToolbarHelper::editList(); } if ($this->perms->create || $this->perms->edit) { JoomlaToolbarHelper::divider(); } // Published buttons are only added if there is a enabled field in the table try { $model = $this->container->factory->model($view); if ($model->hasField('enabled') && $this->perms->editstate) { JoomlaToolbarHelper::publishList(); JoomlaToolbarHelper::unpublishList(); JoomlaToolbarHelper::divider(); } } catch (\Exception $e) { // Yeah. Let's not add the buttons if we can't load the model... } if ($this->perms->delete) { $msg = Text::_($option . '_CONFIRM_DELETE'); JoomlaToolbarHelper::deleteList(strtoupper($msg)); } // A Check-In button is only added if there is a locked_on field in the table try { $model = $this->container->factory->model($view); if ($model->hasField('locked_on') && $this->perms->edit) { JoomlaToolbarHelper::checkin(); } } catch (\Exception $e) { // Yeah. Let's not add the button if we can't load the model... } } /** * Renders the toolbar for the component's Read pages * * @return void */ public function onRead(): void { // On frontend, buttons must be added specifically if ($this->container->platform->isBackend() || $this->renderFrontendSubmenu) { $this->renderSubmenu(); } if (!$this->container->platform->isBackend() && !$this->renderFrontendButtons) { return; } $option = $this->container->componentName; $componentName = str_replace('com_', '', $option); $view = $this->container->input->getCmd('view', 'cpanel'); // Set toolbar title $subtitle_key = strtoupper($option . '_TITLE_' . $view . '_READ'); JoomlaToolbarHelper::title(Text::_(strtoupper($option)) . ': ' . Text::_($subtitle_key), $componentName); if (!$this->isDataView()) { return; } // Set toolbar icons JoomlaToolbarHelper::back(); } /** * Renders the toolbar for the component's Add pages * * @return void */ public function onAdd(): void { // On frontend, buttons must be added specifically if (!$this->container->platform->isBackend() && !$this->renderFrontendButtons) { return; } $option = $this->container->componentName; $componentName = str_replace('com_', '', $option); $view = $this->container->input->getCmd('view', 'cpanel'); // Set toolbar title $subtitle_key = strtoupper($option . '_TITLE_' . $this->container->inflector->pluralize($view)) . '_EDIT'; JoomlaToolbarHelper::title(Text::_(strtoupper($option)) . ': ' . Text::_($subtitle_key), $componentName); if (!$this->isDataView()) { return; } // Set toolbar icons if ($this->perms->edit || $this->perms->editown) { // Show the apply button only if I can edit the record, otherwise I'll return to the edit form and get a // 403 error since I can't do that JoomlaToolbarHelper::apply(); } JoomlaToolbarHelper::save(); if ($this->perms->create) { JoomlaToolbarHelper::custom('savenew', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } JoomlaToolbarHelper::cancel(); } /** * Renders the toolbar for the component's Edit pages * * @return void */ public function onEdit(): void { // On frontend, buttons must be added specifically if (!$this->container->platform->isBackend() && !$this->renderFrontendButtons) { return; } $this->onAdd(); } /** * Removes all links from the link bar * * @return void */ public function clearLinks(): void { $this->linkbar = []; } /** * Get the link bar's link definitions * * @return array */ public function &getLinks(): array { return $this->linkbar; } /** * Append a link to the link bar * * @param string $name The text of the link * @param string|null $link The link to render; set to null to render a separator * @param boolean $active True if it's an active link * @param string|null $icon Icon class (used by some renderers, like the Bootstrap renderer) * @param string|null $parent The parent element (referenced by name)) This will create a dropdown list * * @return void */ public function appendLink(string $name, ?string $link = null, bool $active = false, ?string $icon = null, ?string $parent = ''): void { $linkDefinition = [ 'name' => $name, 'link' => $link, 'active' => $active, 'icon' => $icon, ]; if (empty($parent)) { if (array_key_exists($name, $this->linkbar)) { $this->linkbar[$name] = array_merge($this->linkbar[$name], $linkDefinition); // If there already are some children, I have to put this view link in the "items" array in the first place if (array_key_exists('items', $this->linkbar[$name])) { array_unshift($this->linkbar[$name]['items'], $linkDefinition); } } else { $this->linkbar[$name] = $linkDefinition; } } else { if (!array_key_exists($parent, $this->linkbar)) { $parentElement = $linkDefinition; $parentElement['name'] = $parent; $parentElement['link'] = null; $this->linkbar[$parent] = $parentElement; $parentElement['items'] = []; } else { $parentElement = $this->linkbar[$parent]; if (!array_key_exists('dropdown', $parentElement) && !empty($parentElement['link'])) { $newSubElement = $parentElement; $parentElement['items'] = [$newSubElement]; } } $parentElement['items'][] = $linkDefinition; $parentElement['dropdown'] = true; if ($active) { $parentElement['active'] = true; } $this->linkbar[$parent] = $parentElement; } } /** * Prefixes (some people erroneously call this "prepend" – there is no such word) a link to the link bar * * @param string $name The text of the link * @param string|null $link The link to render; set to null to render a separator * @param boolean $active True if it's an active link * @param string|null $icon Icon class (used by some renderers, like the Bootstrap renderer) * * @return void */ public function prefixLink(string $name, ?string $link = null, bool $active = false, ?string $icon = null): void { $linkDefinition = [ 'name' => $name, 'link' => $link, 'active' => $active, 'icon' => $icon, ]; array_unshift($this->linkbar, $linkDefinition); } /** * Renders the submenu (toolbar links) for all detected views of this component * * @return void */ public function renderSubmenu(): void { $views = $this->getMyViews(); if (empty($views)) { return; } $activeView = $this->container->input->getCmd('view', 'cpanel'); foreach ($views as $view) { // Get the view name $key = strtoupper($this->container->componentName) . '_TITLE_' . strtoupper($view); //Do we have a translation for this key? if (strtoupper(Text::_($key)) === $key) { $altview = $this->container->inflector->isPlural($view) ? $this->container->inflector->singularize($view) : $this->container->inflector->pluralize($view); $key2 = strtoupper($this->container->componentName) . '_TITLE_' . strtoupper($altview); $name = strtoupper(Text::_($key2)) === $key2 ? ucfirst($view) : Text::_($key2); } else { $name = Text::_($key); } $link = 'index.php?option=' . $this->container->componentName . '&view=' . $view; $active = $view === $activeView; $this->appendLink($name, $link, $active); } } /** * Return the front-end toolbar rendering flag * * @return boolean */ public function getRenderFrontendButtons(): bool { return $this->renderFrontendButtons; } /** * @param boolean $renderFrontendButtons */ public function setRenderFrontendButtons(bool $renderFrontendButtons): void { $this->renderFrontendButtons = $renderFrontendButtons; } /** * Return the front-end submenu rendering flag * * @return boolean */ public function getRenderFrontendSubmenu(): bool { return $this->renderFrontendSubmenu; } /** * @param boolean $renderFrontendSubmenu */ public function setRenderFrontendSubmenu(bool $renderFrontendSubmenu): void { $this->renderFrontendSubmenu = $renderFrontendSubmenu; } /** * Is the view we are rendering the toolbar for a data-aware view? * * @return bool */ public function isDataView(): bool { if (is_null($this->isDataView)) { $this->isDataView = false; $controller = $this->container->dispatcher->getController(); $view = null; if (is_object($controller) && ($controller instanceof Controller)) { $view = $controller->getView(); } if (is_object($view) && ($view instanceof View)) { $this->isDataView = $view instanceof DataViewInterface; } } return $this->isDataView; } /** * Automatically detects all views of the component * * @return string[] A list of all views, in the order to be displayed in the toolbar submenu */ protected function getMyViews(): array { $t_views = []; $using_meta = false; $componentPaths = $this->container->platform->getComponentBaseDirs($this->container->componentName); $searchPath = $componentPaths['main'] . '/View'; $filesystem = $this->container->filesystem; $allFolders = $filesystem->folderFolders($searchPath); foreach ($allFolders as $folder) { $view = $folder; // View already added if (in_array($this->container->inflector->pluralize($view), $t_views)) { continue; } // Do we have a 'skip.xml' file in there? $files = $filesystem->folderFiles($searchPath . '/' . $view, '^skip\.xml$'); if (!empty($files)) { continue; } // Do we have extra information about this view? (ie. ordering) $meta = $filesystem->folderFiles($searchPath . '/' . $view, '^metadata\.xml$'); // Not found, do we have it inside the plural one? if (!$meta) { $plural = $this->container->inflector->pluralize($view); if (in_array($plural, $allFolders)) { $view = $plural; $meta = $filesystem->folderFiles($searchPath . '/' . $view, '^metadata\.xml$'); } } if (!empty($meta)) { $using_meta = true; $xml = simplexml_load_file($searchPath . '/' . $view . '/' . $meta[0]); $order = (int) $xml->foflib->ordering; } else { // Next place. It's ok since the index are 0-based and count is 1-based if (!isset($to_order)) { $to_order = []; } $order = count($to_order); } $view = $this->container->inflector->pluralize($view); $t_view = new \stdClass; $t_view->ordering = $order; $t_view->view = $view; $to_order[] = $t_view; $t_views[] = $view; } $views = []; if (!empty($to_order)) { if (class_exists('JArrayHelper')) { \JArrayHelper::sortObjects($to_order, 'ordering'); $views = \JArrayHelper::getColumn($to_order, 'view'); } else { ArrayHelper::sortObjects($to_order, 'ordering'); $views = ArrayHelper::getColumn($to_order, 'view'); } } // If not using the metadata file, let's put the cpanel view on top if (!$using_meta) { $cpanel = array_search('cpanels', $views); if ($cpanel !== false) { unset($views[$cpanel]); array_unshift($views, 'cpanels'); } } return $views; } /** * Simplified default rendering without any attributes. * * @param array $tasks Array of tasks. * * @return void */ protected function renderToolbarElements(array $tasks): void { foreach ($tasks as $task) { $this->renderToolbarElement($task); } } /** * Checks if the current user has enough privileges for the requested ACL privilege of a custom toolbar button. * * @param string $area The ACL privilege as set up in the $this->perms object * * @return boolean True if the user has the ACL privilege specified */ protected function checkACL(string $area): bool { if (is_bool($area)) { return $area; } if (in_array(strtolower($area), ['false', '0', 'no', '403'])) { return false; } if (in_array(strtolower($area), ['true', '1', 'yes'])) { return true; } if (strtolower($area) == 'guest') { return $this->container->platform->getUser()->guest; } if (strtolower($area) == 'user') { return !$this->container->platform->getUser()->guest; } if (empty($area)) { return true; } if (isset($this->perms->$area)) { return $this->perms->$area; } return false; } /** * Render the toolbar from the configuration. * * @param array $toolbar The toolbar definition * * @return void */ private function renderFromConfig(array $toolbar): void { $isBackend = $this->container->platform->isBackend(); if ($isBackend || $this->renderFrontendSubmenu) { $this->renderSubmenu(); } if (!$isBackend && !$this->renderFrontendButtons) { return; } if (!$this->isDataView()) { return; } // Render each element foreach ($toolbar as $elementType => $elementAttributes) { $value = isset($elementAttributes['value']) ? (string) ($elementAttributes['value']) : null; $this->renderToolbarElement($elementType, $value, $elementAttributes); } } /** * Render a toolbar element. * * @param string $type The element type. * @param ?string $value The title translation string for a 'title' element. * @param array $attributes The element attributes. * * @return void * * @codeCoverageIgnore * @throws \InvalidArgumentException */ private function renderToolbarElement(string $type, $value = null, array $attributes = []): void { switch ($type) { case 'title': $icon = $attributes['icon'] ?? 'generic.png'; if (isset($attributes['translate'])) { $value = Text::_($value); } JoomlaToolbarHelper::title($value, $icon); break; case 'divider': JoomlaToolbarHelper::divider(); break; case 'custom': $task = $attributes['task'] ?? ''; $icon = $attributes['icon'] ?? ''; $iconOver = $attributes['icon_over'] ?? ''; $alt = $attributes['alt'] ?? ''; $listSelect = isset($attributes['list_select']) ? fofStringToBool($attributes['list_select']) : true; JoomlaToolbarHelper::custom($task, $icon, $iconOver, $alt, $listSelect); break; case 'preview': $url = $attributes['url'] ?? ''; $update_editors = fofStringToBool($attributes['update_editors'] ?? 'false'); JoomlaToolbarHelper::preview($url, $update_editors); break; case 'help': if (!isset($attributes['help'])) { throw new MissingAttribute('help', 'help'); } $ref = $attributes['help']; $com = fofStringToBool($attributes['com'] ?? 'false'); $override = $attributes['override'] ?? null; $component = $attributes['component'] ?? null; JoomlaToolbarHelper::help($ref, $com, $override, $component); break; case 'back': $alt = $attributes['alt'] ?? 'JTOOLBAR_BACK'; $href = $attributes['href'] ?? 'javascript:history.back();'; JoomlaToolbarHelper::back($alt, $href); break; case 'media_manager': $directory = $attributes['directory'] ?? ''; $alt = $attributes['alt'] ?? 'JTOOLBAR_UPLOAD'; JoomlaToolbarHelper::media_manager($directory, $alt); break; case 'assign': $task = $attributes['task'] ?? 'assign'; $alt = $attributes['alt'] ?? 'JTOOLBAR_ASSIGN'; JoomlaToolbarHelper::assign($task, $alt); break; case 'addNew': case 'new': $area = $attributes['acl'] ?? 'create'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'add'; $alt = $attributes['alt'] ?? 'JTOOLBAR_NEW'; $check = fofStringToBool($attributes['check'] ?? 'false'); JoomlaToolbarHelper::addNew($task, $alt, $check); } break; case 'copy': $area = $attributes['acl'] ?? 'create'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'copy'; $alt = $attributes['alt'] ?? 'JLIB_HTML_BATCH_COPY'; $icon = $attributes['icon'] ?? 'copy.png'; $iconOver = $attributes['iconOver'] ?? 'copy_f2.png'; JoomlaToolbarHelper::custom($task, $icon, $iconOver, $alt, false); } break; case 'publish': $area = $attributes['acl'] ?? 'editstate'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'publish'; $alt = $attributes['alt'] ?? 'JTOOLBAR_PUBLISH'; $check = fofStringToBool($attributes['check'] ?? 'false'); JoomlaToolbarHelper::publish($task, $alt, $check); } break; case 'publishList': $area = $attributes['acl'] ?? 'editstate'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'publish'; $alt = $attributes['alt'] ?? 'JTOOLBAR_PUBLISH'; JoomlaToolbarHelper::publishList($task, $alt); } break; case 'unpublish': $area = $attributes['acl'] ?? 'editstate'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'unpublish'; $alt = $attributes['alt'] ?? 'JTOOLBAR_UNPUBLISH'; $check = fofStringToBool($attributes['check'] ?? 'false'); JoomlaToolbarHelper::unpublish($task, $alt, $check); } break; case 'unpublishList': $area = $attributes['acl'] ?? 'editstate'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'unpublish'; $alt = $attributes['alt'] ?? 'JTOOLBAR_UNPUBLISH'; JoomlaToolbarHelper::unpublishList($task, $alt); } break; case 'archiveList': $area = $attributes['acl'] ?? 'editstate'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'archive'; $alt = $attributes['alt'] ?? 'JTOOLBAR_ARCHIVE'; JoomlaToolbarHelper::archiveList($task, $alt); } break; case 'unarchiveList': $area = $attributes['acl'] ?? 'editstate'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'unarchive'; $alt = $attributes['alt'] ?? 'JTOOLBAR_UNARCHIVE'; JoomlaToolbarHelper::unarchiveList($task, $alt); } break; case 'edit': case 'editList': $area = $attributes['acl'] ?? 'edit'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'edit'; $alt = $attributes['alt'] ?? 'JTOOLBAR_EDIT'; JoomlaToolbarHelper::editList($task, $alt); } break; case 'editHtml': $task = $attributes['task'] ?? 'edit_source'; $alt = $attributes['alt'] ?? 'JTOOLBAR_EDIT_HTML'; JoomlaToolbarHelper::editHtml($task, $alt); break; case 'editCss': $task = $attributes['task'] ?? 'edit_css'; $alt = $attributes['alt'] ?? 'JTOOLBAR_EDIT_CSS'; JoomlaToolbarHelper::editCss($task, $alt); break; case 'deleteList': case 'delete': $area = $attributes['acl'] ?? 'delete'; if ($this->checkACL($area)) { $msg = $attributes['msg'] ?? ''; $task = $attributes['task'] ?? 'remove'; $alt = $attributes['alt'] ?? 'JTOOLBAR_DELETE'; JoomlaToolbarHelper::deleteList($msg, $task, $alt); } break; case 'trash': $area = $attributes['acl'] ?? 'editstate'; if ($this->checkACL($area)) { $task = $attributes['task'] ?? 'trash'; $alt = $attributes['alt'] ?? 'JTOOLBAR_TRASH'; $check = isset($attributes['check']) ? fofStringToBool($attributes['check']) : true; JoomlaToolbarHelper::trash($task, $alt, $check); } break; case 'apply': $task = $attributes['task'] ?? 'apply'; $alt = $attributes['alt'] ?? 'JTOOLBAR_APPLY'; JoomlaToolbarHelper::apply($task, $alt); break; case 'save': $task = $attributes['task'] ?? 'save'; $alt = $attributes['alt'] ?? 'JTOOLBAR_SAVE'; JoomlaToolbarHelper::save($task, $alt); break; case 'savenew': $task = $attributes['task'] ?? 'savenew'; $alt = $attributes['alt'] ?? 'JTOOLBAR_SAVE_AND_NEW'; $icon = $attributes['icon'] ?? 'save-new.png'; $iconOver = $attributes['iconOver'] ?? 'save-new_f2.png'; JoomlaToolbarHelper::custom($task, $icon, $iconOver, $alt, false); break; case 'save2new': $task = $attributes['task'] ?? 'save2new'; $alt = $attributes['alt'] ?? 'JTOOLBAR_SAVE_AND_NEW'; JoomlaToolbarHelper::save2new($task, $alt); break; case 'save2copy': $task = $attributes['task'] ?? 'save2copy'; $alt = $attributes['alt'] ?? 'JTOOLBAR_SAVE_AS_COPY'; JoomlaToolbarHelper::save2copy($task, $alt); break; case 'checkin': $task = $attributes['task'] ?? 'checkin'; $alt = $attributes['alt'] ?? 'JTOOLBAR_CHECKIN'; $check = isset($attributes['check']) ? fofStringToBool($attributes['check']) : true; JoomlaToolbarHelper::checkin($task, $alt, $check); break; case 'cancel': $task = $attributes['task'] ?? 'cancel'; $alt = $attributes['alt'] ?? 'JTOOLBAR_CANCEL'; JoomlaToolbarHelper::cancel($task, $alt); break; case 'preferences': if (!isset($attributes['component'])) { throw new MissingAttribute('component', 'preferences'); } $component = $attributes['component']; $height = $attributes['height'] ?? '550'; $width = $attributes['width'] ?? '875'; $alt = $attributes['alt'] ?? 'JToolbar_Options'; $path = $attributes['path'] ?? ''; JoomlaToolbarHelper::preferences($component, $height, $width, $alt, $path); break; default: throw new UnknownButtonType($type); } } } PK "�\��8��/ �/ ToolbarButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\FileLayout; use Joomla\Utilities\ArrayHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * The ToolbarButton class. * * @method self text(string $value) * @method self task(string $value) * @method self icon(string $value) * @method self buttonClass(string $value) * @method self attributes(array $value) * @method self onclick(string $value) * @method self listCheck(bool $value) * @method self listCheckMessage(string $value) * @method self form(string $value) * @method self formValidation(bool $value) * @method string getText() * @method string getTask() * @method string getIcon() * @method string getButtonClass() * @method array getAttributes() * @method string getOnclick() * @method bool getListCheck() * @method string getListCheckMessage() * @method string getForm() * @method bool getFormValidation() * * @since 4.0.0 */ abstract class ToolbarButton { /** * Name of this button. * * @var string * * @since 4.0.0 */ protected $name; /** * Reference to the object that instantiated the element * * @var Toolbar * * @since 4.0.0 */ protected $parent; /** * The layout path to render this button. * * @var string * * @since 4.0.0 */ protected $layout; /** * Button options. * * @var array * * @since 4.0.0 */ protected $options = []; /** * Used to track an ids, to avoid duplication * * @var array * * @since 4.0.0 */ protected static $idCounter = []; /** * Init this class. * * @param string $name Name of this button. * @param string $text The button text, will auto translate. * @param array $options Button options. * * @since 4.0.0 * * @throws \InvalidArgumentException */ public function __construct(string $name = '', string $text = '', array $options = []) { $this->name($name) ->text($text); $this->options = ArrayHelper::mergeRecursive($this->options, $options); } /** * Prepare options for this button. * * @param array &$options The options about this button. * * @return void * * @since 4.0.0 */ protected function prepareOptions(array &$options) { $options['name'] = $this->getName(); $options['text'] = Text::_($this->getText()); $options['class'] = $this->getIcon() ?: $this->fetchIconClass($this->getName()); $options['id'] = $this->ensureUniqueId($this->fetchId()); if (!empty($options['is_child'])) { $options['tagName'] = 'button'; $options['btnClass'] = ($options['button_class'] ?? '') . ' dropdown-item'; $options['attributes']['type'] = 'button'; if ($options['is_first_child']) { $options['btnClass'] .= ' first'; } if ($options['is_last_child']) { $options['btnClass'] .= ' last'; } } else { $options['tagName'] = 'button'; $options['btnClass'] = ($options['button_class'] ?? 'btn btn-primary'); $options['attributes']['type'] = 'button'; } } /** * Get the HTML to render the button * * @param array &$definition Parameters to be passed * * @return string * * @since 3.0 * * @throws \Exception */ public function render(&$definition = null) { if ($definition === null) { $action = $this->renderButton($this->options); } elseif (\is_array($definition)) { // For B/C $action = $this->fetchButton(...$definition); } else { throw new \InvalidArgumentException('Wrong argument: $definition, should be NULL or array.'); } // Build the HTML Button $layout = new FileLayout('joomla.toolbar.base'); return $layout->render( [ 'action' => $action, 'options' => $this->options, ] ); } /** * Render button HTML. * * @param array &$options The button options. * * @return string The button HTML. * * @since 4.0.0 */ protected function renderButton(array &$options): string { $this->prepareOptions($options); // Prepare custom attributes. unset( $options['attributes']['id'], $options['attributes']['class'] ); $options['htmlAttributes'] = ArrayHelper::toString($options['attributes']); // Isolate button class from icon class $buttonClass = str_replace('icon-', '', $this->getName()); $iconclass = $options['btnClass'] ?? ''; $options['btnClass'] = 'button-' . $buttonClass . ' ' . $iconclass; // Instantiate a new LayoutFile instance and render the layout $layout = new FileLayout($this->layout); return $layout->render($options); } /** * Get the button CSS Id. * * @return string Button CSS Id * * @since 3.0 */ protected function fetchId() { return $this->parent->getName() . '-' . str_ireplace(' ', '-', $this->getName()); } /** * Method to get the CSS class name for an icon identifier * * Can be redefined in the final class * * @param string $identifier Icon identification string * * @return string CSS class name * * @since 3.0 */ public function fetchIconClass($identifier) { // It's an ugly hack, but this allows templates to define the icon classes for the toolbar $layout = new FileLayout('joomla.toolbar.iconclass'); return $layout->render(['icon' => $identifier]); } /** * Get the button * * Defined in the final button class * * @return string * * @since 3.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. */ abstract public function fetchButton(); /** * Get parent toolbar instance. * * @return Toolbar * * @since 4.0.0 */ public function getParent(): Toolbar { return $this->parent; } /** * Set parent Toolbar instance. * * @param Toolbar $parent The parent Toolbar instance to set. * * @return static Return self to support chaining. * * @since 4.0.0 */ public function setParent(Toolbar $parent): self { $this->parent = $parent; return $this; } /** * Get button options. * * @return array * * @since 4.0.0 */ public function getOptions(): array { return $this->options; } /** * Set all options. * * @param array $options The button options. * * @return static Return self to support chaining. * * @since 4.0.0 */ public function setOptions(array $options): self { $this->options = $options; return $this; } /** * Get single option value. * * @param string $name The option name. * @param mixed $default The default value if this name not exists. * * @return mixed * * @since 4.0.0 */ public function getOption(string $name, $default = null) { return $this->options[$name] ?? $default; } /** * Set option value. * * @param string $name The option name to store value. * @param mixed $value The option value. * * @return static * * @since 4.0.0 */ public function setOption(string $name, $value): self { $this->options[$name] = $value; return $this; } /** * Get button name. * * @return string * * @since 4.0.0 */ public function getName(): string { return $this->name; } /** * Set button name. * * @param string $name The button name. * * @return static Return self to support chaining. * * @since 4.0.0 */ public function name(string $name): self { $this->name = $name; return $this; } /** * Get layout path. * * @return string * * @since 4.0.0 */ public function getLayout(): string { return $this->layout; } /** * Set layout path. * * @param string $layout The layout path name to render. * * @return static Return self to support chaining. * * @since 4.0.0 */ public function layout(string $layout): self { $this->layout = $layout; return $this; } /** * Make sure the id is unique * * @param string $id The id string. * * @return string * * @since 4.0.0 */ protected function ensureUniqueId(string $id): string { if (\array_key_exists($id, static::$idCounter)) { static::$idCounter[$id]++; $id .= static::$idCounter[$id]; } else { static::$idCounter[$id] = 0; } return $id; } /** * Magiix method to adapt option accessors. * * @param string $name The method name. * @param array $args The method arguments. * * @return mixed * * @throws \LogicException * * @since 4.0.0 */ public function __call(string $name, array $args) { // Getter if (stripos($name, 'get') === 0) { $fieldName = static::findOptionName(lcfirst(substr($name, 3))); if ($fieldName !== false) { return $this->getOption($fieldName); } } else { // Setter $fieldName = static::findOptionName($name); if ($fieldName !== false) { if (!\array_key_exists(0, $args)) { throw new \InvalidArgumentException( \sprintf( '%s::%s() miss first argument.', \get_called_class(), $name ) ); } return $this->setOption($fieldName, $args[0]); } } throw new \BadMethodCallException( \sprintf( 'Method %s() not found in class: %s', $name, \get_called_class() ) ); } /** * Find field option name from accessors. * * @param string $name The field name. * * @return boolean|string * * @since 4.0.0 */ private static function findOptionName(string $name) { $accessors = static::getAccessors(); if (\in_array($name, $accessors, true)) { return $accessors[array_search($name, $accessors, true)]; } // Getter with alias if (isset($accessors[$name])) { return $accessors[$name]; } return false; } /** * Method to configure available option accessors. * * @return array * * @since 4.0.0 */ protected static function getAccessors(): array { return [ 'text', 'task', 'icon', 'attributes', 'onclick', 'buttonClass' => 'button_class', 'listCheck', 'listCheckMessage', 'form', 'formValidation', ]; } } PK "�\���� � Button/CustomButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Toolbar\ToolbarButton; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a custom button * * @method self html(string $value) * @method string getHtml() * * @since 3.0 */ class CustomButton extends ToolbarButton { /** * Render button HTML. * * @param array $options The button options. * * @return string The button HTML. * * @since 4.0.0 */ protected function renderButton(array &$options): string { return (string) ($options['html'] ?? ''); } /** * Fetch the HTML for the button * * @param string $type Button type, unused string. * @param string $html HTML string for the button * @param string $id CSS id for the button * * @return string HTML string for the button * * @since 3.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. */ public function fetchButton($type = 'Custom', $html = '', $id = 'custom') { return $html; } /** * Method to configure available option accessors. * * @return array * * @since 4.0.0 */ protected static function getAccessors(): array { return array_merge( parent::getAccessors(), [ 'html', ] ); } } PK "�\�[� � Button/SeparatorButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Toolbar\ToolbarButton; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a button separator * * @since 3.0 */ class SeparatorButton extends ToolbarButton { /** * Property layout. * * @var string * * @since 4.0.0 */ protected $layout = 'joomla.toolbar.separator'; /** * Empty implementation (not required for separator) * * @return void * * @since 3.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. */ public function fetchButton() { } } PK "�\g�A A Button/BasicButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Toolbar\ToolbarButton; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a basic button. * * @since 4.0.0 */ class BasicButton extends ToolbarButton { /** * Property layout. * * @var string * * @since 4.0.0 */ protected $layout = 'joomla.toolbar.basic'; /** * Fetch the HTML for the button * * @param string $type Unused string. * * @return void * * @since 3.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. * * @throws \LogicException */ public function fetchButton($type = 'Basic') { throw new \LogicException('This is a new button in 4.0, please use render() instead.'); } } PK "�\A�E6 6 Button/AbstractGroupButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Toolbar\Toolbar; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * The AbstractGroupButton class. * * @since 4.0.0 */ abstract class AbstractGroupButton extends BasicButton { /** * The child Toolbar instance. * * @var Toolbar * * @since 4.0.0 */ protected $child; /** * Add children buttons as dropdown. * * @param callable $handler The callback to configure dropdown items. * * @return static * * @since 4.0.0 */ public function configure(callable $handler): self { $child = $this->getChildToolbar(); $handler($child); return $this; } /** * Get child toolbar. * * @return Toolbar Return new child Toolbar instance. * * @since 4.0.0 */ public function getChildToolbar(): Toolbar { if (!$this->child) { $this->child = $this->parent->createChild($this->getName() . '-children'); } return $this->child; } /** * Get the button CSS Id. * * @return string Button CSS Id * * @since 4.0.0 */ protected function fetchId() { return $this->parent->getName() . '-group-' . $this->getName(); } } PK "�\)� Button/ConfirmButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2007 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Language\Text; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a standard button with a confirm dialog * * @method self message(string $value) * @method bool getMessage() * * @since 3.0 */ class ConfirmButton extends StandardButton { /** * Prepare options for this button. * * @param array $options The options about this button. * * @return void * * @since 4.0.0 */ protected function prepareOptions(array &$options) { $options['message'] = Text::_($options['message'] ?? ''); parent::prepareOptions($options); } /** * Fetch the HTML for the button * * @param string $type Unused string. * @param string $msg Message to render * @param string $name Name to be used as apart of the id * @param string $text Button text * @param string $task The task associated with the button * @param boolean $list True to allow use of lists * @param boolean $hideMenu True to hide the menu on click * * @return string HTML string for the button * * @since 3.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. */ public function fetchButton($type = 'Confirm', $msg = '', $name = '', $text = '', $task = '', $list = true, $hideMenu = false) { $this->name($name) ->text($text) ->listCheck($list) ->message($msg) ->task($task); return $this->renderButton($this->options); } /** * Get the JavaScript command for the button * * @return string JavaScript command string * * @since 3.0 */ protected function _getCommand() { Text::script($this->getListCheckMessage() ?: 'JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'); Text::script('ERROR'); $msg = $this->getMessage(); $cmd = "if (confirm('" . $msg . "')) { Joomla.submitbutton('" . $this->getTask() . "'); }"; if ($this->getListCheck()) { $message = "{'error': [Joomla.Text._('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST')]}"; $alert = 'Joomla.renderMessages(' . $message . ')'; $cmd = 'if (document.adminForm.boxchecked.value == 0) { ' . $alert . ' } else { ' . $cmd . ' }'; } return $cmd; } /** * Method to configure available option accessors. * * @return array * * @since 4.0.0 */ protected static function getAccessors(): array { return array_merge( parent::getAccessors(), [ 'message', ] ); } } PK "�\��uko o Button/StandardButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Language\Text; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a standard button * * @since 3.0 */ class StandardButton extends BasicButton { /** * Property layout. * * @var string * * @since 4.0.0 */ protected $layout = 'joomla.toolbar.standard'; /** * Prepare options for this button. * * @param array $options The options about this button. * * @return void * * @since 4.0.0 */ protected function prepareOptions(array &$options) { parent::prepareOptions($options); if (empty($options['is_child'])) { $class = $this->fetchButtonClass($this->getName()); $options['btnClass'] = ($options['button_class'] ??= $class); } $options['onclick'] ??= $this->_getCommand(); } /** * Fetch the HTML for the button * * @param string $type Unused string. * @param string $name The name of the button icon class. * @param string $text Button text. * @param string $task Task associated with the button. * @param boolean $list True to allow lists * @param string $formId The id of action form. * * @return string HTML string for the button * * @since 3.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. */ public function fetchButton($type = 'Standard', $name = '', $text = '', $task = '', $list = true, $formId = null) { $this->name($name) ->text($text) ->task($task) ->listCheck($list); if ($formId !== null) { $this->form($formId); } return $this->renderButton($this->options); } /** * Fetch button class for standard buttons. * * @param string $name The button name. * * @return string * * @since 4.0.0 */ public function fetchButtonClass(string $name): string { switch ($name) { case 'apply': case 'new': case 'save': case 'save-new': case 'save-copy': case 'save-close': case 'publish': return 'btn btn-success'; case 'featured': return 'btn btn-warning'; case 'cancel': case 'trash': case 'delete': case 'unpublish': return 'btn btn-danger'; default: return 'btn btn-primary'; } } /** * Get the JavaScript command for the button * * @return string JavaScript command string * * @since 3.0 */ protected function _getCommand() { Text::script($this->getListCheckMessage() ?: 'JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'); Text::script('ERROR'); $cmd = "Joomla.submitbutton('" . $this->getTask() . "');"; if ($this->getListCheck()) { $messages = "{error: [Joomla.Text._('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST')]}"; $alert = 'Joomla.renderMessages(' . $messages . ')'; $cmd = 'if (document.adminForm.boxchecked.value == 0) { ' . $alert . ' } else { ' . $cmd . ' }'; } return $cmd; } } PK "�\��4{� � Button/InlinehelpButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a button to show / hide the inline help text * * @method self targetclass(string $value) * @method string getTargetclass() * * @since 4.1.0 */ class InlinehelpButton extends BasicButton { /** * Property layout. * * @var string * * @since 4.1.3 */ protected $layout = 'joomla.toolbar.inlinehelp'; /** * Prepare options for this button. * * @param array $options The options for this button. * * @return void * * @since 4.1.0 */ protected function prepareOptions(array &$options) { $options['text'] = $options['text'] ?: 'JINLINEHELP'; $options['icon'] ??= 'fa-question-circle'; $options['button_class'] ??= 'btn btn-info'; $options['attributes'] = array_merge( $options['attributes'] ?? [], [ 'data-class' => $options['targetclass'] ?? 'hide-aware-inline-help', ] ); parent::prepareOptions($options); } /** * Fetches the button HTML code. * * @param string $type Unused string. * @param string $targetClass The class of the DIVs holding the descriptions to toggle. * @param string $text Button label * @param string $icon Button icon * @param string $buttonClass Button class * * @return string * * @since 4.1.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. */ public function fetchButton( $type = 'Inlinehelp', string $targetClass = 'hide-aware-inline-help', string $text = 'JINLINEHELP', string $icon = 'fa fa-question-circle', string $buttonClass = 'btn btn-info' ) { $this->name('inlinehelp') ->targetclass($targetClass) ->text($text) ->icon($icon) ->buttonClass($buttonClass); return $this->renderButton($this->options); } /** * Method to configure available option accessors. * * @return array * * @since 4.1.0 */ protected static function getAccessors(): array { return array_merge( parent::getAccessors(), [ 'targetclass', ] ); } } PK "�\]�2Q Q Button/LinkButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Toolbar\ToolbarButton; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a link button * * @method self url(string $value) * @method self target(string $value) * @method string getUrl() * @method string getTarget() * * @since 3.0 */ class LinkButton extends ToolbarButton { /** * Property layout. * * @var string * * @since 4.0.0 */ protected $layout = 'joomla.toolbar.link'; /** * Prepare options for this button. * * @param array $options The options about this button. * * @return void * * @since 4.0.0 */ protected function prepareOptions(array &$options) { parent::prepareOptions($options); unset($options['attributes']['type']); } /** * Fetch the HTML for the button * * @param string $type Unused string. * @param string $name Name to be used as apart of the id * @param string $text Button text * @param string $url The link url * * @return string HTML string for the button * * @since 3.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. */ public function fetchButton($type = 'Link', $name = 'back', $text = '', $url = null) { $this->name($name) ->text($text) ->url($url); return $this->renderButton($this->options); } /** * Method to configure available option accessors. * * @return array * * @since 4.0.0 */ protected static function getAccessors(): array { return array_merge( parent::getAccessors(), [ 'url', 'target', ] ); } } PK "�\�7\5� � Button/PopupButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Toolbar\ToolbarButton; use Joomla\CMS\Uri\Uri; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a modal window button * * @method self url(string $value) * @method self icon(string $value) * @method self iframeWidth(int $value) * @method self iframeHeight(int $value) * @method self bodyHeight(int $value) * @method self modalWidth(string $value) * @method self modalHeight(string $value) * @method self onclose(string $value) * @method self title(string $value) * @method self footer(string $value) * @method self selector(string $value) * @method self listCheck(bool $value) * @method self popupType(string $value) * @method self textHeader(string $value) * @method string getUrl() * @method int getIframeWidth() * @method int getIframeHeight() * @method int getBodyHeight() * @method string getModalWidth() * @method string getModalHeight() * @method string getOnclose() * @method string getTitle() * @method string getFooter() * @method string getSelector() * @method bool getListCheck() * @method string getPopupType() * @method string getTextHeader() * * @since 3.0 */ class PopupButton extends ToolbarButton { /** * Property layout. * * @var string * * @since 4.0.0 */ protected $layout = 'joomla.toolbar.popup'; /** * Prepare options for this button. * * @param array $options The options about this button. * * @return void * * @since 4.0.0 */ protected function prepareOptions(array &$options) { $options['icon'] ??= 'icon-square'; parent::prepareOptions($options); $options['doTask'] = $this->_getCommand($this->getUrl()); $options['selector'] ??= 'modal-' . $this->getName(); } /** * Fetch the HTML for the button * * @param string $type Unused string, formerly button type. * @param string $name Modal name, used to generate element ID * @param string $text The link text * @param string $url URL for popup * @param integer $iframeWidth Width of popup * @param integer $iframeHeight Height of popup * @param integer $bodyHeight Optional height of the modal body in viewport units (vh) * @param integer $modalWidth Optional width of the modal in viewport units (vh) * @param string $onClose JavaScript for the onClose event. * @param string $title The title text * @param string $footer The footer html * * @return string HTML string for the button * * @since 3.0 */ public function fetchButton( $type = 'Modal', $name = '', $text = '', $url = '', $iframeWidth = 640, $iframeHeight = 480, $bodyHeight = null, $modalWidth = null, $onClose = '', $title = '', $footer = null ) { $this->name($name) ->text($text) ->task($this->_getCommand($url)) ->url($url) ->icon('icon-' . $name) ->iframeWidth($iframeWidth) ->iframeHeight($iframeHeight) ->bodyHeight($bodyHeight) ->modalWidth($modalWidth) ->onclose($onClose) ->title($title) ->footer($footer); return $this->renderButton($this->options); } /** * Render button HTML. * * @param array $options The button options. * * @return string The button HTML. * * @since 4.0.0 */ protected function renderButton(array &$options): string { $html = []; $html[] = parent::renderButton($options); if ($this->getPopupType()) { return $html[0]; } @trigger_error( 'Use of BS Modal is deprecated in Joomla\CMS\Toolbar\Button\PopupButton, and will be removed in 6.0', E_USER_DEPRECATED ); if ((string) $this->getUrl() !== '') { // Build the options array for the modal $params = []; $params['title'] = $options['title'] ?? $options['text']; $params['url'] = $this->getUrl(); $params['height'] = $options['iframeHeight'] ?? 480; $params['width'] = $options['iframeWidth'] ?? 640; $params['bodyHeight'] = $options['bodyHeight'] ?? null; $params['modalWidth'] = $options['modalWidth'] ?? null; // Place modal div and scripts in a new div $html[] = '<div class="btn-group" style="width: 0; margin: 0; padding: 0;">'; $selector = $options['selector']; $footer = $this->getFooter(); if ($footer !== null) { $params['footer'] = $footer; } $html[] = HTMLHelper::_('bootstrap.renderModal', $selector, $params); $html[] = '</div>'; // We have to move the modal, otherwise we get problems with the backdrop // @todo: There should be a better workaround than this Factory::getDocument()->addScriptDeclaration( <<<JS document.addEventListener('DOMContentLoaded', function() { var modal =document.getElementById('{$options['selector']}'); document.body.appendChild(modal); if (Joomla && Joomla.Bootstrap && Joomla.Bootstrap.Methods && Joomla.Bootstrap.Methods.Modal) { Joomla.Bootstrap.Methods.Initialise.Modal(modal); } }); JS ); } // If an $onClose event is passed, add it to the modal JS object if ((string) $this->getOnclose() !== '') { Factory::getDocument()->addScriptDeclaration( <<<JS document.addEventListener('DOMContentLoaded', function() { document.querySelector('#{$options['selector']}').addEventListener('hide.bs.modal', function() { {$options['onclose']} }); }); JS ); } return implode("\n", $html); } /** * Get the JavaScript command for the button * * @param string $url URL for popup * * @return string JavaScript command string * * @since 3.0 */ private function _getCommand($url) { $url ??= ''; if (!str_starts_with($url, 'http')) { $url = Uri::base() . $url; } return $url; } /** * Method to configure available option accessors. * * @return array * * @since 4.0.0 */ protected static function getAccessors(): array { return array_merge( parent::getAccessors(), [ 'url', 'iframeWidth', 'iframeHeight', 'bodyHeight', 'modalWidth', 'modalHeight', 'onclose', 'title', 'footer', 'selector', 'listCheck', 'popupType', 'textHeader', ] ); } } PK "�\ O^�� � Button/DropdownButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Toolbar\ToolbarButton; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Render dropdown buttons. * * @method self toggleSplit(bool $value) * @method self toggleButtonClass(string $value) * @method bool getToggleSplit() * @method string getToggleButtonClass() * * @since 4.0.0 */ class DropdownButton extends AbstractGroupButton { /** * Property layout. * * @var string * @since 4.0.0 */ protected $layout = 'joomla.toolbar.dropdown'; /** * Prepare options for this button. * * @param array $options The options about this button. * * @return void * * @since 4.0.0 * @throws \Exception */ protected function prepareOptions(array &$options) { parent::prepareOptions($options); $childToolbar = $this->getChildToolbar(); $options['hasButtons'] = \count($childToolbar->getItems()) > 0; $buttons = $childToolbar->getItems(); if ($options['hasButtons']) { if ($this->getOption('toggleSplit', true)) { /** @var ToolbarButton $button */ $button = array_shift($buttons); $childToolbar->setItems($buttons); $options['button'] = $button->render(); $options['caretClass'] = $options['toggleButtonClass'] ?? $button->getButtonClass(); $options['dropdownItems'] = $childToolbar->render(['is_child' => true]); } else { $options['dropdownItems'] = $childToolbar->render(['is_child' => true]); $button = new BasicButton($this->getName(), $this->getText(), $options); $options['button'] = $button ->setParent($this->parent) ->buttonClass($button->getButtonClass() . ' dropdown-toggle') ->attributes( [ 'data-bs-toggle' => 'dropdown', 'data-bs-target' => '#' . $this->fetchId(), 'aria-haspopup' => 'true', 'aria-expanded' => 'false', ] ) ->render(); } } } /** * Get the button CSS Id. * * @return string Button CSS Id * * @since 4.0.0 */ protected function fetchId() { return $this->parent->getName() . '-dropdown-' . $this->getName(); } /** * Method to configure available option accessors. * * @return array * * @since 4.0.0 */ protected static function getAccessors(): array { return array_merge( parent::getAccessors(), [ 'toggleSplit', 'toggleButtonClass', ] ); } } PK "�\�_�!� � Button/HelpButton.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar\Button; use Joomla\CMS\Help\Help; use Joomla\CMS\Language\Text; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Renders a help popup window button * * @method self ref(string $value) * @method self component(string $value) * @method self useComponent(bool $value) * @method self url(string $value) * @method string getRef() * @method string getComponent() * @method bool getUseComponent() * @method string getUrl() * * @since 3.0 */ class HelpButton extends BasicButton { /** * Prepare options for this button. * * @param array $options The options about this button. * * @return void * * @since 4.0.0 */ protected function prepareOptions(array &$options) { $options['text'] = $options['text'] ?: 'JTOOLBAR_HELP'; $options['icon'] ??= 'icon-question'; $options['button_class'] = ($options['button_class'] ?? 'btn btn-info') . ' js-toolbar-help-btn'; $options['attributes']['data-url'] = $this->_getCommand(); $options['attributes']['data-title'] = Text::_('JHELP'); $options['attributes']['data-width'] = 700; $options['attributes']['data-height'] = 500; $options['attributes']['data-scroll'] = true; parent::prepareOptions($options); } /** * Fetches the button HTML code. * * @param string $type Unused string. * @param string $ref The name of the help screen (its key reference). * @param boolean $com Use the help file in the component directory. * @param string $override Use this URL instead of any other. * @param string $component Name of component to get Help (null for current component) * * @return string * * @since 3.0 * * @deprecated 4.3 will be removed in 6.0 * Use render() instead. */ public function fetchButton($type = 'Help', $ref = '', $com = false, $override = null, $component = null) { $this->name('help') ->ref($ref) ->useComponent($com) ->component($component) ->url($override); return $this->renderButton($this->options); } /** * Get the JavaScript command for the button * * @return string JavaScript command string * * @since 3.0 */ protected function _getCommand() { // Get Help URL return Help::createUrl($this->getRef(), $this->getUseComponent(), $this->getUrl(), $this->getComponent()); } /** * Method to configure available option accessors. * * @return array * * @since 4.0.0 */ protected static function getAccessors(): array { return array_merge( parent::getAccessors(), [ 'ref', 'useComponent', 'component', 'url', ] ); } } PK "�\�Sʉ� � Button/.htaccessnu �7��m <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>PK "�\�&I�\ �\ ToolbarHelper.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Table\Table; use Joomla\CMS\Uri\Uri; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Utility class for the button bar. * * @since 1.5 */ abstract class ToolbarHelper { /** * Title cell. * For the title and toolbar to be rendered correctly, * this title function must be called before the starttable function and the toolbars icons * this is due to the nature of how the css has been used to position the title in respect to the toolbar. * * @param string $title The title. * @param string $icon The space-separated names of the image. * * @return void * * @since 1.5 */ public static function title($title, $icon = 'generic.png') { $layout = new FileLayout('joomla.toolbar.title'); $html = $layout->render(['title' => $title, 'icon' => $icon]); $app = Factory::getApplication(); // @deprecated 5.2.0 will be removed in 7.0 as this property is not used anymore see WebApplication $app->JComponentTitle = $html; $title = strip_tags($title) . ' - ' . $app->get('sitename'); if ($app->isClient('administrator')) { $title .= ' - ' . Text::_('JADMINISTRATION'); } $app->getDocument()->setTitle($title); } /** * Writes a spacer cell. * * @param string $width The width for the cell * * @return void * * @since 1.5 */ public static function spacer($width = '') { $bar = Toolbar::getInstance('toolbar'); // Add a spacer. $bar->appendButton('Separator', 'spacer', $width); } /** * Writes a divider between menu buttons * * @return void * * @since 1.5 */ public static function divider() { $bar = Toolbar::getInstance('toolbar'); // Add a divider. $bar->appendButton('Separator', 'divider'); } /** * Writes a custom option and task button for the button bar. * * @param string $task The task to perform (picked up by the switch($task) blocks). * @param string $icon The image to display. * @param string $iconOver @deprecated 4.3 will be removed in 6.0 * @param string $alt The alt text for the icon image. * @param bool $listSelect True if required to check that a standard list item is checked. * @param string $formId The id of action form. * * @return void * * @since 1.5 */ public static function custom($task = '', $icon = '', $iconOver = '', $alt = '', $listSelect = true, $formId = null) { $bar = Toolbar::getInstance('toolbar'); // Strip extension. $icon = preg_replace('#\.[^.]*$#', '', $icon); // Add a standard button. $bar->appendButton('Standard', $icon, $alt, $task, $listSelect, $formId); } /** * Writes a preview button for a given option (opens a popup window). * * @param string $url The name of the popup file (excluding the file extension) * @param bool $updateEditors Unused * @param string $icon The image to display. * @param integer $bodyHeight The body height of the preview popup * @param integer $modalWidth The modal width of the preview popup * * @return void * * @since 1.5 */ public static function preview($url = '', $updateEditors = false, $icon = 'preview', $bodyHeight = null, $modalWidth = null) { $bar = Toolbar::getInstance('toolbar'); // Add a preview button. $bar->appendButton('Popup', $icon, 'Preview', $url . '&task=preview', 640, 480, $bodyHeight, $modalWidth); } /** * Writes a jooa11y accessibility checker button for a given option (opens a popup window). * * @param string $url The url to open * @param bool $updateEditors Unused * @param string $icon The image to display. * @param integer $bodyHeight The body height of the preview popup * @param integer $modalWidth The modal width of the preview popup * * @return void * * @since 4.1.0 */ public static function jooa11y($url = '', $updateEditors = false, $icon = 'icon-universal-access', $bodyHeight = null, $modalWidth = null) { $bar = Toolbar::getInstance('toolbar'); // Add a button. $bar->appendButton('Popup', $icon, 'Preview', $url . '&task=preview', 640, 480, $bodyHeight, $modalWidth); } /** * Writes a help button for a given option (opens a popup window). * * @param string $ref The name of the popup file (excluding the file extension for an xml file). * @param bool $com Use the help file in the component directory. * @param string $override Use this URL instead of any other * @param string $component Name of component to get Help (null for current component) * * @return void * * @since 1.5 */ public static function help($ref, $com = false, $override = null, $component = null) { // Don't show a help button if neither $ref nor $override is given if (!$ref && !$override) { return; } $bar = Toolbar::getInstance('toolbar'); // Add a help button. $bar->appendButton('Help', $ref, $com, $override, $component); } /** * Writes a help button for showing/hiding the inline help of a form * * @param string $class The class used by the inline help items. * * @return void * * @since 4.1.0 */ public static function inlinehelp(string $class = "hide-aware-inline-help") { $bar = Toolbar::getInstance('toolbar'); $bar->inlinehelp($class); } /** * Writes a cancel button that will go back to the previous page without doing * any other operation. * * @param string $alt Alternative text. * @param string $href URL of the href attribute. * * @return void * * @since 1.5 */ public static function back($alt = 'JTOOLBAR_BACK', $href = 'javascript:history.back();') { $bar = Toolbar::getInstance('toolbar'); // Add a back button. $arrow = Factory::getLanguage()->isRtl() ? 'arrow-right' : 'arrow-left'; $bar->appendButton('Link', $arrow, $alt, $href); } /** * Creates a button to redirect to a link * * @param string $url The link url * @param string $text Button text * @param string $name Name to be used as apart of the id * * @return void * * @since 3.5 */ public static function link($url, $text, $name = 'link') { $bar = Toolbar::getInstance('toolbar'); $bar->appendButton('Link', $name, $text, $url); } /** * Writes a media_manager button. * * @param string $directory The subdirectory to upload the media to. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function media_manager($directory = '', $alt = 'JTOOLBAR_UPLOAD') { $bar = Toolbar::getInstance('toolbar'); // Add an upload button. $bar->appendButton('Popup', 'upload', $alt, 'index.php?option=com_media&tmpl=component&task=popupUpload&folder=' . $directory, 800, 520); } /** * Writes a common 'default' button for a record. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function makeDefault($task = 'default', $alt = 'JTOOLBAR_DEFAULT') { $bar = Toolbar::getInstance('toolbar'); // Add a default button. $bar->appendButton('Standard', 'default', $alt, $task, true); } /** * Writes a common 'assign' button for a record. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function assign($task = 'assign', $alt = 'JTOOLBAR_ASSIGN') { $bar = Toolbar::getInstance('toolbar'); // Add an assign button. $bar->appendButton('Standard', 'assign', $alt, $task, true); } /** * Writes the common 'new' icon for the button bar. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * @param boolean $check True if required to check that a standard list item is checked. * * @return void * * @since 1.5 */ public static function addNew($task = 'add', $alt = 'JTOOLBAR_NEW', $check = false) { $bar = Toolbar::getInstance('toolbar'); // Add a new button. $bar->appendButton('Standard', 'new', $alt, $task, $check); } /** * Writes a common 'publish' button. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * @param boolean $check True if required to check that a standard list item is checked. * * @return void * * @since 1.5 */ public static function publish($task = 'publish', $alt = 'JTOOLBAR_PUBLISH', $check = false) { $bar = Toolbar::getInstance('toolbar'); // Add a publish button. $bar->appendButton('Standard', 'publish', $alt, $task, $check); } /** * Writes a common 'publish' button for a list of records. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function publishList($task = 'publish', $alt = 'JTOOLBAR_PUBLISH') { $bar = Toolbar::getInstance('toolbar'); // Add a publish button (list). $bar->appendButton('Standard', 'publish', $alt, $task, true); } /** * Writes a common 'unpublish' button. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * @param boolean $check True if required to check that a standard list item is checked. * * @return void * * @since 1.5 */ public static function unpublish($task = 'unpublish', $alt = 'JTOOLBAR_UNPUBLISH', $check = false) { $bar = Toolbar::getInstance('toolbar'); // Add an unpublish button $bar->appendButton('Standard', 'unpublish', $alt, $task, $check); } /** * Writes a common 'unpublish' button for a list of records. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function unpublishList($task = 'unpublish', $alt = 'JTOOLBAR_UNPUBLISH') { $bar = Toolbar::getInstance('toolbar'); // Add an unpublish button (list). $bar->appendButton('Standard', 'unpublish', $alt, $task, true); } /** * Writes a common 'archive' button for a list of records. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function archiveList($task = 'archive', $alt = 'JTOOLBAR_ARCHIVE') { $bar = Toolbar::getInstance('toolbar'); // Add an archive button. $bar->appendButton('Standard', 'archive', $alt, $task, true); } /** * Writes an unarchive button for a list of records. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function unarchiveList($task = 'unarchive', $alt = 'JTOOLBAR_UNARCHIVE') { $bar = Toolbar::getInstance('toolbar'); // Add an unarchive button (list). $bar->appendButton('Standard', 'unarchive', $alt, $task, true); } /** * Writes a common 'edit' button for a list of records. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function editList($task = 'edit', $alt = 'JTOOLBAR_EDIT') { $bar = Toolbar::getInstance('toolbar'); // Add an edit button. $bar->appendButton('Standard', 'edit', $alt, $task, true); } /** * Writes a common 'edit' button for a template html. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function editHtml($task = 'edit_source', $alt = 'JTOOLBAR_EDIT_HTML') { $bar = Toolbar::getInstance('toolbar'); // Add an edit html button. $bar->appendButton('Standard', 'edithtml', $alt, $task, true); } /** * Writes a common 'edit' button for a template css. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function editCss($task = 'edit_css', $alt = 'JTOOLBAR_EDIT_CSS') { $bar = Toolbar::getInstance('toolbar'); // Add an edit css button (hide). $bar->appendButton('Standard', 'editcss', $alt, $task, true); } /** * Writes a common 'delete' button for a list of records. * * @param string $msg Postscript for the 'are you sure' message. * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function deleteList($msg = '', $task = 'remove', $alt = 'JTOOLBAR_DELETE') { $bar = Toolbar::getInstance('toolbar'); // Add a delete button. if ($msg) { $bar->appendButton('Confirm', $msg, 'delete', $alt, $task, true); } else { $bar->appendButton('Standard', 'delete', $alt, $task, true); } } /** * Writes a common 'trash' button for a list of records. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * @param bool $check True to allow lists. * * @return void * * @since 1.5 */ public static function trash($task = 'remove', $alt = 'JTOOLBAR_TRASH', $check = true) { $bar = Toolbar::getInstance('toolbar'); // Add a trash button. $bar->appendButton('Standard', 'trash', $alt, $task, $check, false); } /** * Writes a save button for a given option. * Apply operation leads to a save action only (does not leave edit mode). * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function apply($task = 'apply', $alt = 'JTOOLBAR_APPLY') { $bar = Toolbar::getInstance('toolbar'); // Add an apply button $bar->apply($task, $alt); } /** * Writes a save button for a given option. * Save operation leads to a save and then close action. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function save($task = 'save', $alt = 'JTOOLBAR_SAVE') { $bar = Toolbar::getInstance('toolbar'); // Add a save button. $bar->save($task, $alt); } /** * Writes a save and create new button for a given option. * Save and create operation leads to a save and then add action. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.6 */ public static function save2new($task = 'save2new', $alt = 'JTOOLBAR_SAVE_AND_NEW') { $bar = Toolbar::getInstance('toolbar'); // Add a save and create new button. $bar->save2new($task, $alt); } /** * Writes a save as copy button for a given option. * Save as copy operation leads to a save after clearing the key, * then returns user to edit mode with new key. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.6 */ public static function save2copy($task = 'save2copy', $alt = 'JTOOLBAR_SAVE_AS_COPY') { $bar = Toolbar::getInstance('toolbar'); // Add a save and create new button. $bar->save2copy($task, $alt); } /** * Writes a checkin button for a given option. * * @param string $task An override for the task. * @param string $alt An override for the alt text. * @param boolean $check True if required to check that a standard list item is checked. * * @return void * * @since 1.7 */ public static function checkin($task = 'checkin', $alt = 'JTOOLBAR_CHECKIN', $check = true) { $bar = Toolbar::getInstance('toolbar'); // Add a save and create new button. $bar->appendButton('Standard', 'checkin', $alt, $task, $check); } /** * Writes a cancel button and invokes a cancel operation (eg a checkin). * * @param string $task An override for the task. * @param string $alt An override for the alt text. * * @return void * * @since 1.5 */ public static function cancel($task = 'cancel', $alt = 'JTOOLBAR_CANCEL') { $bar = Toolbar::getInstance('toolbar'); // Add a cancel button. $bar->appendButton('Standard', 'cancel', $alt, $task, false); } /** * Writes a configuration button and invokes a cancel operation (eg a checkin). * * @param string $component The name of the component, eg, com_content. * @param integer $height The height of the popup. [UNUSED] * @param integer $width The width of the popup. [UNUSED] * @param string $alt The name of the button. * @param string $path An alternative path for the configuration xml relative to JPATH_SITE. * * @return void * * @since 1.5 */ public static function preferences($component, $height = 550, $width = 875, $alt = 'JTOOLBAR_OPTIONS', $path = '') { $component = urlencode($component); $path = urlencode($path); $bar = Toolbar::getInstance('toolbar'); $uri = (string) Uri::getInstance(); $return = urlencode(base64_encode($uri)); // Add a button linking to config for component. $bar->appendButton( 'Link', 'options', $alt, 'index.php?option=com_config&view=component&component=' . $component . '&path=' . $path . '&return=' . $return ); } /** * Writes a version history * * @param string $typeAlias The component and type, for example 'com_content.article' * @param integer $itemId The id of the item, for example the article id. * @param integer $height The height of the popup. * @param integer $width The width of the popup. * @param string $alt The name of the button. * * @return void * * @since 3.2 */ public static function versions($typeAlias, $itemId, $height = 800, $width = 500, $alt = 'JTOOLBAR_VERSIONS') { $lang = Factory::getLanguage(); $lang->load('com_contenthistory', JPATH_ADMINISTRATOR, $lang->getTag(), true); /** @var \Joomla\CMS\Table\ContentType $contentTypeTable */ $contentTypeTable = Table::getInstance('ContentType', '\\Joomla\\CMS\\Table\\'); $typeId = $contentTypeTable->getTypeId($typeAlias); // Options array for Layout $options = []; $options['title'] = Text::_($alt); $options['height'] = $height; $options['width'] = $width; $options['itemId'] = $typeAlias . '.' . $itemId; $bar = Toolbar::getInstance('toolbar'); $layout = new FileLayout('joomla.toolbar.versions'); $bar->appendButton('Custom', $layout->render($options), 'versions'); } /** * Writes a save button for a given option, with an additional dropdown * * @param array $buttons An array of buttons * @param string $class The button class * * @return void * * @since 4.0.0 */ public static function saveGroup($buttons = [], $class = 'btn-success') { $validOptions = [ 'apply' => 'JTOOLBAR_APPLY', 'save' => 'JTOOLBAR_SAVE', 'save2new' => 'JTOOLBAR_SAVE_AND_NEW', 'save2copy' => 'JTOOLBAR_SAVE_AS_COPY', ]; $bar = Toolbar::getInstance('toolbar'); $saveGroup = $bar->dropdownButton('save-group'); $saveGroup->configure( function (Toolbar $childBar) use ($buttons, $validOptions) { foreach ($buttons as $button) { if (!\array_key_exists($button[0], $validOptions)) { continue; } $altText = $button[2] ?? $validOptions[$button[0]]; $childBar->{$button[0]}($button[1]) ->text($altText); } } ); } /** * Displays a modal button * * @param string $targetModalId ID of the target modal box * @param string $icon Icon class to show on modal button * @param string $alt Title for the modal button * @param string $class The button class * * @return void * * @since 3.2 */ public static function modal($targetModalId, $icon, $alt, $class = 'btn-primary') { $title = Text::_($alt); $dhtml = '<joomla-toolbar-button><button data-bs-toggle="modal" data-bs-target="#' . $targetModalId . '" class="btn ' . $class . '"> <span class="' . $icon . ' icon-fw" title="' . $title . '"></span> ' . $title . '</button></joomla-toolbar-button>'; $bar = Toolbar::getInstance('toolbar'); $bar->appendButton('Custom', $dhtml, $alt); } } PK "�\/ݲ�C C ContainerAwareToolbarFactory.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar; use Joomla\CMS\Filter\InputFilter; use Joomla\CMS\Language\Text; use Joomla\CMS\Log\Log; use Joomla\DI\ContainerAwareInterface; use Joomla\DI\ContainerAwareTrait; use Joomla\Filesystem\Path; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Default factory for creating toolbar objects * * @since 4.0.0 */ class ContainerAwareToolbarFactory implements ToolbarFactoryInterface, ContainerAwareInterface { use ContainerAwareTrait; /** * Creates a new toolbar button. * * @param Toolbar $toolbar The Toolbar instance to attach to the button * @param string $type Button Type * * @return ToolbarButton * * @since 3.8.0 * @throws \InvalidArgumentException */ public function createButton(Toolbar $toolbar, string $type): ToolbarButton { $normalisedType = ucfirst($type); $buttonClass = $this->loadButtonClass($normalisedType); if (!$buttonClass) { $dirs = $toolbar->getButtonPath(); $file = InputFilter::getInstance()->clean(str_replace('_', DIRECTORY_SEPARATOR, strtolower($type)) . '.php', 'path'); if ($buttonFile = Path::find($dirs, $file)) { include_once $buttonFile; } else { Log::add(Text::sprintf('JLIB_HTML_BUTTON_NO_LOAD', $buttonClass, $buttonFile), Log::WARNING, 'jerror'); throw new \InvalidArgumentException(Text::sprintf('JLIB_HTML_BUTTON_NO_LOAD', $buttonClass, $buttonFile)); } } if (!class_exists($buttonClass)) { throw new \InvalidArgumentException(\sprintf('Class `%1$s` does not exist, could not create a toolbar button.', $buttonClass)); } // Check for a possible service from the container otherwise manually instantiate the class if ($this->getContainer()->has($buttonClass)) { return $this->getContainer()->get($buttonClass); } /** @var ToolbarButton $button */ $button = new $buttonClass($normalisedType); return $button->setParent($toolbar); } /** * Creates a new Toolbar object. * * @param string $name The toolbar name. * * @return Toolbar * * @since 4.0.0 */ public function createToolbar(string $name = 'toolbar'): Toolbar { return new Toolbar($name, $this); } /** * Load the button class including the deprecated ones. * * @param string $type Button Type (normalized) * * @return string|null * * @since 4.0.0 */ private function loadButtonClass(string $type) { $buttonClasses = [ 'Joomla\\CMS\\Toolbar\\Button\\' . $type . 'Button', /** * @deprecated 4.3 will be removed in 6.0 */ 'JToolbarButton' . $type, ]; foreach ($buttonClasses as $buttonClass) { if (!class_exists($buttonClass)) { continue; } return $buttonClass; } return null; } } PK "�\��n/ / ToolbarFactoryInterface.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Interface for creating toolbar objects * * @since 4.0.0 */ interface ToolbarFactoryInterface { /** * Creates a new toolbar button. * * @param Toolbar $toolbar The Toolbar instance to attach to the button * @param string $type Button Type * * @return ToolbarButton * * @since 4.0.0 * @throws \InvalidArgumentException */ public function createButton(Toolbar $toolbar, string $type): ToolbarButton; /** * Creates a new Toolbar object. * * @param string $name The toolbar name. * * @return Toolbar * * @since 4.0.0 */ public function createToolbar(string $name = 'toolbar'): Toolbar; } PK "�\�s��@ �@ CoreButtonsTrait.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Toolbar; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\FileLayout; use Joomla\CMS\Toolbar\Button\ConfirmButton; use Joomla\CMS\Toolbar\Button\CustomButton; use Joomla\CMS\Toolbar\Button\HelpButton; use Joomla\CMS\Toolbar\Button\InlinehelpButton; use Joomla\CMS\Toolbar\Button\LinkButton; use Joomla\CMS\Toolbar\Button\PopupButton; use Joomla\CMS\Toolbar\Button\SeparatorButton; use Joomla\CMS\Toolbar\Button\StandardButton; use Joomla\CMS\Uri\Uri; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Enhance Toolbar class to add more pre-defined methods. * * @since 4.0.0 */ trait CoreButtonsTrait { /** * Writes a divider between dropdown menu items. * * @param string $text The text of button. * * @return SeparatorButton * * @since 4.0.0 */ public function divider(string $text = ''): SeparatorButton { return $this->separatorButton('divider', $text); } /** * Writes a preview button for a given option (opens a popup window). * * @param string $url The name of the popup file (excluding the file extension) * @param string $text The text of button. * @param bool $newWindow Whether to open the preview in _blank or just a modal * * @return PopupButton|LinkButton * * @since 4.0.0 */ public function preview(string $url, string $text = 'JGLOBAL_PREVIEW', $newWindow = false) { if ($newWindow === true) { $button = $this->linkButton('link', $text) ->url($url) ->attributes(['target' => '_blank']) ->icon('icon-eye'); } else { $button = $this->popupButton('preview', $text) ->url($url) ->iframeWidth(640) ->iframeHeight(480) ->icon('icon-eye'); } return $button; } /** * Writes a jooa11y accessibility checker button for a given option (opens a popup window). * * @param string $url The url to open * @param string $text The text of button. * @param bool $newWindow Whether to open the preview in _blank or just a modal * * @return PopupButton|LinkButton * * @since 4.1.0 */ public function jooa11y(string $url, string $text = 'JGLOBAL_JOOA11Y', $newWindow = false) { if ($newWindow === true) { $button = $this->linkButton('jooa11y-link', $text) ->url($url) ->attributes(['target' => '_blank']) ->icon('icon-universal-access'); } else { $button = $this->popupButton('jooa11y-preview', $text) ->url($url) ->iframeWidth(640) ->iframeHeight(480) ->icon('icon-universal-access'); } return $button; } /** * Writes a help button for a given option (opens a popup window). * * @param string $ref The name of the popup file (excluding the file extension for an xml file). * @param bool $useComponent Use the help file in the component directory. * @param string $url Use this URL instead of any other. * @param string $component Name of component to get Help (null for current component) * * @return HelpButton * * @since 4.0.0 */ public function help($ref, $useComponent = false, $url = null, $component = null): HelpButton { return $this->helpButton('help', 'JTOOLBAR_HELP') ->ref($ref) ->useComponent($useComponent) ->url($url) ->component($component); } /** * Writes a help button for a given option (opens a popup window). * * @param string $class The class used by the inline help items. * * @return InlinehelpButton * * @since 4.3.0 */ public function inlinehelp(string $class = 'hide-aware-inline-help'): InlinehelpButton { return $this->inlinehelpButton('inlinehelp') ->targetclass($class) ->icon('fa fa-question-circle'); } /** * Writes a cancel button that will go back to the previous page without doing * any other operation. * * @param string $text The text of button. * * @return LinkButton * * @since 4.0.0 */ public function back(string $text = 'JTOOLBAR_BACK'): LinkButton { return $this->link($text, 'javascript:history.back();'); } /** * Creates a button to redirect to a link. * * @param string $text Button text. * @param string $url The link url. * * @return LinkButton * * @since 4.0.0 */ public function link(string $text, string $url): LinkButton { return $this->linkButton('link', $text) ->url($url); } /** * Writes a media_manager button. * * @param string $directory The subdirectory to upload the media to. * @param string $text An override for the alt text. * * @return PopupButton * * @since 4.0.0 */ public function mediaManager(string $directory, string $text = 'JTOOLBAR_UPLOAD'): PopupButton { return $this->popupButton('upload', $text) ->iframeWidth(800) ->iframeHeight(520) ->url('index.php?option=com_media&tmpl=component&task=popupUpload&folder=' . $directory); } /** * Writes a common 'default' button for a record. * * @param string $task An override for the task. * @param string $text An override for the alt text. * * @return StandardButton * * @since 4.0.0 */ public function makeDefault(string $task, string $text = 'JTOOLBAR_DEFAULT'): StandardButton { return $this->standardButton('default', $text, $task); } /** * Writes a common 'assign' button for a record. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function assign(string $task, string $text = 'JTOOLBAR_ASSIGN'): StandardButton { return $this->standardButton('assign', $text, $task); } /** * Writes the common 'new' icon for the button bar. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function addNew(string $task, string $text = 'JTOOLBAR_NEW'): StandardButton { return $this->standardButton('new', $text, $task); } /** * Writes a common 'publish' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function publish(string $task, string $text = 'JTOOLBAR_PUBLISH'): StandardButton { return $this->standardButton('publish', $text, $task); } /** * Writes a common 'unpublish' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function unpublish(string $task, string $text = 'JTOOLBAR_UNPUBLISH'): StandardButton { return $this->standardButton('unpublish', $text, $task); } /** * Writes a common 'archive' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function archive(string $task, string $text = 'JTOOLBAR_ARCHIVE'): StandardButton { return $this->standardButton('archive', $text, $task); } /** * Writes a common 'unarchive' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function unarchive(string $task, string $text = 'JTOOLBAR_UNARCHIVE'): StandardButton { return $this->standardButton('unarchive', $text, $task); } /** * Writes a common 'edit' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function edit(string $task, string $text = 'JTOOLBAR_EDIT'): StandardButton { return $this->standardButton('edit', $text, $task); } /** * Writes a common 'editHtml' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function editHtml(string $task, string $text = 'JTOOLBAR_EDIT_HTML'): StandardButton { return $this->standardButton('edithtml', $text, $task); } /** * Writes a common 'editCss' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function editCss(string $task, string $text = 'JTOOLBAR_EDIT_CSS'): StandardButton { return $this->standardButton('editcss', $text, $task); } /** * Writes a common 'delete' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return ConfirmButton * * @since 4.0.0 */ public function delete(string $task, string $text = 'JTOOLBAR_DELETE'): ConfirmButton { return $this->confirmButton('delete', $text, $task); } /** * Writes a common 'trash' button. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function trash(string $task, string $text = 'JTOOLBAR_TRASH'): StandardButton { return $this->standardButton('trash', $text, $task); } /** * Writes a save button for a given option. * Apply operation leads to a save action only (does not leave edit mode). * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function apply(string $task, string $text = 'JTOOLBAR_APPLY'): StandardButton { return $this->standardButton('apply', $text, $task) ->formValidation(true); } /** * Writes a save button for a given option. * Save operation leads to a save and then close action. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function save(string $task, string $text = 'JTOOLBAR_SAVE'): StandardButton { return $this->standardButton('save', $text, $task) ->formValidation(true); } /** * Writes a save and create new button for a given option. * Save and create operation leads to a save and then add action. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function save2new(string $task, string $text = 'JTOOLBAR_SAVE_AND_NEW'): StandardButton { return $this->standardButton('save-new', $text, $task) ->formValidation(true); } /** * Writes a save as copy button for a given option. * Save as copy operation leads to a save after clearing the key, * then returns user to edit mode with new key. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function save2copy(string $task, string $text = 'JTOOLBAR_SAVE_AS_COPY'): StandardButton { return $this->standardButton('save-copy', $text, $task) ->formValidation(true); } /** * Writes a checkin button for a given option. * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function checkin(string $task, string $text = 'JTOOLBAR_CHECKIN'): StandardButton { return $this->standardButton('checkin', $text, $task) ->listCheck(true); } /** * Writes a cancel button and invokes a cancel operation (eg a checkin). * * @param string $task The task name of this button. * @param string $text The text of this button. * * @return StandardButton * * @since 4.0.0 */ public function cancel(string $task, string $text = 'JTOOLBAR_CLOSE'): StandardButton { return $this->standardButton('cancel', $text, $task); } /** * Writes a configuration button and invokes a cancel operation (eg a checkin). * * @param string $component The name of the component, eg, com_content. * @param string $text The text of this button. * @param string $path An alternative path for the configuration xml relative to JPATH_SITE. * * @return LinkButton * * @since 4.0.0 */ public function preferences(string $component, string $text = 'JTOOLBAR_OPTIONS', string $path = ''): LinkButton { $component = urlencode($component); $path = urlencode($path); $uri = (string) Uri::getInstance(); $return = urlencode(base64_encode($uri)); return $this->linkButton('options', $text) ->url('index.php?option=com_config&view=component&component=' . $component . '&path=' . $path . '&return=' . $return); } /** * Writes a version history * * @param string $typeAlias The component and type, for example 'com_content.article' * @param integer $itemId The id of the item, for example the article id. * @param integer $height The height of the popup. * @param integer $width The width of the popup. * @param string $text The name of the button. * * @return CustomButton * * @since 4.0.0 */ public function versions( string $typeAlias, int $itemId, int $height = 800, int $width = 500, string $text = 'JTOOLBAR_VERSIONS' ): CustomButton { $lang = Factory::getLanguage(); $lang->load('com_contenthistory', JPATH_ADMINISTRATOR, $lang->getTag(), true); // Options array for Layout $options = []; $options['title'] = Text::_($text); $options['height'] = $height; $options['width'] = $width; $options['itemId'] = $typeAlias . '.' . $itemId; $layout = new FileLayout('joomla.toolbar.versions'); return $this->customHtml($layout->render($options), 'version'); } /** * Writes a custom HTML to toolbar. * * @param string $html The HTML string to write. * @param string $name The button name. * * @return CustomButton * * @since 4.0.0 */ public function customHtml(string $html, string $name = 'custom'): CustomButton { return $this->customButton($name) ->html($html); } } PK "�\�Sʉ� � .htaccessnu �7��m <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>PK �)�\QeJi i Exception/MissingAttribute.phpnu �[��� <?php /** * @package FOF * @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ namespace FOF40\Toolbar\Exception; defined('_JEXEC') || die; use Exception; use Joomla\CMS\Language\Text; class MissingAttribute extends \InvalidArgumentException { public function __construct(string $missingArgument, string $buttonType, int $code = 500, Exception $previous = null) { $message = Text::sprintf('LIB_FOF40_TOOLBAR_ERR_MISSINGARGUMENT', $missingArgument, $buttonType); parent::__construct($message, $code, $previous); } } PK �)�\�YoA A Exception/UnknownButtonType.phpnu �[��� <?php /** * @package FOF * @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ namespace FOF40\Toolbar\Exception; defined('_JEXEC') || die; use Exception; use Joomla\CMS\Language\Text; class UnknownButtonType extends \InvalidArgumentException { public function __construct(string $buttonType, int $code = 500, Exception $previous = null) { $message = Text::sprintf('LIB_FOF40_TOOLBAR_ERR_UNKNOWNBUTTONTYPE', $buttonType); parent::__construct($message, $code, $previous); } } PK �)�\�Sʉ� � Exception/.htaccessnu �7��m <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>PK "�\hD�Q�u �u Toolbar.phpnu �[��� PK "�\��8��/ �/ �u ToolbarButton.phpnu �[��� PK "�\���� � �� Button/CustomButton.phpnu �[��� PK "�\�[� � � Button/SeparatorButton.phpnu �[��� PK "�\g�A A ʰ Button/BasicButton.phpnu �[��� PK "�\A�E6 6 Q� Button/AbstractGroupButton.phpnu �[��� PK "�\)� ջ Button/ConfirmButton.phpnu �[��� PK "�\��uko o 2� Button/StandardButton.phpnu �[��� PK "�\��4{� � �� Button/InlinehelpButton.phpnu �[��� PK "�\]�2Q Q �� Button/LinkButton.phpnu �[��� PK "�\�7\5� � z� Button/PopupButton.phpnu �[��� PK "�\ O^�� � M Button/DropdownButton.phpnu �[��� PK "�\�_�!� � ' Button/HelpButton.phpnu �[��� PK "�\�Sʉ� � U" Button/.htaccessnu �7��m PK "�\�&I�\ �\ �# ToolbarHelper.phpnu �[��� PK "�\/ݲ�C C v� ContainerAwareToolbarFactory.phpnu �[��� PK "�\��n/ / � ToolbarFactoryInterface.phpnu �[��� PK "�\�s��@ �@ �� CoreButtonsTrait.phpnu �[��� PK "�\�Sʉ� � o� .htaccessnu �7��m PK �)�\QeJi i �� Exception/MissingAttribute.phpnu �[��� PK �)�\�YoA A L� Exception/UnknownButtonType.phpnu �[��� PK �)�\�Sʉ� � �� Exception/.htaccessnu �7��m PK o �
| ver. 1.4 |
Github
|
.
| PHP 8.2.32 | Generation time: 0.07 |
proxy
|
phpinfo
|
Settings