Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The path_is_admin function call has now been replaced with the router service:
$is_admin = \Drupal::service('router.admin_context')->isAdminRoute();
(see https://api.drupal.org/api/drupal/includes%21path.inc/function/path_is_a...)
Comments
Comment #2
mike.davis CreditAttribution: mike.davis at Deeson commentedComment #4
mike.davis CreditAttribution: mike.davis at Deeson commentedThis has been updated now