comparison core/lib/Drupal/Core/Template/Attribute.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
260 } 260 }
261 return $this; 261 return $this;
262 } 262 }
263 263
264 /** 264 /**
265 * Gets the class attribute value if set.
266 *
267 * This method is implemented to take precedence over hasClass() for Twig 2.0.
268 *
269 * @return \Drupal\Core\Template\AttributeValueBase
270 * The class attribute value if set.
271 *
272 * @see twig_get_attribute()
273 */
274 public function getClass() {
275 return $this->offsetGet('class');
276 }
277
278 /**
265 * Checks if the class array has the given CSS class. 279 * Checks if the class array has the given CSS class.
266 * 280 *
267 * @param string $class 281 * @param string $class
268 * The CSS class to check for. 282 * The CSS class to check for.
269 * 283 *