Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion migrations/52-53/new-deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -36,6 +37,7 @@ public function display($tpl = null)
parent::display($tpl);
}
```

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,
it returned the classes attribute named by the first argument.

Expand All @@ -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.
Expand All @@ -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
Expand Down