public function Drupal7::vocabularyMachineName in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/Framework/Drupal7.php \Drupal\realistic_dummy_content_api\Framework\Drupal7::vocabularyMachineName()
File
- api/
src/ Framework/ Drupal7.php, line 514
Class
- Drupal7
- Drupal 7-specific code.
Namespace
Drupal\realistic_dummy_content_api\FrameworkCode
public function vocabularyMachineName($vocabulary) {
if (isset($vocabulary->machine_name) && $vocabulary->machine_name) {
return $vocabulary->machine_name;
}
else {
throw new \Exception('vocabulary machine name could not be determined');
}
}