public function Drupal8::develGenerate in Realistic Dummy Content 7.2
Same name and namespace in other branches
- 8.2 api/src/Framework/Drupal8.php \Drupal\realistic_dummy_content_api\Framework\Drupal8::develGenerate()
- 3.x api/src/Framework/Drupal8.php \Drupal\realistic_dummy_content_api\Framework\Drupal8::develGenerate()
File
- api/
src/ Framework/ Drupal8.php, line 59
Class
- Drupal8
- Drupal 8-specific code.
Namespace
Drupal\realistic_dummy_content_api\FrameworkCode
public function develGenerate($info) {
if ($info['entity_type'] == 'node') {
$info['entity_type'] = 'content';
}
$info = array_merge(array(
'pass' => 'some-password',
'time_range' => 0,
'roles' => array(),
), $info);
$plugin_manager = \Drupal::service('plugin.manager.develgenerate');
$instance = $plugin_manager
->createInstance($info['entity_type'], array());
$instance
->generate($info);
}