DomainAccess.php in Siteimprove 8
File
siteimprove_domain_access/src/Plugin/SiteimproveDomain/DomainAccess.php
View source
<?php
namespace Drupal\siteimprove_domain_access\Plugin\SiteimproveDomain;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\siteimprove\Plugin\SiteimproveDomainBase;
use Drupal\siteimprove\Plugin\SiteimproveDomainInterface;
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;
}
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
}
public function getUrls(EntityInterface $entity) {
$domain = \Drupal::service('domain_access.manager');
return $domain
->getContentUrls($entity);
}
}
Classes
Name |
Description |
DomainAccess |
Provides simple plugin instance of Siteimprove Domain settings. |