Skip to content

Commit 738444b

Browse files
authored
Replace $app->input by $app->getInput() (#568)
1 parent 4be131f commit 738444b

File tree

12 files changed

+24
-24
lines changed

12 files changed

+24
-24
lines changed

src/administrator/components/com_weblinks/src/Model/WeblinkModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected function loadFormData()
162162

163163
// Prime some default values.
164164
if ($this->getState('weblink.id') == 0) {
165-
$data->set('catid', $app->input->get('catid', $app->getUserState('com_weblinks.weblinks.filter.category_id'), 'int'));
165+
$data->set('catid', $app->getInput()->get('catid', $app->getUserState('com_weblinks.weblinks.filter.category_id'), 'int'));
166166
}
167167
}
168168

src/administrator/components/com_weblinks/src/Model/WeblinksModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ protected function populateState($ordering = 'a.title', $direction = 'asc')
9090
{
9191
$app = Factory::getApplication();
9292

93-
$forcedLanguage = $app->input->get('forcedLanguage', '', 'cmd');
93+
$forcedLanguage = $app->getInput()->get('forcedLanguage', '', 'cmd');
9494

9595
// Adjust the context to support modal layouts.
96-
if ($layout = $app->input->get('layout')) {
96+
if ($layout = $app->getInput()->get('layout')) {
9797
$this->context .= '.' . $layout;
9898
}
9999

src/administrator/components/com_weblinks/src/View/Weblink/HtmlView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function display($tpl = null)
7373
}
7474

7575
// If we are forcing a language in modal (used for associations).
76-
if ($this->getLayout() === 'modal' && $forcedLanguage = Factory::getApplication()->input->get('forcedLanguage', '', 'cmd')) {
76+
if ($this->getLayout() === 'modal' && $forcedLanguage = Factory::getApplication()->getInput()->get('forcedLanguage', '', 'cmd')) {
7777
// Set the language field to the forcedLanguage and disable changing it.
7878
$this->form->setValue('language', null, $forcedLanguage);
7979
$this->form->setFieldAttribute('language', 'readonly', 'true');
@@ -100,7 +100,7 @@ public function display($tpl = null)
100100
protected function addToolbar()
101101
{
102102
$app = Factory::getApplication();
103-
$app->input->set('hidemainmenu', true);
103+
$app->getInput()->set('hidemainmenu', true);
104104

105105
$user = $this->getCurrentUser();
106106
$isNew = ($this->item->id == 0);

src/administrator/components/com_weblinks/src/View/Weblinks/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function display($tpl = null)
106106
} else {
107107
// In article associations modal we need to remove language filter if forcing a language.
108108
// We also need to change the category filter to show show categories with All or the forced language.
109-
if ($forcedLanguage = Factory::getApplication()->input->get('forcedLanguage', '', 'CMD')) {
109+
if ($forcedLanguage = Factory::getApplication()->getInput()->get('forcedLanguage', '', 'CMD')) {
110110
// If the language is forced we can't allow to select the language, so transform the language selector filter into an hidden field.
111111
$languageXml = new \SimpleXMLElement('<field name="language" type="hidden" default="' . $forcedLanguage . '" />');
112112
$this->filterForm->setField($languageXml, 'filter', true);

src/administrator/components/com_weblinks/tmpl/weblink/edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
HTMLHelper::_('behavior.formvalidator');
2222
$app = Factory::getApplication();
23-
$input = $app->input;
23+
$input = $app->getInput();
2424
$assoc = Associations::isEnabled();
2525
// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
2626
$this->ignore_fieldsets = array('details', 'images', 'item_associations', 'jmetadata');

src/administrator/components/com_weblinks/tmpl/weblink/modal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
HTMLHelper::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom'));
2020
// @deprecated 4.0 the function parameter, the inline js and the buttons are not needed since 3.7.0.
21-
$function = Factory::getApplication()->input->getCmd('function', 'jEditWeblink_' . (int) $this->item->id);
21+
$function = Factory::getApplication()->getInput()->getCmd('function', 'jEditWeblink_' . (int) $this->item->id);
2222
// Function to update input title when changed
2323
$this->getDocument()->addScriptDeclaration('
2424
function jEditWeblinkModal() {

src/administrator/components/com_weblinks/tmpl/weblinks/modal.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
HTMLHelper::_('behavior.multiselect');
2929
$this->document->getWebAssetManager()
3030
->registerAndUseScript('com_weblinks.admin-weblinks-modal', 'media/com_weblinks/js/admin-weblinks-modal.js', [], ['defer' => true], ['core']);
31-
$function = $app->input->getCmd('function', 'jSelectWeblink');
32-
$editor = $app->input->getCmd('editor', '');
31+
$function = $app->getInput()->getCmd('function', 'jSelectWeblink');
32+
$editor = $app->getInput()->getCmd('editor', '');
3333
$listOrder = $this->escape($this->state->get('list.ordering'));
3434
$listDirn = $this->escape($this->state->get('list.direction'));
3535
$onclick = $this->escape($function);
@@ -160,7 +160,7 @@
160160

161161
<input type="hidden" name="task" value="" />
162162
<input type="hidden" name="boxchecked" value="0" />
163-
<input type="hidden" name="forcedLanguage" value="<?php echo $app->input->get('forcedLanguage', '', 'CMD'); ?>" />
163+
<input type="hidden" name="forcedLanguage" value="<?php echo $app->getInput()->get('forcedLanguage', '', 'CMD'); ?>" />
164164
<?php echo HTMLHelper::_('form.token'); ?>
165165

166166
</form>

src/components/com_weblinks/src/Helper/AssociationHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ abstract class AssociationHelper extends CategoryAssociationHelper
3636
*/
3737
public static function getAssociations($id = 0, $view = null)
3838
{
39-
$input = Factory::getApplication()->input;
39+
$input = Factory::getApplication()->getInput();
4040
$view = \is_null($view) ? $input->get('view') : $view;
4141
$id = empty($id) ? $input->getInt('id') : $id;
4242
if ($view === 'weblink') {

src/components/com_weblinks/src/Model/CategoriesModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function populateState($ordering = null, $direction = null)
7373
$app = Factory::getApplication();
7474
$this->setState('filter.extension', $this->_extension);
7575
// Get the parent id if defined.
76-
$parentId = $app->input->getInt('id');
76+
$parentId = $app->getInput()->getInt('id');
7777
$this->setState('filter.parentId', $parentId);
7878
$params = $app->getParams();
7979
$this->setState('params', $params);

src/components/com_weblinks/src/Model/CategoryModel.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,29 +254,29 @@ protected function populateState($ordering = null, $direction = null)
254254
$limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->get('list_limit'), 'uint');
255255
$this->setState('list.limit', $limit);
256256

257-
$limitstart = $app->input->get('limitstart', 0, 'uint');
257+
$limitstart = $app->getInput()->get('limitstart', 0, 'uint');
258258
$this->setState('list.start', $limitstart);
259259

260260
// Optional filter text
261-
$this->setState('list.filter', $app->input->getString('filter-search'));
261+
$this->setState('list.filter', $app->getInput()->getString('filter-search'));
262262

263-
$orderCol = $app->input->get('filter_order', 'ordering');
263+
$orderCol = $app->getInput()->get('filter_order', 'ordering');
264264

265265
if (!\in_array($orderCol, $this->filter_fields)) {
266266
$orderCol = 'ordering';
267267
}
268268

269269
$this->setState('list.ordering', $orderCol);
270270

271-
$listOrder = $app->input->get('filter_order_Dir', 'ASC');
271+
$listOrder = $app->getInput()->get('filter_order_Dir', 'ASC');
272272

273273
if (!\in_array(strtoupper($listOrder), ['ASC', 'DESC', ''])) {
274274
$listOrder = 'ASC';
275275
}
276276

277277
$this->setState('list.direction', $listOrder);
278278

279-
$id = $app->input->get('id', 0, 'int');
279+
$id = $app->getInput()->get('id', 0, 'int');
280280
$this->setState('category.id', $id);
281281

282282
$user = $this->getCurrentUser();
@@ -397,7 +397,7 @@ public function &getChildren()
397397
*/
398398
public function hit($pk = 0)
399399
{
400-
$hitcount = Factory::getApplication()->input->getInt('hitcount', 1);
400+
$hitcount = Factory::getApplication()->getInput()->getInt('hitcount', 1);
401401

402402
if ($hitcount) {
403403
$pk = (!empty($pk)) ? $pk : (int) $this->getState('category.id');

0 commit comments

Comments
 (0)