This mimics the path visibility settings on block configurations.
1 2 3 4 5 6 7 |
$current_path = \Drupal::service('path.current')->getPath(); $patterns = "/user\n/user/login\n/user/password"; $match = \Drupal::service('path.matcher')->matchPath($current_path, $patterns);http://agileadam.com/wp-admin/post-new.php# if ($match) { $this->doSomething(); } |
Leave a Reply