Update to Drupal 8.1.1. For more information, see https://www.drupal.org/node/2718713

This commit is contained in:
Pantheon Automation 2016-05-04 14:35:41 -07:00 committed by Greg Anderson
parent c0a0d5a94c
commit 9eae24d844
669 changed files with 3873 additions and 1553 deletions

View file

@ -19,7 +19,7 @@ function config_help($route_name, RouteMatchInterface $route_match) {
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Exporting the full configuration') . '</dt>';
$output .= '<dd>' . t('You can create and download an archive consisting of all your site\'s configuration exported as <em>*.yml</em> files on the <a href=":url">Export</a> page.' , array(':url' => \Drupal::url('config.export_full'))) . '</dd>';
$output .= '<dd>' . t('You can create and download an archive consisting of all your site\'s configuration exported as <em>*.yml</em> files on the <a href=":url">Export</a> page.', array(':url' => \Drupal::url('config.export_full'))) . '</dd>';
$output .= '<dt>' . t('Importing a full configuration') . '</dt>';
$output .= '<dd>' . t('You can upload a full site configuration from an archive file on the <a href=":url">Import</a> page. When importing data from a different environment, the site and import files must have matching configuration values for UUID in the <em>system.site</em> configuration item. That means that your other environments should initially be set up as clones of the target site. Migrations are not supported.', array(':url' => \Drupal::url('config.import_full'))) . '</dd>';
$output .= '<dt>' . t('Synchronizing configuration'). '</dt>';

View file

@ -100,4 +100,3 @@ class ConfigImportForm extends FormBase {
}
}

View file

@ -5,10 +5,12 @@
* Provides hook implementations for testing purposes.
*/
use Drupal\Core\Entity\EntityInterface;
/**
* Implements hook_ENTITY_TYPE_create.
*/
function config_install_dependency_test_config_test_create(\Drupal\Core\Entity\EntityInterface $entity) {
function config_install_dependency_test_config_test_create(EntityInterface $entity) {
// Add an enforced dependency on this module so that we can test if this is
// possible during module installation.
$entity->setEnforcedDependencies(['module' => ['config_install_dependency_test']]);

View file

@ -9,6 +9,8 @@
* config_test entity hooks themselves.
*/
use Drupal\config_test\Entity\ConfigTest;
/**
* Implements hook_config_test_load().
*/
@ -16,37 +18,69 @@ function config_test_config_test_load() {
$GLOBALS['hook_config_test']['load'] = __FUNCTION__;
}
/**
* Implements hook_ENTITY_TYPE_create() for 'config_test'.
*/
function config_test_config_test_create(ConfigTest $config_test) {
if (\Drupal::state()->get('config_test.prepopulate')) {
$config_test->set('foo', 'baz');
}
_config_test_update_is_syncing_store('create', $config_test);
}
/**
* Implements hook_config_test_presave().
*/
function config_test_config_test_presave() {
function config_test_config_test_presave(ConfigTest $config_test) {
$GLOBALS['hook_config_test']['presave'] = __FUNCTION__;
_config_test_update_is_syncing_store('presave', $config_test);
}
/**
* Implements hook_config_test_insert().
*/
function config_test_config_test_insert() {
function config_test_config_test_insert(ConfigTest $config_test) {
$GLOBALS['hook_config_test']['insert'] = __FUNCTION__;
_config_test_update_is_syncing_store('insert', $config_test);
}
/**
* Implements hook_config_test_update().
*/
function config_test_config_test_update() {
function config_test_config_test_update(ConfigTest $config_test) {
$GLOBALS['hook_config_test']['update'] = __FUNCTION__;
_config_test_update_is_syncing_store('update', $config_test);
}
/**
* Implements hook_config_test_predelete().
*/
function config_test_config_test_predelete() {
function config_test_config_test_predelete(ConfigTest $config_test) {
$GLOBALS['hook_config_test']['predelete'] = __FUNCTION__;
_config_test_update_is_syncing_store('predelete', $config_test);
}
/**
* Implements hook_config_test_delete().
*/
function config_test_config_test_delete() {
function config_test_config_test_delete(ConfigTest $config_test) {
$GLOBALS['hook_config_test']['delete'] = __FUNCTION__;
_config_test_update_is_syncing_store('delete', $config_test);
}
/**
* Helper function for testing hooks during configuration sync.
*
* @param string $hook
* The fired hook.
* @param \Drupal\config_test\Entity\ConfigTest $config_test
* The ConfigTest entity.
*/
function _config_test_update_is_syncing_store($hook, ConfigTest $config_test) {
$current_value = \Drupal::state()->get('config_test.store_isSyncing', FALSE);
if ($current_value !== FALSE) {
$current_value['global_state::' . $hook] = \Drupal::isConfigSyncing();
$current_value['entity_state::' . $hook] = $config_test->isSyncing();
\Drupal::state()->set('config_test.store_isSyncing', $current_value);
}
}

View file

@ -5,8 +5,6 @@
* Provides Config module hook implementations for testing purposes.
*/
use Drupal\config_test\Entity\ConfigTest;
require_once dirname(__FILE__) . '/config_test.hooks.inc';
/**
@ -17,15 +15,6 @@ function config_test_cache_flush() {
$GLOBALS['hook_cache_flush'] = __FUNCTION__;
}
/**
* Implements hook_ENTITY_TYPE_create() for 'config_test'.
*/
function config_test_config_test_create(ConfigTest $config_test) {
if (\Drupal::state()->get('config_test.prepopulate')) {
$config_test->set('foo', 'baz');
}
}
/**
* Implements hook_entity_type_alter().
*/