Skip to content

Commit cfc16bd

Browse files
committed
Removing deprecated static methods from modules
1 parent 5acbe72 commit cfc16bd

File tree

23 files changed

+0
-745
lines changed

23 files changed

+0
-745
lines changed

administrator/modules/mod_feed/src/Helper/FeedHelper.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,4 @@ public function getFeedData(Registry $params, FeedFactory $feed): \Joomla\CMS\Fe
5353

5454
return $rssDoc;
5555
}
56-
57-
/**
58-
* Method to load a feed.
59-
*
60-
* @param \Joomla\Registry\Registry $params The parameters object.
61-
*
62-
* @return \Joomla\CMS\Feed\Feed|string Return a Feed object or a string message if error.
63-
*
64-
* @since 1.5
65-
*
66-
* @deprecated 5.3.0 will be removed in 7.0
67-
* Use the non-static method getFeedData
68-
* Example: Factory::getApplication()->bootModule('mod_feed', 'administrator')
69-
* ->getHelper('FeedHelper')
70-
* ->getFeedData($params, new FeedFactory())
71-
*/
72-
public static function getFeed($params)
73-
{
74-
return (new self())->getFeedData($params, new FeedFactory());
75-
}
7656
}

administrator/modules/mod_latest/src/Helper/LatestHelper.php

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -139,41 +139,4 @@ public function getModuleTitle(Registry $params, CMSApplicationInterface $app):
139139
$title
140140
);
141141
}
142-
143-
/**
144-
* Get a list of articles.
145-
*
146-
* @param Registry $params The module parameters.
147-
* @param ArticlesModel $model The model.
148-
*
149-
* @return mixed An array of articles, or false on error.
150-
*
151-
* @deprecated 5.4.0 will be removed in 7.0
152-
* Use the non-static method getArticles
153-
* Example: Factory::getApplication()->bootModule('mod_latest', 'administrator')
154-
* ->getHelper('LatestHelper')
155-
* ->getArticles($params, $model, Factory::getApplication())
156-
*/
157-
public static function getList(Registry $params, ArticlesModel $model)
158-
{
159-
return (new self())->getArticles($params, $model, Factory::getApplication());
160-
}
161-
162-
/**
163-
* Get the alternate title for the module.
164-
*
165-
* @param Registry $params The module parameters.
166-
*
167-
* @return string The alternate title for the module.
168-
*
169-
* @deprecated 5.4.0 will be removed in 7.0
170-
* Use the non-static method getModuleTitle
171-
* Example: Factory::getApplication()->bootModule('mod_latest', 'administrator')
172-
* ->getHelper('LatestHelper')
173-
* ->getModuleTitle($params, Factory::getApplication())
174-
*/
175-
public static function getTitle($params)
176-
{
177-
return (new self())->getModuleTitle($params, Factory::getApplication());
178-
}
179142
}

administrator/modules/mod_latestactions/src/Helper/LatestActionsHelper.php

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -76,46 +76,4 @@ public function getModuleTitle($params)
7676
{
7777
return Text::plural('MOD_LATESTACTIONS_TITLE', $params->get('count', 5));
7878
}
79-
80-
/**
81-
* Get the alternate title for the module
82-
*
83-
* @param Registry $params The module parameters.
84-
*
85-
* @return string The alternate title for the module.
86-
*
87-
* @since 3.9.1
88-
*
89-
* @deprecated 5.1.0 will be removed in 7.0
90-
* Use the non-static method getModuleTitle
91-
* Example: Factory::getApplication()->bootModule('mod_latestactions', 'administrator')
92-
* ->getHelper('LatestActionsHelper')
93-
* ->getModuleTitle($params)
94-
*/
95-
public static function getTitle($params)
96-
{
97-
return (new self())->getModuleTitle($params);
98-
}
99-
100-
/**
101-
* Get a list of logged actions.
102-
*
103-
* @param Registry &$params The module parameters.
104-
*
105-
* @return mixed An array of action logs, or false on error.
106-
*
107-
* @since 3.9.1
108-
*
109-
* @throws \Exception
110-
*
111-
* @deprecated 5.1.0 will be removed in 7.0
112-
* Use the non-static method getActions
113-
* Example: Factory::getApplication()->bootModule('mod_latestactions', 'administrator')
114-
* ->getHelper('LatestActionsHelper')
115-
* ->getActions($params)
116-
*/
117-
public static function getList(&$params)
118-
{
119-
return (new self())->getActions($params);
120-
}
12179
}

administrator/modules/mod_logged/src/Helper/LoggedHelper.php

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -91,44 +91,4 @@ public function getModuleTitle($params): string
9191
{
9292
return Text::plural('MOD_LOGGED_TITLE', $params->get('count', 5));
9393
}
94-
95-
/**
96-
* Get a list of logged users.
97-
*
98-
* @param Registry $params The module parameters
99-
* @param CMSApplication $app The application
100-
* @param DatabaseInterface $db The database
101-
*
102-
* @return mixed An array of users, or false on error.
103-
*
104-
* @throws \RuntimeException
105-
*
106-
* @deprecated 5.4.0 will be removed in 7.0
107-
* Use the non-static method getUsers
108-
* Example: Factory::getApplication()->bootModule('mod_logged', 'administrator')
109-
* ->getHelper('LoggedHelper')
110-
* ->getUsers($params, Factory::getApplication(), $db)
111-
*/
112-
public static function getList(Registry $params, CMSApplication $app, DatabaseInterface $db)
113-
{
114-
return (new self())->getUsers($params, $app, $db);
115-
}
116-
117-
/**
118-
* Get the alternate title for the module
119-
*
120-
* @param Registry $params The module parameters.
121-
*
122-
* @return string The alternate title for the module.
123-
*
124-
* @deprecated 5.4.0 will be removed in 7.0
125-
* Use the non-static method getModuleTitle
126-
* Example: Factory::getApplication()->bootModule('mod_logged', 'administrator')
127-
* ->getHelper('LoggedHelper')
128-
* ->getModuleTitle($params)
129-
*/
130-
public static function getTitle($params)
131-
{
132-
return (new self())->getModuleTitle($params);
133-
}
13494
}

administrator/modules/mod_login/src/Helper/LoginHelper.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -82,36 +82,4 @@ public function getReturnUriString()
8282

8383
return base64_encode('index.php');
8484
}
85-
86-
/**
87-
* Get an HTML select list of the available languages.
88-
*
89-
* @return string
90-
*
91-
* @deprecated 5.1.0 will be removed in 7.0
92-
* Use the non-static method getLanguages
93-
* Example: Factory::getApplication()->bootModule('mod_login', 'administrator')
94-
* ->getHelper('LoginHelper')
95-
* ->getLanguages(Factory::getApplication())
96-
*/
97-
public static function getLanguageList()
98-
{
99-
return (new self())->getLanguages(Factory::getApplication());
100-
}
101-
102-
/**
103-
* Get the redirect URI after login.
104-
*
105-
* @return string
106-
*
107-
* @deprecated 5.1.0 will be removed in 7.0
108-
* Use the non-static method getReturnUriString
109-
* Example: Factory::getApplication()->bootModule('mod_login', 'administrator')
110-
* ->getHelper('LoginHelper')
111-
* ->getReturnUriString()
112-
*/
113-
public static function getReturnUri()
114-
{
115-
return (new self())->getReturnUriString();
116-
}
11785
}

administrator/modules/mod_privacy_dashboard/src/Helper/PrivacyDashboardHelper.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,4 @@ public function getPrivacyRequests(): array
5858
return [];
5959
}
6060
}
61-
62-
/**
63-
* Method to retrieve information about the site privacy requests
64-
*
65-
* @return array Array containing site privacy requests
66-
*
67-
* @since 3.9.0
68-
*
69-
* @deprecated 5.4.0 will be removed in 7.0
70-
* Use the non-static method getPrivacyRequests
71-
* Example: Factory::getApplication()->bootModule('mod_privacy_dashboard', 'administrator')
72-
* ->getHelper('PrivacyDashboardHelper')
73-
* ->getPrivacyRequests()
74-
*/
75-
public static function getData()
76-
{
77-
return Factory::getApplication()->bootModule('mod_privacy_dashboard', 'administrator')
78-
->getHelper('PrivacyDashboardHelper')
79-
->getPrivacyRequests();
80-
}
8161
}

administrator/modules/mod_privacy_status/src/Helper/PrivacyStatusHelper.php

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -198,68 +198,4 @@ public function getDatabaseConnectionEncryption()
198198
{
199199
return $this->getDatabase()->getConnectionEncryption();
200200
}
201-
202-
/**
203-
* Get the information about the published privacy policy
204-
*
205-
* @return array Array containing a status of whether a privacy policy is set and a link to the policy document for editing
206-
*
207-
* @since 4.0.0
208-
*
209-
* @deprecated 5.3.0 will be removed in 7.0
210-
* Use the non-static method getPrivacyPolicyInformation
211-
* Example: Factory::getApplication()->bootModule('mod_privacy_status', 'administrator')
212-
* ->getHelper('PrivacyStatusHelper')
213-
* ->getPrivacyPolicyInformation(Factory::getApplication())
214-
*/
215-
public static function getPrivacyPolicyInfo()
216-
{
217-
$app = Factory::getApplication();
218-
219-
return $app->bootModule('mod_privacy_status', 'administrator')
220-
->getHelper('PrivacyStatusHelper')
221-
->getPrivacyPolicyInformation($app);
222-
}
223-
224-
/**
225-
* Check whether there is a menu item for the request form
226-
*
227-
* @return array Array containing a status of whether a menu is published for the request form and its current link
228-
*
229-
* @since 4.0.0
230-
*
231-
* @deprecated 5.3.0 will be removed in 7.0
232-
* Use the non-static method getRequestFormMenuStatus
233-
* Example: Factory::getApplication()->bootModule('mod_privacy_status', 'administrator')
234-
* ->getHelper('PrivacyStatusHelper')
235-
* ->getRequestFormMenuStatus(Factory::getApplication())
236-
*/
237-
public static function getRequestFormPublished()
238-
{
239-
$app = Factory::getApplication();
240-
241-
return $app->bootModule('mod_privacy_status', 'administrator')
242-
->getHelper('PrivacyStatusHelper')
243-
->getRequestFormMenuStatus($app);
244-
}
245-
246-
/**
247-
* Method to return number privacy requests older than X days.
248-
*
249-
* @return integer
250-
*
251-
* @since 4.0.0
252-
*
253-
* @deprecated 5.3.0 will be removed in 7.0
254-
* Use the non-static method getNumberOfUrgentRequests
255-
* Example: Factory::getApplication()->bootModule('mod_privacy_status', 'administrator')
256-
* ->getHelper('PrivacyStatusHelper')
257-
* ->getNumberOfUrgentRequests()
258-
*/
259-
public static function getNumberUrgentRequests()
260-
{
261-
return Factory::getApplication()->bootModule('mod_privacy_status', 'administrator')
262-
->getHelper('PrivacyStatusHelper')
263-
->getNumberOfUrgentRequests();
264-
}
265201
}

administrator/modules/mod_sampledata/src/Helper/SampledataHelper.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,4 @@ public function getSampledataList()
4949
)
5050
->getArgument('result') ?? [];
5151
}
52-
53-
/**
54-
* Get a list of sampledata.
55-
*
56-
* @return mixed An array of sampledata, or false on error.
57-
*
58-
* @since 3.8.0
59-
*
60-
* @deprecated 5.1.0 will be removed in 7.0
61-
* Use the non-static method getSampledataList
62-
* Example: Factory::getApplication()->bootModule('mod_sampledata', 'administrator')
63-
* ->getHelper('SampledataHelper')
64-
* ->getSampledataList()
65-
*/
66-
public static function getList()
67-
{
68-
return (new self())->getSampledataList();
69-
}
7052
}

administrator/modules/mod_stats_admin/src/Helper/StatsAdminHelper.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,4 @@ public function getStatsData(Registry $params, CMSApplication $app, DatabaseInte
144144

145145
return $rows;
146146
}
147-
148-
/**
149-
* Method to retrieve information about the site
150-
*
151-
* @param Registry $params The module parameters
152-
* @param CMSApplication $app The application
153-
* @param DatabaseInterface $db The database
154-
*
155-
* @return array Array containing site information
156-
*
157-
* @since 3.0
158-
*
159-
* @deprecated 5.1.0 will be removed in 7.0
160-
* Use the non-static method getStatsData
161-
* Example: Factory::getApplication()->bootModule('mod_stats_admin', 'administrator')
162-
* ->getHelper('StatsAdminHelper')
163-
* ->getStatsData($params, Factory::getApplication(), Factory::getContainer()->get(DatabaseInterface::class))
164-
*/
165-
public static function getStats(Registry $params, CMSApplication $app, DatabaseInterface $db)
166-
{
167-
return (new self())->getStatsData($params, $app, $db);
168-
}
169147
}

administrator/modules/mod_version/src/Helper/VersionHelper.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,4 @@ public function getVersionString()
3636

3737
return '‎' . $version->getShortVersion();
3838
}
39-
40-
/**
41-
* Get the Joomla version number.
42-
*
43-
* @return string String containing the current Joomla version.
44-
*
45-
* @deprecated 5.1.0 will be removed in 7.0
46-
* Use the non-static method getVersionString
47-
* Example: Factory::getApplication()->bootModule('mod_version', 'administrator')
48-
* ->getHelper('VersionHelper')
49-
* ->getVersionString()
50-
*/
51-
public static function getVersion()
52-
{
53-
return (new self())->getVersionString();
54-
}
5539
}

0 commit comments

Comments
 (0)