You are here

public function DevelDumperManager::message in Devel 8

Same name and namespace in other branches
  1. 8.3 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::message()
  2. 8.2 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::message()
  3. 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 91

Class

DevelDumperManager
Class DevelDumperManager.

Namespace

Drupal\devel

Code

public function message($input, $name = NULL, $type = 'status', $plugin_id = NULL) {
  if ($this
    ->hasAccessToDevelInformation()) {
    $output = $this
      ->export($input, $name, $plugin_id);
    drupal_set_message($output, $type, TRUE);
  }
}