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
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\siteimprove\Plugin\SiteimproveDomainBase implements ContainerFactoryPluginInterface, SiteimproveDomainInterface uses ConfigFormBaseTrait, StringTranslationTrait
- class \Drupal\siteimprove_domain_access\Plugin\SiteimproveDomain\DomainAccess implements SiteimproveDomainInterface
- class \Drupal\siteimprove\Plugin\SiteimproveDomainBase implements ContainerFactoryPluginInterface, SiteimproveDomainInterface uses ConfigFormBaseTrait, StringTranslationTrait
Expanded class hierarchy of DomainAccess
File
- siteimprove_domain_access/
src/ Plugin/ SiteimproveDomain/ DomainAccess.php, line 19
Namespace
Drupal\siteimprove_domain_access\Plugin\SiteimproveDomainView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigFormBaseTrait:: |
protected | function | Retrieves a configuration object. | |
DomainAccess:: |
public | function |
Form constructor. Overrides SiteimproveDomainBase:: |
|
DomainAccess:: |
public | function |
Return urls for active domains for this entity. Overrides SiteimproveDomainBase:: |
|
DomainAccess:: |
public | function |
Form submission handler. Overrides SiteimproveDomainBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
SiteimproveDomainBase:: |
protected | property | The config factory. | |
SiteimproveDomainBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
2 |
SiteimproveDomainBase:: |
protected | function |
Gets the configuration names that will be editable. Overrides ConfigFormBaseTrait:: |
1 |
SiteimproveDomainBase:: |
public | function | ||
SiteimproveDomainBase:: |
public | function |
Form validation handler. Overrides SiteimproveDomainInterface:: |
1 |
SiteimproveDomainBase:: |
public | function |
Constructs a new SiteimproveDomainBase object. Overrides PluginBase:: |
2 |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |