Joomla 3.10 Backports

From Joomla! Documentation

Other languages:

This document tracks backports implemented in 3.10 to have a better integration for extension developers with Joomla! 4.

Add support for non prefixed language files[edit]

PR: https://github.com/joomla/joomla-cms/pull/19353

This PR adds support for non prefixed language files to Joomla 3.10. This means you can now use prefixed as well as non-prefixed language files the same as you can do that in 4.0.

Example (prefixed language files)[edit]


Example (non-prefixed language files)[edit]


Switcher field transition[edit]

PR: https://github.com/joomla/joomla-cms/pull/30078

With 4.0 a new layout for the radio button has been implemented. With this change in 3.10 we backported the layoutfile, while keeping the original layout, so you can use the same layout definition (`layout="joomla.form.field.radio.switcher"`) in 3.10 and 4.x


	label="switcher test"
	class="btn-group btn-group-yesno"
	<option value="1">JYES</option>
	<option value="0">JNO</option>

Backport Categories Classes[edit]

PR: https://github.com/joomla/joomla-cms/pull/30346

With the changes from that PR you now can use the same classnames in 3.10 and 4.x. An example how to use it can be found here: https://github.com/joomla/joomla-cms/pull/30346#issuecomment-685424752

Table _supportNullValue handling[edit]

PR: https://github.com/joomla/joomla-cms/pull/30102

With that change to the Joomla\CMS\Table class you can use the `$_supportNullValue` option from 4.x to indicate that the columns fully support the NULL value in the database.

Preparing 3.10 for 4.0 content versioning[edit]

PR: https://github.com/joomla/joomla-cms/pull/29584

This PR backports a few classes that would be necessary to implement versioning of content items in the same code for extensions in 3.x and 4.0. To support both 3.x-style and 4.0-style versioning, you'd have to implement the 3.x-style first. To get 4.0-style working, simply let your table class implement the interface VersionableTableInterface (and the method that that defines) and let your item controller and model use the respective Versionable trait. In 3.x, these traits are empty, in 4.0 they contain all the logic necessary for versioning.