updated contrib modules

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-13 14:16:18 +01:00
parent e668535a4e
commit 272fa07ccf
202 changed files with 5165 additions and 1725 deletions
@@ -8,8 +8,8 @@ dependencies:
- options
configure: domain.admin
# Information added by Drupal.org packaging script on 2017-12-19
version: '8.x-1.0-alpha11'
# Information added by Drupal.org packaging script on 2018-03-08
version: '8.x-1.0-alpha13'
core: '8.x'
project: 'domain'
datestamp: 1513718589
datestamp: 1520519900
@@ -27,12 +27,11 @@ function domain_update_8001() {
* Configures user form display to checkboxes widget for domain admin field.
*/
function _domain_configure_field() {
// @TODO: This function is deprecated, but using the OO syntax is causing
// test fails.
entity_get_form_display('user', 'user', 'default')
->setComponent(DOMAIN_ADMIN_FIELD, array(
if ($display = \Drupal::entityTypeManager()->getStorage('entity_form_display')->load('user.user.default')) {
$display->setComponent(DOMAIN_ADMIN_FIELD, [
'type' => 'options_buttons',
'weight' => 50,
))
])
->save();
}
}
@@ -15,3 +15,4 @@ process:
status: valid
destination:
plugin: entity:domain
destination_module: domain
@@ -188,7 +188,6 @@ class DomainElementManager implements DomainElementManagerInterface {
*/
public function listDisallowed(array $disallowed) {
$domains = $this->domainStorage->loadMultiple($disallowed);
// @TODO: Proper theme function here.
$string = $this->t('The following domains are currently assigned and cannot be changed:');
foreach ($domains as $domain) {
$items[] = $domain->label();
@@ -204,7 +204,7 @@ class DomainNegotiator implements DomainNegotiatorInterface {
return TRUE;
}
// Check for registered alias matches.
$values = array('hostname' => $httpHost);
$values = array('hostname' => $hostname);
/** @var \Drupal\domain\Entity\DomainInterface $domain */
$domain = $this->domainStorage->create($values);
$domain->setMatchType(self::DOMAIN_MATCH_NONE);
@@ -27,8 +27,6 @@ class DomainServerBlock extends DomainBlockBase {
/**
* Build the output.
*
* @TODO: abstract or theme this function?
*/
public function build() {
/** @var \Drupal\domain\DomainInterface $domain */
@@ -47,10 +45,14 @@ class DomainServerBlock extends DomainBlockBase {
$domain->getResponse();
$check = \Drupal::service('entity_type.manager')->getStorage('domain')->loadByHostname($_SERVER['HTTP_HOST']);
$match = $this->t('Exact match');
// This value is not translatable.
$environment = 'default';
if (!$check) {
// Specific check for Domain Alias.
if (isset($domain->alias)) {
$match = $this->t('ALIAS: Using alias %id', array('%id' => $domain->alias->getPattern()));
// Get the environment.
$environment = $domain->alias->getEnvironment();
}
else {
$match = $this->t('FALSE: Using default domain.');
@@ -60,6 +62,23 @@ class DomainServerBlock extends DomainBlockBase {
$this->t('Domain match'),
$match,
);
$rows[] = [
$this->t('Environment'),
$environment,
];
$rows[] = [
$this->t('Canonical hostname'),
$domain->getCanonical(),
];
$rows[] = [
$this->t('Base path'),
$domain->getPath(),
];
$rows[] = [
$this->t('Current URL'),
$domain->getUrl(),
];
$www = \Drupal::config('domain.settings')->get('www_prefix');
$rows[] = array(
$this->t('Strip www prefix'),
@@ -25,8 +25,6 @@ class DomainSwitcherBlock extends DomainBlockBase {
/**
* Build the output.
*
* @TODO: abstract or theme this function?
*/
public function build() {
/** @var \Drupal\domain\DomainInterface $active_domain */
@@ -27,8 +27,6 @@ class DomainTokenBlock extends DomainBlockBase {
/**
* Build the output.
*
* @TODO: abstract or theme this function?
*/
public function build() {
/** @var \Drupal\domain\DomainInterface $domain */
@@ -49,7 +47,7 @@ class DomainTokenBlock extends DomainBlockBase {
/**
* Generates available tokens for printing.
*
* @param Drupal\domain\DomainInterface $domain
* @param \Drupal\domain\DomainInterface $domain
* The active domain request.
* @return array
* An array keyed by token name, with value of replacement value.
@@ -8,7 +8,8 @@ use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
* Drupal 7 Domain source from database.
*
* @MigrateSource(
* id = "d7_domain"
* id = "d7_domain",
* source_module = "domain"
* )
*/
class DomainRecord extends DrupalSqlBase {
@@ -9,8 +9,8 @@ hidden: TRUE
dependencies:
- domain
# Information added by Drupal.org packaging script on 2017-12-19
version: '8.x-1.0-alpha11'
# Information added by Drupal.org packaging script on 2018-03-08
version: '8.x-1.0-alpha13'
core: '8.x'
project: 'domain'
datestamp: 1513718589
datestamp: 1520519900
@@ -150,11 +150,9 @@ class DomainEntityReferenceTest extends DomainTestBase {
$field_config->save();
// Tell the form system how to behave.
entity_get_form_display('node', 'article', 'default')
->setComponent($name, array(
'type' => 'options_buttons',
))
->save();
if ($display = \Drupal::entityTypeManager()->getStorage('entity_form_display')->load('node.article.default')) {
$display->setComponent($name, ['type' => 'options_buttons'])->save();
}
}
}