Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/Template/Attribute.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Template/Attribute.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/lib/Drupal/Core/Template/Attribute.php Thu May 09 15:33:08 2019 +0100 @@ -262,6 +262,20 @@ } /** + * Gets the class attribute value if set. + * + * This method is implemented to take precedence over hasClass() for Twig 2.0. + * + * @return \Drupal\Core\Template\AttributeValueBase + * The class attribute value if set. + * + * @see twig_get_attribute() + */ + public function getClass() { + return $this->offsetGet('class'); + } + + /** * Checks if the class array has the given CSS class. * * @param string $class