User tests: Successful: Unsuccessful:
This adds a new FormField which populates its options from a PHP Enum.
Add the following enum in /administrator/components/com_content/src/Enum/StateType.php
<?php
namespace Joomla\Component\Content\Administrator\Enum;
enum StateType: int
{
case Published = 1;
case Archived = 2;
}Add the following in line 275 of /administrator/components/com_content/forms/article.xml
<field name="teststatus" type="enum" enum="Joomla\Component\Content\Administrator\Enum\StateType"
prefix="COM_CONTENT_ARTICLES_STATE_OPTION" label="COM_CONTENT_ARTICLES_STATE_OPTION_STATE_TYPE_LABEL"
default="0">
<option value="0">COM_CONTENT_ARTICLES_STATE_OPTION_NONE</option>
</field>The field doesn't exist.
The new field is displayed with 3 entries.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
I have tested this item ✅ successfully on b860c87
I have tested this item ✅ successfully on b860c87
I have tested this item ✅ successfully on b860c87
| Status | Pending | ⇒ | Ready to Commit |
| Labels |
Added:
Feature
PR-6.2-dev
|
||
RTC
RTC
I would say, that this needs to be documented, or not?
I have tested this item ✅ successfully on b860c87
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48113.