protected function DevelGenerateBase::setMessage in Devel 8
Same name and namespace in other branches
- 8.3 devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::setMessage()
- 8.2 devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::setMessage()
- 4.x devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::setMessage()
Set a message for either drush or the web interface.
Parameters
string $msg: The message to display.
string $type: (optional) The message type, as defined by drupal_set_message(). Defaults to 'status'
9 calls to DevelGenerateBase::setMessage()
- ContentDevelGenerate::contentKill in devel_generate/
src/ Plugin/ DevelGenerate/ ContentDevelGenerate.php - Deletes all nodes of given node types.
- ContentDevelGenerate::generateContent in devel_generate/
src/ Plugin/ DevelGenerate/ ContentDevelGenerate.php - Method responsible for creating content when the number of elements is less than 50.
- ContentDevelGenerate::settingsForm in devel_generate/
src/ Plugin/ DevelGenerate/ ContentDevelGenerate.php - Returns the form for the plugin.
- DevelGenerateBase::generate in devel_generate/
src/ DevelGenerateBase.php - Execute the instructions in common for all DevelGenerate plugin
- ExampleDevelGenerate::generateElements in devel_generate/
tests/ modules/ devel_generate_example/ src/ Plugin/ DevelGenerate/ ExampleDevelGenerate.php - Business logic relating with each DevelGenerate plugin
File
- devel_generate/
src/ DevelGenerateBase.php, line 132
Class
- DevelGenerateBase
- Provides a base DevelGenerate plugin implementation.
Namespace
Drupal\devel_generateCode
protected function setMessage($msg, $type = 'status') {
$function = 'drupal_set_message';
if (function_exists('drush_log')) {
$function = 'drush_log';
$msg = strip_tags($msg);
}
$function($msg, $type);
}