domain_lang.module in Domain Lang 8
Same filename and directory in other branches
Domain Language detection and selection module.
File
domain_lang.moduleView source
<?php
/**
* @file
* Domain Language detection and selection module.
*/
use Drupal\domain\DomainInterface;
use Drupal\Core\Url;
/**
* Implements hook_domain_operations().
*/
function domain_lang_domain_operations(DomainInterface $domain) {
$operations = [];
if (\Drupal::currentUser()
->hasPermission('administer domain language negotiation')) {
$operations['domain_lang'] = [
'title' => t('Language Detection and Selection'),
'url' => Url::fromRoute('domain_lang.admin', [
'domain' => $domain
->id(),
]),
'weight' => 90,
];
}
return $operations;
}
Functions
Name | Description |
---|---|
domain_lang_domain_operations | Implements hook_domain_operations(). |