You are here

public function DemoContentParser::parseFileFromModule in Open Social 8.2

Same name and namespace in other branches
  1. 8.9 modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  2. 8 modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  3. 8.3 modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  4. 8.4 modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  5. 8.5 modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  6. 8.6 modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  7. 8.7 modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  8. 8.8 modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  9. 10.3.x modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  10. 10.0.x modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  11. 10.1.x modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()
  12. 10.2.x modules/custom/social_demo/src/DemoContentParser.php \Drupal\social_demo\DemoContentParser::parseFileFromModule()

Parses YAML file into a PHP value.

Parameters

string $file: The filename.

string $module: The module where the Yaml file is placed.

string $profile: The profile used.

Return value

mixed The YAML converted to a PHP value.

Overrides DemoContentParserInterface::parseFileFromModule

File

modules/custom/social_demo/src/DemoContentParser.php, line 37

Class

DemoContentParser
Class DemoContentParser.

Namespace

Drupal\social_demo

Code

public function parseFileFromModule($file, $module, $profile) {
  return $this
    ->parse(file_get_contents($this
    ->getPath($file, $module, $profile)));
}