public function DevelDumperManager::exportAsRenderable in Devel 8.3
Same name and namespace in other branches
- 8 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::exportAsRenderable()
- 8.2 src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::exportAsRenderable()
- 4.x src/DevelDumperManager.php \Drupal\devel\DevelDumperManager::exportAsRenderable()
Returns a render array representation of a variable.
Parameters
mixed $input: The variable to export.
string $name: (optional) The label to output before variable, defaults to NULL.
string $plugin_id: (optional) The plugin ID, defaults to NULL.
Return value
array String representation of a variable wrapped in a render array.
Overrides DevelDumperManagerInterface::exportAsRenderable
File
- src/
DevelDumperManager.php, line 131
Class
- DevelDumperManager
- Class DevelDumperManager.
Namespace
Drupal\develCode
public function exportAsRenderable($input, $name = NULL, $plugin_id = NULL) {
if ($this
->hasAccessToDevelInformation()) {
return $this
->createInstance($plugin_id)
->exportAsRenderable($input, $name);
}
return [];
}