Skip to content

Commit e67a837

Browse files
authored
Merge pull request #364 from Bodge-IT/deprecations-from-40613-feature-pr
Deprecations from #40613 added functionality
2 parents 5f5d6b3 + 654d990 commit e67a837

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

migrations/52-53/new-deprecations.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Joomla and most extensions have extensively been using `Joomla\CMS\MVC\View\Abst
2727
this method is deprecated and is going to be removed in Joomla 7.0.
2828

2929
This code in the past was used to retrieve data from the model. It was included in the `HtmlView.php` and often looked like this:
30+
3031
```php
3132
public function display($tpl = null)
3233
{
@@ -36,6 +37,7 @@ public function display($tpl = null)
3637
parent::display($tpl);
3738
}
3839
```
40+
3941
This code in the view called the method `get<FirstArgument>` on the model and returned the result. If the model didn't have such a method,
4042
it returned the classes attribute named by the first argument.
4143

@@ -53,11 +55,43 @@ public function display($tpl = null)
5355
parent::display($tpl);
5456
}
5557
```
58+
5659
The first line is a docblock comment, which provides a hint for the IDE for the actual model that is used.
5760
The second line will retrieve the model set in the view. If you have more than one model in a view, you can provide it with a parameter to select the right model.
5861
The last two lines retrieve the actual data from the model. With the first two lines, IDEs can hint at the available methods in the model
5962
and now the returned values from those methods, making it possible to find issues further down the line.
6063

64+
65+
## AdminModel::postProcessStore()
66+
67+
**namespace**: \Joomla\CMS\MVC\Model;
68+
69+
PR [#40613](https://github.com/joomla/joomla-cms/pull/40613)
70+
71+
postStoreProcess() replaced by postStore() preferred method, adds TableInterface to method.
72+
73+
```php title="New method AdminModel::postStore() replaces AdminModelpostStoreProcess()"
74+
public function postStoreProcess(TableInterface $table, $newTags = [], $replace = true)
75+
{
76+
$this->postStore($table, $newTags, $replace);
77+
}
78+
```
79+
80+
## AdminModel::batchTag()
81+
82+
**namespace**: \Joomla\CMS\MVC\Model;
83+
84+
PR [#40613](https://github.com/joomla/joomla-cms/pull/40613)
85+
86+
batchTag() method replaced with batchTags preferred method providing more accurate descriptive title.
87+
88+
```php title="New method AdminModel::batchTags() replaces AdminModelbatchTag()"
89+
protected function batchTag($value, $pks, $contexts)
90+
{
91+
return $this->batchTags($value, $pks, $contexts);
92+
}
93+
```
94+
6195
## Deprecate `HTMLHelper::_('script')`, `HTMLHelper::_('stylesheet')`
6296

6397
Deprecate `HTMLHelper::_('script')`, `HTMLHelper::_('stylesheet')`. Use [Web Asset Manager](https://manual.joomla.org/docs/general-concepts/web-asset-manager) instead.
@@ -68,7 +102,6 @@ PR: https://github.com/joomla/joomla-cms/pull/43396
68102
Deprecate the namespace property of the ComponentRecord class. The property were never initialised.
69103
PR: https://github.com/joomla/joomla-cms/pull/44754
70104

71-
72105
## Plugins deprecations
73106

74107
### CMSPlugin: Deprecate use of DispatcherAware and LanguageAware

0 commit comments

Comments
 (0)