You are here

public function DomainRegistrationPattern::getPatterns in Restrict Domain Registration 8

Returns an array of domain patterns based on the configuration.

This is done through a service so other modules can decorate it and provide alternative sources of domains.

Return value

array List of domain patterns.

Overrides DomainRegistrationPatternInterface::getPatterns

File

src/DomainRegistrationPattern.php, line 32

Class

DomainRegistrationPattern
Sets the _admin_route for specific group-related routes.

Namespace

Drupal\domain_registration

Code

public function getPatterns() {
  if ($domains = $this->configFactory
    ->get('domain_registration.settings')
    ->get('pattern')) {
    $domains = explode("\r\n", $domains);
  }
  return $domains ?: [];
}