File tree Expand file tree Collapse file tree 4 files changed +86
-21
lines changed
administrator/modules/mod_title Expand file tree Collapse file tree 4 files changed +86
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99 <authorUrl >www.joomla.org</authorUrl >
1010 <version >3.0.0</version >
1111 <description >MOD_TITLE_XML_DESCRIPTION</description >
12+ <namespace path =" src" >Joomla\Module\Title</namespace >
1213 <files >
13- <filename module =" mod_title" >mod_title.php</filename >
14+ <folder module =" mod_title" >services</folder >
15+ <folder >src</folder >
1416 <folder >tmpl</folder >
1517 </files >
1618 <languages >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * @package Joomla.Administrator
5+ * @subpackage mod_title
6+ *
7+ * @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
8+ * @license GNU General Public License version 2 or later; see LICENSE.txt
9+ */
10+
11+ \defined ('_JEXEC ' ) or die;
12+
13+ use Joomla \CMS \Extension \Service \Provider \Module ;
14+ use Joomla \CMS \Extension \Service \Provider \ModuleDispatcherFactory ;
15+ use Joomla \DI \Container ;
16+ use Joomla \DI \ServiceProviderInterface ;
17+
18+ /**
19+ * The title module service provider.
20+ *
21+ * @since __DEPLOY_VERSION__
22+ */
23+ return new class () implements ServiceProviderInterface {
24+ /**
25+ * Registers the service provider with a DI container.
26+ *
27+ * @param Container $container The DI container.
28+ *
29+ * @return void
30+ *
31+ * @since __DEPLOY_VERSION__
32+ */
33+ public function register (Container $ container )
34+ {
35+ $ container ->registerServiceProvider (new ModuleDispatcherFactory ('\\Joomla \\Module \\Title ' ));
36+
37+ $ container ->registerServiceProvider (new Module ());
38+ }
39+ };
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * @package Joomla.Administrator
5+ * @subpackage mod_title
6+ *
7+ * @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
8+ * @license GNU General Public License version 2 or later; see LICENSE.txt
9+ */
10+
11+ namespace Joomla \Module \Title \Administrator \Dispatcher ;
12+
13+ use Joomla \CMS \Dispatcher \AbstractModuleDispatcher ;
14+
15+ // phpcs:disable PSR1.Files.SideEffects
16+ \defined ('_JEXEC ' ) or die;
17+ // phpcs:enable PSR1.Files.SideEffects
18+
19+ /**
20+ * Dispatcher class for mod_title
21+ *
22+ * @since __DEPLOY_VERSION__
23+ */
24+ class Dispatcher extends AbstractModuleDispatcher
25+ {
26+ /**
27+ * Returns the layout data.
28+ *
29+ * @return array
30+ *
31+ * @since __DEPLOY_VERSION__
32+ */
33+ protected function getLayoutData ()
34+ {
35+ $ data = parent ::getLayoutData ();
36+
37+ // Get the component title div
38+ if (isset ($ this ->getApplication ()->JComponentTitle )) {
39+ $ data ['title ' ] = $ this ->getApplication ()->JComponentTitle ;
40+ }
41+
42+ return $ data ;
43+ }
44+ }
You can’t perform that action at this time.
0 commit comments