diff --git a/core/lib/Drupal/Core/Template/AttributeArray.php b/core/lib/Drupal/Core/Template/AttributeArray.php index 24e9c9d..61c968f 100644 --- a/core/lib/Drupal/Core/Template/AttributeArray.php +++ b/core/lib/Drupal/Core/Template/AttributeArray.php @@ -35,7 +35,7 @@ class AttributeArray extends AttributeValueBase implements \ArrayAccess, \Iterat * @see \Drupal\Core\Template\AttributeArray::__toString() * @see \Drupal\Core\Template\AttributeValueBase::render() */ - const PRINT_IF_EMPTY_STRING = FALSE; + const RENDER_EMPTY_ATTRIBUTE = FALSE; /** * Implements ArrayAccess::offsetGet(). diff --git a/core/lib/Drupal/Core/Template/AttributeValueBase.php b/core/lib/Drupal/Core/Template/AttributeValueBase.php index 3daf7c5..197b199 100644 --- a/core/lib/Drupal/Core/Template/AttributeValueBase.php +++ b/core/lib/Drupal/Core/Template/AttributeValueBase.php @@ -21,7 +21,7 @@ * * @see \Drupal\Core\Template\AttributeValueBase::render() */ - const PRINT_IF_EMPTY_STRING = TRUE; + const RENDER_EMPTY_ATTRIBUTE = TRUE; /** * The value itself. @@ -56,7 +56,7 @@ public function __construct($name, $value) { */ public function render() { $value = (string) $this; - if (isset($this->value) && static::PRINT_IF_EMPTY_STRING || !empty($value)) { + if (isset($this->value) && static::RENDER_EMPTY_ATTRIBUTE || !empty($value)) { return String::checkPlain($this->name) . '="' . $value . '"'; } }