You are here

public function RngRegistrationCreationSubscriber::canRegisterProxies in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 3.x src/EventSubscriber/RngRegistrationCreationSubscriber.php \Drupal\rng\EventSubscriber\RngRegistrationCreationSubscriber::canRegisterProxies()

Determines if user can register proxies.

Parameters

\Drupal\rng\Event\RegistrationAccessEvent $event:

File

src/EventSubscriber/RngRegistrationCreationSubscriber.php, line 102

Class

RngRegistrationCreationSubscriber
Class RngRegistrationCreationSubscriber.

Namespace

Drupal\rng\EventSubscriber

Code

public function canRegisterProxies(RegistrationAccessEvent $event) {
  $meta = $this
    ->getMeta($event
    ->getContext());
  if (!$meta
    ->canRegisterProxyIdentities()) {
    $event
      ->setAccess(FALSE);
  }
}