You are here

class DomainAccess in Siteimprove 8

Provides simple plugin instance of Siteimprove Domain settings.

Plugin annotation


@SiteimproveDomain(
  id = "siteimprovedomain_domain_access",
  label = @Translation("Domain Access support"),
  description = @Translation("Automatically use the domains configured in Domain Access as Siteimprove frontend domains."),
)

Hierarchy

Expanded class hierarchy of DomainAccess

File

siteimprove_domain_access/src/Plugin/SiteimproveDomain/DomainAccess.php, line 19

Namespace

Drupal\siteimprove_domain_access\Plugin\SiteimproveDomain
View source
class DomainAccess extends SiteimproveDomainBase implements SiteimproveDomainInterface {
  public function buildForm(array &$form, FormStateInterface &$form_state, $plugin_definition) {
    parent::buildForm($form, $form_state, $plugin_definition);
    $form[$plugin_definition['id']]['description'] = [
      '#type' => 'markup',
      '#markup' => $this
        ->t("This plugin doesn't contain any settings. Domain names are automatically fetched from Domain Access."),
    ];
    return $form;
  }

  /**
   * {@inheritdoc}
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    parent::submitForm($form, $form_state);
  }

  /**
   * {@inheritdoc}
   */
  public function getUrls(EntityInterface $entity) {
    $domain = \Drupal::service('domain_access.manager');
    return $domain
      ->getContentUrls($entity);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigFormBaseTrait::config protected function Retrieves a configuration object.
DomainAccess::buildForm public function Form constructor. Overrides SiteimproveDomainBase::buildForm
DomainAccess::getUrls public function Return urls for active domains for this entity. Overrides SiteimproveDomainBase::getUrls
DomainAccess::submitForm public function Form submission handler. Overrides SiteimproveDomainBase::submitForm
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
SiteimproveDomainBase::$configFactory protected property The config factory.
SiteimproveDomainBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create 2
SiteimproveDomainBase::getEditableConfigNames protected function Gets the configuration names that will be editable. Overrides ConfigFormBaseTrait::getEditableConfigNames 1
SiteimproveDomainBase::getName public function
SiteimproveDomainBase::validateForm public function Form validation handler. Overrides SiteimproveDomainInterface::validateForm 1
SiteimproveDomainBase::__construct public function Constructs a new SiteimproveDomainBase object. Overrides PluginBase::__construct 2
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.