abstract class RealisticDummyContentGenerator in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/includes/RealisticDummyContentGenerator.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentGenerator
- 3.x api/src/includes/RealisticDummyContentGenerator.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentGenerator
Abstract dummy content generator class.
This module can generate dummy content using an extensible system of "generators", which are subclasses of this class.
Hierarchy
- class \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentGenerator
Expanded class hierarchy of RealisticDummyContentGenerator
File
- api/
src/ includes/ RealisticDummyContentGenerator.php, line 11
Namespace
Drupal\realistic_dummy_content_api\includesView source
abstract class RealisticDummyContentGenerator {
private $type;
private $bundle;
private $num;
private $more;
/**
* Constructor.
*
* @param array $more
* Can contain:
* kill => TRUE|FALSE.
*/
public function __construct($type, $bundle, $num, $more) {
$this->type = $type;
$this->bundle = $bundle;
$this->num = $num;
if (isset($more['kill']) && $more['kill']) {
$this->kill = TRUE;
}
else {
$this->kill = FALSE;
}
}
/**
* Getter for the bundle property.
*/
public function getBundle() {
return $this->bundle;
}
/**
* Getter for the type property.
*/
public function getType() {
return $this->type;
}
/**
* Getter for the kill property.
*/
public function getKill() {
return $this->kill;
}
/**
* Getter for the num propert.
*/
public function getNum() {
return $this->num;
}
/**
* Generate content.
*/
public function generate() {
$this
->implementGenerate();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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. |