You are here

protected function RemoteForm::hasAuthPlugin in Entity Share 8.3

Helper method to instantiate plugin from this entity.

Return value

bool True if the remote entity has a plugin.

Throws

\Drupal\Component\Plugin\Exception\PluginException

1 call to RemoteForm::hasAuthPlugin()
RemoteForm::addAuthOptions in modules/entity_share_client/src/Form/RemoteForm.php
Helper function to build the authorization options in the form.

File

modules/entity_share_client/src/Form/RemoteForm.php, line 230

Class

RemoteForm
Entity form of the remote entity.

Namespace

Drupal\entity_share_client\Form

Code

protected function hasAuthPlugin() {

  /** @var \Drupal\entity_share_client\Entity\RemoteInterface $remote */
  $remote = $this->entity;
  $plugin = $remote
    ->getAuthPlugin();
  if ($plugin instanceof ClientAuthorizationInterface) {
    $this->authPlugin = $plugin;
    return TRUE;
  }
  return FALSE;
}