public function DevelDumperManager::message in Devel 8.2
Same name and namespace in other branches
- 8.3 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::message()
- 8 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::message()
- 4.x src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::message()
Sets a message with a string representation of a variable.
Parameters
mixed $input: The variable to dump.
string $name: (optional) The label to output before variable, defaults to NULL.
string $type: (optional) The message's type. Defaults to 'status'.
string $plugin_id: (optional) The plugin ID, defaults to NULL.
Overrides DevelDumperManagerInterface::message
File
- src/
DevelDumperManager.php, line 94
Class
- DevelDumperManager
- Class DevelDumperManager.
Namespace
Drupal\develCode
public function message($input, $name = NULL, $type = MessengerInterface::TYPE_STATUS, $plugin_id = NULL) {
if ($this
->hasAccessToDevelInformation()) {
$output = $this
->export($input, $name, $plugin_id);
$this
->messenger()
->addMessage($output, $type, TRUE);
}
}