public function ImageGenerator::execute in YAML Content 8.2
A uniform execution function for all plugins to implement.
Return value
mixed The expected result of the specific plugin implementation.
Overrides SampleDataGeneratorInterface::execute
File
- modules/
sample_data/ src/ Plugin/ SampleData/ ImageGenerator.php, line 21
Class
- ImageGenerator
- Sample data generator to provide basic placeholder images.
Namespace
Drupal\sample_data\Plugin\SampleDataCode
public function execute() {
$sample = $this
->getImage($this->configuration['width'], $this->configuration['height']);
return $sample;
}