Creates random content based on node content type.
string $type: Node content type (e.g., 'article').
array Random content needed by various node types.
private function getContent($type) {
$langcode = Language::LANGCODE_NOT_SPECIFIED;
switch ($type) {
case 'forum':
$content = array(
"title" => $this
->randomName(8),
"taxonomy_forums[{$langcode}]" => array(
1,
),
"body[{$langcode}][0][value]" => $this
->randomName(32),
);
break;
default:
$content = array(
"title" => $this
->randomName(8),
"body[{$langcode}][0][value]" => $this
->randomName(32),
);
break;
}
return $content;
}