Skip to main content
2 of 2
Add use statement
Simon Vart
  • 188
  • 1
  • 6

Even simplier now with a one-liner on Drupal 8.9 (the decode function has been removed from the Yaml Symfony Dependency utility class) :

use Symfony\Component\Yaml\Yaml; 

$ymldata = Yaml::parseFile(DRUPAL_ROOT . '/core/modules/toolbar/toolbar.breakpoints.yml');
Simon Vart
  • 188
  • 1
  • 6