function hook_element_string_properties_alter

8.x-3.x bootstrap.api.php hook_element_string_properties_alter(array &$properties)

Allows sub-themes to alter which element properties should be strings.

Note: this only applies with using \Drupal\bootstrap\Utility\Element objects. This is primarily used in cases where the value of the property in question is only supported as an already rendered string and not a render array (i.e. prefix/suffix) due to the limitations of upstream (core) code. It should not be relied on as a way to "easily convert" properties to strings to circumvent supporting OOP code.


array $properties: An indexed array of property names, without the | Drupal - Open Source CMS prefix, passed by reference.

See Also

Related topics

Source ./bootstrap.api.php (line 103)

function hook_element_string_properties_alter(array &$properties) {
  // A contrib module property that should always be a string.
  $properties[] = 'contrib_module_property';