Skip to content
Snippets Groups Projects
Commit cfe86f39 authored by Martin Anderson-Clutz's avatar Martin Anderson-Clutz
Browse files

Issue #3425595 by mandclu: You have requested a non-existent service "entity.manager"

parent 5b393f7d
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ use Drupal\Core\Render\BubbleableMetadata;
*/
function token_entity_render_token_info_alter(array &$data) {
// Load all possible view modes.
$all_view_modes = \Drupal::service('entity.manager')->getStorage('entity_view_mode')->loadMultiple();
$all_view_modes = \Drupal::service('entity_type.manager')->getStorage('entity_view_mode')->loadMultiple();
// Traverse all view modes.
foreach ($all_view_modes as $mode) {
......@@ -67,7 +67,7 @@ function token_entity_render_tokens($type, array $tokens, array $data, array $op
}
// Load all possible view modes.
$all_view_modes = \Drupal::service('entity.manager')->getStorage('entity_view_mode')->loadMultiple();
$all_view_modes = \Drupal::service('entity_type.manager')->getStorage('entity_view_mode')->loadMultiple();
// Traverse again all tokens to process.
$renderer = \Drupal::service('renderer');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment