class RealisticDummyContentDevelGenerateGenerator in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/includes/RealisticDummyContentDevelGenerateGenerator.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentDevelGenerateGenerator
- 3.x api/src/includes/RealisticDummyContentDevelGenerateGenerator.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentDevelGenerateGenerator
The "devel generate" dummy content generator.
Hierarchy
- class \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentGenerator
- class \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentDevelGenerateGenerator
Expanded class hierarchy of RealisticDummyContentDevelGenerateGenerator
1 file declares its use of RealisticDummyContentDevelGenerateGenerator
- Framework.php in api/
src/ Framework/ Framework.php
File
- api/
src/ includes/ RealisticDummyContentDevelGenerateGenerator.php, line 10
Namespace
Drupal\realistic_dummy_content_api\includesView source
class RealisticDummyContentDevelGenerateGenerator extends RealisticDummyContentGenerator {
/**
* {@inheritdoc}
*/
public function implementGenerate() {
$info['entity_type'] = $this
->getType();
$info['kill'] = $this
->getKill();
$info['num'] = $this
->getNum();
if (Framework::instance()
->moduleExists('comment')) {
$info['max_comments'] = 5;
}
if ($this
->getType() == 'node') {
// See https://www.drupal.org/node/2324027
$info = array_merge($info, array(
'node_types' => array(
$this
->getBundle() => $this
->getBundle(),
),
'users' => array(
1,
),
'title_length' => 3,
));
}
Framework::instance()
->develGenerate($info);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RealisticDummyContentDevelGenerateGenerator:: |
public | function | ||
RealisticDummyContentGenerator:: |
private | property | ||
RealisticDummyContentGenerator:: |
private | property | ||
RealisticDummyContentGenerator:: |
private | property | ||
RealisticDummyContentGenerator:: |
private | property | ||
RealisticDummyContentGenerator:: |
public | function | Generate content. | |
RealisticDummyContentGenerator:: |
public | function | Getter for the bundle property. | |
RealisticDummyContentGenerator:: |
public | function | Getter for the kill property. | |
RealisticDummyContentGenerator:: |
public | function | Getter for the num propert. | |
RealisticDummyContentGenerator:: |
public | function | Getter for the type property. | |
RealisticDummyContentGenerator:: |
public | function | Constructor. |