RealisticDummyContentDevelGenerateGenerator.php in Realistic Dummy Content 8.2
File
api/src/includes/RealisticDummyContentDevelGenerateGenerator.php
View source
<?php
namespace Drupal\realistic_dummy_content_api\includes;
use Drupal\realistic_dummy_content_api\Framework\Framework;
class RealisticDummyContentDevelGenerateGenerator extends RealisticDummyContentGenerator {
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') {
$info = array_merge($info, array(
'node_types' => array(
$this
->getBundle() => $this
->getBundle(),
),
'users' => array(
1,
),
'title_length' => 3,
));
}
Framework::instance()
->develGenerate($info);
}
}