diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc index cffb449..e983b83 100644 --- a/core/modules/system/system.tokens.inc +++ b/core/modules/system/system.tokens.inc @@ -10,6 +10,7 @@ use Drupal\Component\Utility\String; use Drupal\Component\Utility\Xss; + /** * Implements hook_token_info(). */ @@ -51,7 +52,7 @@ function system_token_info() { // Date related tokens. /** @var \Drupal\system\DateFormatInterface[] $date_formats */ - $date_formats = \Drupal::entityManager()->getStorageController('date_format')->loadMultiple(); + $date_formats = \Drupal::entityManager()->getStorage('date_format')->loadMultiple(); foreach ($date_formats as $date_format) { $date[$date_format->id()] = array( 'name' => t('@name', array('@name' => $date_format->label())), @@ -66,7 +67,7 @@ function system_token_info() { 'name' => t("Custom format"), 'description' => t('A date in a custom format. See the PHP documentation for details.'), ); - + $date['since'] = array( 'name' => t("Time-since"), 'description' => t("A date in 'time-since' format. (%date)", array('%date' => \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - 360, 2))), @@ -144,7 +145,7 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a } /** @var \Drupal\system\DateFormatInterface[] $date_formats */ - $date_formats = \Drupal::entityManager()->getStorageController('date_format')->loadMultiple(); + $date_formats = \Drupal::entityManager()->getStorage('date_format')->loadMultiple(); foreach ($tokens as $name => $original) { // Date type token replacement. if (isset($date_formats[$name])) {