Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295045

Allow ConfirmFormInterface::getDescription() to alternatively return a renderable array

$
0
0

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.


Viewing all articles
Browse latest Browse all 295045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>