Commit bcb56a96 authored by lussoluca's avatar lussoluca

Merge branch '8.x-1.x' into testing

parents 59cf6078 a492f4b1
......@@ -9,6 +9,26 @@
"email": "weitzman@tejasa.com",
"homepage": "https://github.com/weitzman",
"role": "Maintainer"
},
{
"name": "Hans Salvisberg",
"email": "drupal@salvisberg.com",
"homepage": "https://www.drupal.org/u/salvis",
"role": "Maintainer"
},
{
"name": "Luca Lusso",
"homepage": "https://www.drupal.org/u/lussoluca",
"role": "Maintainer"
},
{
"name": "Marco (willzyx)",
"homepage": "https://www.drupal.org/u/willzyx",
"role": "Maintainer"
},
{
"name": "See contributors",
"homepage": "https://www.drupal.org/node/3236/committers"
}
],
"support": {
......
toolbar_items:
- 'devel.admin_settings_link'
- 'devel.cache_clear'
- 'devel.container_info.service'
- 'devel.execute_php'
- 'devel.menu_rebuild'
- 'devel.reinstall'
- 'devel.route_info'
- 'devel.run_cron'
......@@ -28,6 +28,16 @@ devel.settings:
type: string
label: 'Devel variable dumper'
devel.toolbar.settings:
type: config_object
label: 'Devel Toolbar settings'
mapping:
toolbar_items:
type: sequence
label: 'Toolbar items'
sequence:
type: string
block.settings.devel_switch_user:
type: block_settings
label: 'Switch user block'
......
/**
* @file
* Styling for devel toolbar module.
*/
.toolbar .toolbar-tray-vertical .edit-devel-toolbar {
text-align: right; /* LTR */
padding: 1em;
}
[dir="rtl"] .toolbar .toolbar-tray-vertical .edit-devel-toolbar {
text-align: left;
}
.toolbar .toolbar-tray-horizontal .edit-devel-toolbar {
float: right; /* LTR */
}
[dir="rtl"] .toolbar .toolbar-tray-horizontal .edit-devel-toolbar {
float: left;
}
.toolbar .toolbar-tray-horizontal .menu {
float: left; /* LTR */
}
[dir="rtl"] .toolbar .toolbar-tray-horizontal .menu {
float: right;
}
.toolbar .toolbar-bar .toolbar-icon-devel:before{
background-image: url(../icons/bebebe/cog.svg);
}
.toolbar-bar .toolbar-icon-devel:active:before,
.toolbar-bar .toolbar-icon-devel.is-active:before {
background-image: url(../icons/ffffff/cog.svg);
}
.toolbar-horizontal .toolbar-horizontal-item-hidden {
display: none;
}
......@@ -5,6 +5,25 @@
* Install, update and uninstall functions for the devel module.
*/
/**
* Implements hook_requirements().
*/
function devel_requirements($phase) {
$requirements = [];
if ($phase == 'runtime') {
// To understand the reasons why this message is marked as info see
// https://www.drupal.org/node/2834400.
$requirements['devel'] = [
'title' => t('Devel module enabled'),
'description' => t('The module provide the access to debug informations, therefore is recommended to disable the Devel module on production sites.'),
'severity' => REQUIREMENT_INFO,
];
}
return $requirements;
}
/**
* Set the default devel dumper plugin.
*/
......
......@@ -3,3 +3,9 @@ devel:
css:
theme:
css/devel.css: {}
devel-toolbar:
version: VERSION
css:
component:
css/devel.toolbar.css: {}
......@@ -23,11 +23,6 @@ devel.menu_rebuild:
route_name: devel.menu_rebuild
menu_name: devel
class: \Drupal\devel\Plugin\Menu\DestinationMenuLink
devel.menu_item:
title: 'Menu Item'
route_name: devel.menu_item
menu_name: devel
class: \Drupal\devel\Plugin\Menu\MenuItemMenuLink
devel.state_system_page:
title: 'State editor'
description: 'Edit state system values.'
......@@ -73,3 +68,26 @@ devel.run_cron:
route_name: devel.run_cron
menu_name: devel
class: \Drupal\devel\Plugin\Menu\DestinationMenuLink
# Container info
devel.container_info.service:
title: 'Container Info'
route_name: devel.container_info.service
menu_name: devel
# Routes info
devel.route_info:
title: 'Routes Info'
route_name: devel.route_info
menu_name: devel
devel.route_info.item:
title: 'Current route info'
route_name: devel.route_info.item
menu_name: devel
class: \Drupal\devel\Plugin\Menu\RouteDetailMenuLink
# Event info
devel.event_info:
title: 'Events Info'
route_name: devel.event_info
menu_name: devel
......@@ -6,3 +6,13 @@ devel.admin_settings:
route_name: devel.admin_settings
base_route: devel.admin_settings
weight: 0
# Container info
devel.container_info.service:
title: 'Services'
route_name: devel.container_info.service
base_route: devel.container_info.service
devel.container_info.parameter:
title: 'Parameters'
route_name: devel.container_info.parameter
base_route: devel.container_info.service
......@@ -19,14 +19,50 @@ use Drupal\Core\Database\Query\AlterableInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Logger\RfcLogLevel;
use Drupal\Core\Menu\LocalTaskDefault;
use Drupal\Core\Render\Element;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
use Drupal\Core\Utility\Error;
use Drupal\devel\EntityTypeInfo;
use Drupal\devel\ToolbarHandler;
/**
* Implements hook_help().
*/
function devel_help($route_name) {
function devel_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.devel':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Devel module provides a suite of modules containing fun for module developers and themers. For more information, see the <a href=":url">online documentation for the Devel module</a>.', [':url' => 'https://www.drupal.org/docs/8/modules/devel']) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Inspecting Service Container') . '</dt>';
$output .= '<dd>' . t('The module allows you to inspect Services and Parameters registered in the Service Container. You can see those informations on <a href=":url">Container info</a> page.', [':url' => Url::fromRoute('devel.container_info.service')->toString()]) . '</dd>';
$output .= '<dt>' . t('Inspecting Routes') . '</dt>';
$output .= '<dd>' . t('The module allows you to inspect routes information, gathering all routing data from <em>.routing.yml</em> files and from classes which subscribe to the route build/alter events. You can see those informations on <a href=":url">Routes info</a> page.', [':url' => Url::fromRoute('devel.route_info')->toString()]) . '</dd>';
$output .= '<dt>' . t('Inspecting Events') . '</dt>';
$output .= '<dd>' . t('The module allow you to inspect listeners registered in the event dispatcher. You can see those informations on <a href=":url">Events info</a> page.', [':url' => Url::fromRoute('devel.event_info')->toString()]) . '</dd>';
$output .= '</dl>';
return $output;
case 'devel.container_info.service':
case 'devel.container_info.parameter':
$output = '';
$output .= '<p>' . t('Displays Services and Parameters registered in the Service Container. For more informations on the Service Container, see the <a href=":url">Symfony online documentation</a>.', [':url' => 'http://symfony.com/doc/current/service_container.html']) . '</p>';
return $output;
case 'devel.route_info':
$output = '';
$output .= '<p>' . t('Displays registered routes for the site. For a complete overview of the routing system, see the <a href=":url">online documentation</a>.', [':url' => 'https://www.drupal.org/docs/8/api/routing-system']) . '</p>';
return $output;
case 'devel.event_info':
$output = '';
$output .= '<p>' . t('Displays events and listeners registered in the event dispatcher. For a complete overview of the event system, see the <a href=":url">Symfony online documentation</a>.', [':url' => 'http://symfony.com/doc/current/components/event_dispatcher.html']) . '</p>';
return $output;
case 'devel.reinstall':
$output = '<p>' . t('<strong>Warning</strong> - will delete your module tables and configuration.') . '</p>';
$output .= '<p>' . t('Uninstall and then install the selected modules. <code>hook_uninstall()</code> and <code>hook_install()</code> will be executed and the schema version number will be set to the most recent update number.') . '</p>';
......@@ -45,42 +81,42 @@ function devel_help($route_name) {
* Implements hook_entity_type_alter().
*/
function devel_entity_type_alter(array &$entity_types) {
/** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
foreach ($entity_types as $entity_type_id => $entity_type) {
if (($entity_type->getFormClass('default') || $entity_type->getFormClass('edit')) && $entity_type->hasLinkTemplate('edit-form')) {
$entity_type->setLinkTemplate('devel-load', "/devel/$entity_type_id/{{$entity_type_id}}");
}
if ($entity_type->hasViewBuilderClass() && $entity_type->hasLinkTemplate('canonical')) {
$entity_type->setLinkTemplate('devel-render', "/devel/$entity_type_id/{{$entity_type_id}}/render");
}
if ($entity_type->hasLinkTemplate('devel-render') || $entity_type->hasLinkTemplate('devel-load')) {
$entity_type->setLinkTemplate('devel-definition', "/devel/$entity_type_id/{{$entity_type_id}}/definition");
}
}
return \Drupal::service('class_resolver')
->getInstanceFromDefinition(EntityTypeInfo::class)
->entityTypeAlter($entity_types);
}
/**
* Implements hook_entity_operation().
*/
function devel_entity_operation(EntityInterface $entity) {
$operations = array();
if (\Drupal::currentUser()->hasPermission('access devel information')) {
if ($entity->hasLinkTemplate('devel-load')) {
$operations['devel'] = array(
'title' => t('Devel'),
'weight' => 100,
'url' => $entity->toUrl('devel-load'),
);
}
elseif ($entity->hasLinkTemplate('devel-render')) {
$operations['devel'] = array(
'title' => t('Devel'),
'weight' => 100,
'url' => $entity->toUrl('devel-render'),
);
}
return \Drupal::service('class_resolver')
->getInstanceFromDefinition(EntityTypeInfo::class)
->entityOperation($entity);
}
/**
* Implements hook_toolbar().
*/
function devel_toolbar() {
return \Drupal::service('class_resolver')
->getInstanceFromDefinition(ToolbarHandler::class)
->toolbar();
}
/**
* Implements hook_local_tasks_alter().
*/
function devel_local_tasks_alter(&$local_tasks) {
if (\Drupal::moduleHandler()->moduleExists('toolbar')) {
$local_tasks['devel.toolbar.settings_form'] = [
'title' => 'Toolbar Settings',
'base_route' => 'devel.admin_settings',
'route_name' => 'devel.toolbar.settings_form',
'class' => LocalTaskDefault::class,
'options' => [],
];
}
return $operations;
}
/**
......@@ -208,7 +244,7 @@ function backtrace_error_handler($error_level, $message, $filename, $line, $cont
drupal_set_message($msg, ($severity_level <= RfcLogLevel::NOTICE ? 'error' : 'warning'), TRUE);
}
if (!empty($error_handlers[DEVEL_ERROR_HANDLER_BACKTRACE_KINT])) {
print kprint_r(ddebug_backtrace(TRUE, 1), $return = TRUE, $msg);
print kpr(ddebug_backtrace(TRUE, 1), TRUE, $msg);
}
if (!empty($error_handlers[DEVEL_ERROR_HANDLER_BACKTRACE_DPM])) {
dpm(ddebug_backtrace(TRUE, 1), $msg, 'warning');
......@@ -349,18 +385,6 @@ function kpr($input, $export = FALSE, $name = NULL) {
return \Drupal::service('devel.dumper')->dumpOrExport($input, $name, $export);
}
/**
* Kint print.
*
* @deprecated in Devel 8.x-dev, will be removed before Devel 8.0.
* Use kpr() or devel.dumper service instead.
*
* @TODO remove in https://www.drupal.org/node/2703343
*/
function kprint_r($input, $export = FALSE, $name = NULL, $function = 'print_r') {
return kpr($input, $export, $name);
}
/**
* Wrapper for DevelDumperManager::dumpOrExport().
*
......@@ -429,7 +453,7 @@ function dpq($query, $return = FALSE, $name = NULL) {
function devel_render() {
$args = func_get_args();
// #pre_render and #post_render pass the rendered $element as last argument.
kprint_r(end($args));
kpr(end($args));
// #pre_render and #post_render expect the first argument to be returned.
return reset($args);
}
......@@ -502,7 +526,7 @@ function ddebug_backtrace($return = FALSE, $pop = 0, $options = DEBUG_BACKTRACE_
if ($return) {
return $nicetrace;
}
kprint_r($nicetrace);
kpr($nicetrace);
}
}
}
......
......@@ -6,6 +6,15 @@ devel.admin_settings:
requirements:
_permission: 'administer site configuration'
devel.toolbar.settings_form:
path: 'admin/config/development/devel/toolbar'
defaults:
_form: '\Drupal\devel\Form\ToolbarSettingsForm'
_title: 'Devel Toolbar Settings'
requirements:
_permission: 'administer site configuration'
_module_dependencies: 'toolbar'
devel.reinstall:
path: '/devel/reinstall'
defaults:
......@@ -67,16 +76,6 @@ devel.system_state_edit:
requirements:
_permission: 'administer site configuration'
devel.menu_item:
path: '/devel/menu/item'
defaults:
_controller: '\Drupal\devel\Controller\DevelController::menuItem'
_title: 'Menu item'
options:
_admin_route: TRUE
requirements:
_permission: 'access devel information'
devel.theme_registry:
path: '/devel/theme/registry'
defaults:
......@@ -170,3 +169,76 @@ devel.run_cron:
requirements:
_permission: 'administer site configuration'
_csrf_token: 'TRUE'
# Container info
devel.container_info.service:
path: '/devel/container/service'
defaults:
_controller: '\Drupal\devel\Controller\ContainerInfoController::serviceList'
_title: 'Container services'
options:
_admin_route: TRUE
requirements:
_permission: 'access devel information'
devel.container_info.service.detail:
path: '/devel/container/service/{service_id}'
defaults:
_controller: '\Drupal\devel\Controller\ContainerInfoController::serviceDetail'
_title: 'Service @service_id detail'
options:
_admin_route: TRUE
requirements:
_permission: 'access devel information'
devel.container_info.parameter:
path: '/devel/container/parameter'
defaults:
_controller: '\Drupal\devel\Controller\ContainerInfoController::parameterList'
_title: 'Container parameters'
options:
_admin_route: TRUE
requirements:
_permission: 'access devel information'
devel.container_info.parameter.detail:
path: '/devel/container/parameter/{parameter_name}'
defaults:
_controller: '\Drupal\devel\Controller\ContainerInfoController::parameterDetail'
_title: 'Parameter @parameter_name value'
options:
_admin_route: TRUE
requirements:
_permission: 'access devel information'
# Route info
devel.route_info:
path: '/devel/routes'
defaults:
_controller: '\Drupal\devel\Controller\RouteInfoController::routeList'
_title: 'Routes'
options:
_admin_route: TRUE
requirements:
_permission: 'access devel information'
devel.route_info.item:
path: '/devel/routes/item'
defaults:
_controller: '\Drupal\devel\Controller\RouteInfoController::routeDetail'
_title: 'Route detail'
options:
_admin_route: TRUE
requirements:
_permission: 'access devel information'
# Event info
devel.event_info:
path: '/devel/events'
defaults:
_controller: '\Drupal\devel\Controller\EventInfoController::eventList'
_title: 'Events'
options:
_admin_route: TRUE
requirements:
_permission: 'access devel information'
<?php
/**
* Implements hook_rules_action_info().
*/
function devel_rules_action_info() {
return array(
'devel_debug' => array(
'base' => 'devel_rules_debug_action',
'label' => t('Debug value'),
'group' => t('Devel'),
'parameter' => array(
'value' => array('type' => 'unknown', 'label' => t('Value to debug')),
),
),
);
}
/**
* Rules action for debugging values.
*/
function devel_rules_debug_action($value) {
dpm($value);
}
services:
devel.event_subscriber:
class: Drupal\devel\EventSubscriber\DevelEventSubscriber
arguments: ['@config.factory', '@current_user', '@module_handler', '@url_generator']
devel.error_subscriber:
class: Drupal\devel\EventSubscriber\ErrorHandlerSubscriber
arguments: ['@current_user']
tags:
- { name: event_subscriber }
devel.theme_rebuild_subscriber:
class: Drupal\devel\EventSubscriber\ThemeInfoRebuildSubscriber
arguments: ['@config.factory', '@current_user', '@theme_handler']
tags:
- { name: event_subscriber }
devel.route_subscriber:
class: Drupal\devel\Routing\RouteSubscriber
arguments: ['@entity_type.manager']
tags:
- { name: event_subscriber }
......@@ -13,12 +25,6 @@ services:
class: Drupal\devel\DevelDumperManager
arguments: ['@config.factory', '@current_user', '@plugin.manager.devel_dumper']
devel.route_subscriber:
class: Drupal\devel\Routing\RouteSubscriber
arguments: ['@entity_type.manager']
tags:
- { name: event_subscriber }
devel.twig.debug_extension:
class: Drupal\devel\Twig\Extension\Debug
arguments: ['@devel.dumper']
......
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#bebebe" d="M15.176 9.041c.045-.327.076-.658.076-.998 0-.36-.035-.71-.086-1.056l-2.275-.293c-.115-.426-.283-.827-.498-1.201l1.396-1.808c-.416-.551-.906-1.039-1.459-1.452l-1.807 1.391c-.373-.215-.774-.383-1.2-.499l-.292-2.252c-.338-.048-.677-.081-1.029-.081s-.694.033-1.032.082l-.291 2.251c-.426.116-.826.284-1.2.499l-1.805-1.391c-.552.413-1.044.901-1.459 1.452l1.395 1.808c-.215.374-.383.774-.499 1.2l-2.276.294c-.05.346-.085.696-.085 1.056 0 .34.031.671.077.998l2.285.295c.115.426.284.826.499 1.2l-1.417 1.836c.411.55.896 1.038 1.443 1.452l1.842-1.42c.374.215.774.383 1.2.498l.298 2.311c.337.047.677.08 1.025.08s.688-.033 1.021-.08l.299-2.311c.426-.115.826-.283 1.201-.498l1.842 1.42c.547-.414 1.031-.902 1.443-1.452l-1.416-1.837c.215-.373.383-.773.498-1.199l2.286-.295zm-7.174 1.514c-1.406 0-2.543-1.137-2.543-2.541 0-1.402 1.137-2.541 2.543-2.541 1.402 0 2.541 1.138 2.541 2.541 0 1.404-1.139 2.541-2.541 2.541z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#ffffff" d="M15.176 9.041c.045-.327.076-.658.076-.998 0-.36-.035-.71-.086-1.056l-2.275-.293c-.115-.426-.283-.827-.498-1.201l1.396-1.808c-.416-.551-.906-1.039-1.459-1.452l-1.807 1.391c-.373-.215-.774-.383-1.2-.499l-.292-2.252c-.338-.048-.677-.081-1.029-.081s-.694.033-1.032.082l-.291 2.251c-.426.116-.826.284-1.2.499l-1.805-1.391c-.552.413-1.044.901-1.459 1.452l1.395 1.808c-.215.374-.383.774-.499 1.2l-2.276.294c-.05.346-.085.696-.085 1.056 0 .34.031.671.077.998l2.285.295c.115.426.284.826.499 1.2l-1.417 1.836c.411.55.896 1.038 1.443 1.452l1.842-1.42c.374.215.774.383 1.2.498l.298 2.311c.337.047.677.08 1.025.08s.688-.033 1.021-.08l.299-2.311c.426-.115.826-.283 1.201-.498l1.842 1.42c.547-.414 1.031-.902 1.443-1.452l-1.416-1.837c.215-.373.383-.773.498-1.199l2.286-.295zm-7.174 1.514c-1.406 0-2.543-1.137-2.543-2.541 0-1.402 1.137-2.541 2.543-2.541 1.402 0 2.541 1.138 2.541 2.541 0 1.404-1.139 2.541-2.541 2.541z"/></svg>
\ No newline at end of file
......@@ -24,13 +24,6 @@ class Kint extends DevelDumperBase {
kint_require();
}
/**
* {@inheritdoc}
*/
public function dump($input, $name = NULL) {
echo (string) $this->export($input, $name);
}
/**
* {@inheritdoc}
*/
......
<?php
namespace Drupal\devel\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\DrupalKernelInterface;
use Drupal\Core\Url;
use Drupal\devel\DevelDumperManagerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Provides route responses for the container info pages.
*/
class ContainerInfoController extends ControllerBase implements ContainerAwareInterface {
use ContainerAwareTrait;
/**
* The drupal kernel.
*
* @var \Drupal\Core\DrupalKernelInterface
*/
protected $kernel;
/**
* The dumper manager service.
*
* @var \Drupal\devel\DevelDumperManagerInterface
*/
protected $dumper;
/**
* ServiceInfoController constructor.
*
* @param \Drupal\Core\DrupalKernelInterface $drupalKernel
* The drupal kernel.
* @param \Drupal\devel\DevelDumperManagerInterface $dumper
* The dumper manager service.
*/
public function __construct(DrupalKernelInterface $drupalKernel, DevelDumperManagerInterface $dumper) {
$this->kernel = $drupalKernel;
$this->dumper = $dumper;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('kernel'),
$container->get('devel.dumper')
);
}
/**
* Builds the services overview page.
*
* @return array
* A render array as expected by the renderer.
*/
public function serviceList() {
$headers = [
$this->t('ID'),
$this->t('Class'),
$this->t('Alias'),
$this->t('Operations'),
];
$rows = [];
if ($container = $this->kernel->getCachedContainerDefinition()) {
foreach ($container['services'] as $service_id => $definition) {
$service = unserialize($definition);
$row['id'] = [
'data' => $service_id,
'class' => 'table-filter-text-source',
];
$row['class'] = [
'data' => isset($service['class']) ? $service['class'] : '',
'class' => 'table-filter-text-source',
];
$row['alias'] = [
'data' => array_search($service_id, $container['aliases']) ?: '',
'class' => 'table-filter-text-source',
];
$row['operations']['data'] = [
'#type' => 'operations',
'#links' => [
'devel' => [
'title' => $this->t('Devel'),
'url' => Url::fromRoute('devel.container_info.service.detail', ['service_id' => $service_id]),
],
],
];
$rows[$service_id] = $row;
}
ksort($rows);
}
$output['#attached']['library'][] = 'system/drupal.system.modules';
$output['filters'] = [
'#type' => 'container',
'#attributes' => [
'class' => ['table-filter', 'js-show'],
],
];
$output['filters']['text'] = [
'#type' => 'search',
'#title' => $this->t('Search'),
'#size' => 30,
'#placeholder' => $this->t('Enter service id, alias or class'),
'#attributes' => [
'class' => ['table-filter-text'],
'data-table' => '.devel-filter-text',
'autocomplete' => 'off',
'title' => $this->t('Enter a part of the service id, service alias or class to filter by.'),
],
];
$output['services'] = [
'#type' => 'table',
'#header' => $headers,
'#rows' => $rows,
'#empty' => $this->t('No services found.'),
'#sticky' => TRUE,
'#attributes' => [
'class' => ['devel-service-list', 'devel-filter-text'],
],
];
return $output;
}
/**
* Returns a render array representation of the service.
*
* @param string $service_id
* The ID of the service to retrieve.
*
* @return array
* A render array containing the service detail.
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
* If the requested service is not defined.
*/
public function serviceDetail($service_id) {
$instance = $this->container->get($service_id, ContainerInterface::NULL_ON_INVALID_REFERENCE);
if ($instance === NULL) {
throw new NotFoundHttpException();
}
$output = [];
if ($cached_definitions = $this->kernel->getCachedContainerDefinition()) {
// Tries to retrieve the service definition from the kernel's cached
// container definition.
if (isset($cached_definitions['services'][$service_id])) {
$definition = unserialize($cached_definitions['services'][$service_id]);
// If the service has an alias add it to the definition.
if ($alias = array_search($service_id, $cached_definitions['aliases'])) {
$definition['alias'] = $alias;
}
$output['definition'] = $this->dumper->exportAsRenderable($definition, $this->t('Computed Definition'));
}
}