Update to Drupal 8.0.5. For more information, see https://www.drupal.org/node/2679347
This commit is contained in:
parent
2a9f1f148d
commit
fd3b12cf27
251 changed files with 5439 additions and 957 deletions
|
@ -5,6 +5,7 @@
|
|||
* Post update functions for Field module.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Entity\Entity\EntityFormDisplay;
|
||||
use Drupal\field\Entity\FieldStorageConfig;
|
||||
use Drupal\field\Entity\FieldConfig;
|
||||
|
||||
|
@ -44,3 +45,34 @@ function field_post_update_entity_reference_handler_setting() {
|
|||
/**
|
||||
* @} End of "addtogroup updates-8.0.0-beta".
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup updates-8.1.0
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Adds the 'size' setting for email widgets.
|
||||
*/
|
||||
function field_post_update_email_widget_size_setting() {
|
||||
foreach (EntityFormDisplay::loadMultiple() as $entity_form_display) {
|
||||
$changed = FALSE;
|
||||
foreach ($entity_form_display->getComponents() as $name => $options) {
|
||||
if (isset($options['type']) && $options['type'] === 'email_default') {
|
||||
$options['settings']['size'] = '60';
|
||||
$entity_form_display->setComponent($name, $options);
|
||||
$changed = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ($changed) {
|
||||
$entity_form_display->save();
|
||||
}
|
||||
}
|
||||
|
||||
return t('The new size setting for email widgets has been added.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "addtogroup updates-8.1.0".
|
||||
*/
|
||||
|
|
Reference in a new issue