primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="module" client="administrator" method="upgrade">
<name>mod_multilangstatus</name>
<author>Joomla! Project</author>
<creationDate>2011-09</creationDate>
<copyright>(C) 2011 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.0.0</version>
<description>MOD_MULTILANGSTATUS_XML_DESCRIPTION</description>
<namespace path="src">Joomla\Module\MultilangStatus</namespace>
<files>
<folder module="mod_multilangstatus">services</folder>
<folder>src</folder>
<folder>tmpl</folder>
</files>
<languages>
<language tag="en-GB">language/en-GB/mod_multilangstatus.ini</language>
<language tag="en-GB">language/en-GB/mod_multilangstatus.sys.ini</language>
</languages>
<help key="Admin_Modules:_Multilingual_Status" />
<config>
<fields name="params">
<fieldset name="advanced">
<field
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
class="form-select"
validate="moduleLayout"
/>
<field
name="moduleclass_sfx"
type="textarea"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
rows="3"
validate="CssIdentifier"
/>
</fieldset>
</fields>
</config>
</extension>

View File

@ -0,0 +1,39 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_multilangstatus
*
* @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
use Joomla\CMS\Extension\Service\Provider\Module;
use Joomla\CMS\Extension\Service\Provider\ModuleDispatcherFactory;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
/**
* The multilanguage status module service provider.
*
* @since 5.1.0
*/
return new class () implements ServiceProviderInterface {
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 5.1.0
*/
public function register(Container $container)
{
$container->registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\MultilangStatus'));
$container->registerServiceProvider(new Module());
}
};

View File

@ -0,0 +1,44 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_multilangstatus
*
* @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Module\MultilangStatus\Administrator\Dispatcher;
use Joomla\CMS\Dispatcher\AbstractModuleDispatcher;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
use Joomla\Database\DatabaseInterface;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Dispatcher class for mod_multilangstatus
*
* @since 5.1.0
*/
class Dispatcher extends AbstractModuleDispatcher
{
/**
* Returns the layout data.
*
* @return array
*
* @since 5.1.0
*/
protected function getLayoutData()
{
$data = parent::getLayoutData();
$data['multilanguageEnabled'] = Multilanguage::isEnabled($this->getApplication(), Factory::getContainer()->get(DatabaseInterface::class));
return $data;
}
}

View File

@ -0,0 +1,39 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_multilangstatus
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
$hideLinks = $app->getInput()->getBool('hidemainmenu');
if (!$multilanguageEnabled || $hideLinks) {
return;
}
$app->getDocument()->getWebAssetManager()->useScript('joomla.dialog-autocreate');
$popupOptions = [
'popupType' => 'iframe',
'src' => Route::_('index.php?option=com_languages&view=multilangstatus&tmpl=component', false),
'textHeader' => Text::_('MOD_MULTILANGSTATUS'),
];
?>
<button type="button" class="header-item-content multilanguage" title="<?php echo htmlspecialchars(Text::_('MOD_MULTILANGSTATUS')); ?>"
data-joomla-dialog="<?php echo htmlspecialchars(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)) ?>">
<div class="header-item-icon">
<span class="icon-language" aria-hidden="true"></span>
</div>
<div class="header-item-text">
<?php echo Text::_('MOD_MULTILANGSTATUS'); ?>
</div>
</button>