drupal_access_denied()替换为 AccessDeniedHttpException()
drupal_not_fount()替换为 NotFoundHttpException();
drupal7没有权限
drupal_access_denied();
drupal_exit();
drupal8替换为
throw new AccessDeniedHttpException();
drupal7没有找到
drupal_not_found();
drupal_exit();
drupal8替换为
throw new NotFoundHttpException();
别忘了调用类库:
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;