diff --git a/migrations/52-53/new-deprecations.md b/migrations/52-53/new-deprecations.md index 240fd6fc..dae208c5 100644 --- a/migrations/52-53/new-deprecations.md +++ b/migrations/52-53/new-deprecations.md @@ -27,6 +27,7 @@ Joomla and most extensions have extensively been using `Joomla\CMS\MVC\View\Abst this method is deprecated and is going to be removed in Joomla 7.0. 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: + ```php public function display($tpl = null) { @@ -36,6 +37,7 @@ public function display($tpl = null) parent::display($tpl); } ``` + This code in the view called the method `get` on the model and returned the result. If the model didn't have such a method, it returned the classes attribute named by the first argument. @@ -53,11 +55,43 @@ public function display($tpl = null) parent::display($tpl); } ``` + The first line is a docblock comment, which provides a hint for the IDE for the actual model that is used. 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. 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 and now the returned values from those methods, making it possible to find issues further down the line. + +## AdminModel::postProcessStore() + +**namespace**: \Joomla\CMS\MVC\Model; + +PR [#40613](https://github.com/joomla/joomla-cms/pull/40613) + +postStoreProcess() replaced by postStore() preferred method, adds TableInterface to method. + +```php title="New method AdminModel::postStore() replaces AdminModelpostStoreProcess()" +public function postStoreProcess(TableInterface $table, $newTags = [], $replace = true) +{ + $this->postStore($table, $newTags, $replace); +} +``` + +## AdminModel::batchTag() + +**namespace**: \Joomla\CMS\MVC\Model; + +PR [#40613](https://github.com/joomla/joomla-cms/pull/40613) + +batchTag() method replaced with batchTags preferred method providing more accurate descriptive title. + +```php title="New method AdminModel::batchTags() replaces AdminModelbatchTag()" +protected function batchTag($value, $pks, $contexts) +{ + return $this->batchTags($value, $pks, $contexts); +} +``` + ## Deprecate `HTMLHelper::_('script')`, `HTMLHelper::_('stylesheet')` 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 Deprecate the namespace property of the ComponentRecord class. The property were never initialised. PR: https://github.com/joomla/joomla-cms/pull/44754 - ## Plugins deprecations ### CMSPlugin: Deprecate use of DispatcherAware and LanguageAware