Problem/Motivation
ConfirmFormInterface::getDescription()
is designed to return only translated strings. However, sometime the description gets complex, involving a lot of markup that fits better to a renderable array than a simple string.
Proposed resolution
Alternatively, allow renderable arrays as return for ConfirmFormInterface::getDescription()
.
Remaining tasks
None.
User interface changes
None.
API changes
Before:
/**
* Returns additional text to display as a description.
*
* @return string
* The form description.
*/
public function getDescription();
After:
/**
* Returns additional text to display as a description.
*
* The text can be provided as a translated string or as a renderable array.
*
* @return string|array
* The form description.
*/
public function getDescription();
Data model changes
None.