updated core from 8.4 to 8.5 : bug with login_destination

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-13 14:01:21 +01:00
parent 0d78da249b
commit e668535a4e
3486 changed files with 89604 additions and 33283 deletions
@@ -11,7 +11,7 @@
float: right;
}
.ajax-progress-throbber .throbber {
background: transparent url(../../../../misc/throbber-active.gif) no-repeat 0px center;
background: transparent url(../../../../misc/throbber-active.gif) no-repeat 0 center;
display: inline;
padding: 1px 5px 2px;
}
@@ -27,7 +27,7 @@
.progress__percentage {
color: #555;
overflow: hidden;
font-size: .875em;
font-size: 0.875em;
margin-top: 0.2em;
}
.progress__description {
@@ -5,11 +5,11 @@
.system-status-report-counters__item {
width: 100%;
padding: .5em 0;
padding: 0.5em 0;
text-align: center;
white-space: nowrap;
background-color: rgba(0, 0, 0, 0.063);
margin-bottom: .5em;
margin-bottom: 0.5em;
}
@media screen and (min-width: 60em) {
+3 -3
View File
@@ -117,8 +117,8 @@ small .admin-link:after {
text-transform: none;
}
.system-modules td details a {
color: #5C5C5B;
border: 0px;
color: #5c5c5b;
border: 0;
}
.system-modules td details {
border: 0;
@@ -234,7 +234,7 @@ small .admin-link:after {
background-image: url(../../../misc/icons/e29700/warning.svg);
}
.system-status-report__entry__value {
padding: 1em .5em;
padding: 1em 0.5em;
}
/**
+1 -1
View File
@@ -34,7 +34,7 @@
*/
function dateFormatHandler(e) {
const baseValue = $(e.target).val() || '';
const dateString = baseValue.replace(/\\?(.?)/gi, (key, value) => dateFormats[key] ? dateFormats[key] : value);
const dateString = baseValue.replace(/\\?(.?)/gi, (key, value) => (dateFormats[key] ? dateFormats[key] : value));
$preview.html(dateString);
$target.toggleClass('js-hide', !dateString.length);
+4 -5
View File
@@ -23,11 +23,10 @@
attach(context) {
// List of fields IDs on which to bind the event listener.
// Create an array of IDs to use with jQuery.
for (const sourceId in drupalSettings.copyFieldValue) {
if (drupalSettings.copyFieldValue.hasOwnProperty(sourceId)) {
ids.push(sourceId);
}
}
Object.keys(drupalSettings.copyFieldValue || {}).forEach((element) => {
ids.push(element);
});
if (ids.length) {
// Listen to value:copy events on all dependent fields.
// We have to use body and not document because of the way jQuery events
+4 -5
View File
@@ -10,11 +10,10 @@
Drupal.behaviors.copyFieldValue = {
attach: function attach(context) {
for (var sourceId in drupalSettings.copyFieldValue) {
if (drupalSettings.copyFieldValue.hasOwnProperty(sourceId)) {
ids.push(sourceId);
}
}
Object.keys(drupalSettings.copyFieldValue || {}).forEach(function (element) {
ids.push(element);
});
if (ids.length) {
$('body').once('copy-field-values').on('value:copy', this.valueTargetCopyHandler);
@@ -2,6 +2,7 @@ id: d6_date_formats
label: Date format configuration
migration_tags:
- Drupal 6
- Configuration
source:
plugin: variable_multirow
variables:
@@ -3,6 +3,7 @@ id: d6_menu
label: Menus
migration_tags:
- Drupal 6
- Configuration
source:
plugin: menu
process:
@@ -2,6 +2,7 @@ id: d6_system_cron
label: Cron settings
migration_tags:
- Drupal 6
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d6_system_date
label: System date configuration
migration_tags:
- Drupal 6
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d6_system_file
label: File system configuration
migration_tags:
- Drupal 6
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d6_system_performance
label: Performance configuration
migration_tags:
- Drupal 6
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d7_global_theme_settings
label: D7 global theme settings
migration_tags:
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d7_menu
label: Menus
migration_tags:
- Drupal 7
- Configuration
source:
plugin: menu
process:
@@ -2,6 +2,7 @@ id: d7_system_authorize
label: Drupal 7 file transfer authorize configuration
migration_tags:
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d7_system_cron
label: Drupal 7 cron settings
migration_tags:
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d7_system_date
label: Drupal 7 system date configuration
migration_tags:
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d7_system_file
label: Drupal 7 file system configuration
migration_tags:
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d7_system_mail
label: Drupal 7 system mail configuration
migration_tags:
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d7_system_performance
label: Drupal 7 performance configuration
migration_tags:
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -2,6 +2,7 @@ id: d7_theme_settings
label: D7 theme settings
migration_tags:
- Drupal 7
- Configuration
source:
plugin: d7_theme_settings
constants:
@@ -3,6 +3,7 @@ label: Image toolkit configuration
migration_tags:
- Drupal 6
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -3,6 +3,7 @@ label: Image quality configuration
migration_tags:
- Drupal 6
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -3,6 +3,7 @@ label: System logging
migration_tags:
- Drupal 6
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -3,6 +3,7 @@ label: Maintenance page configuration
migration_tags:
- Drupal 6
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -3,6 +3,7 @@ label: RSS configuration
migration_tags:
- Drupal 6
- Drupal 7
- Configuration
source:
plugin: variable
variables:
@@ -3,6 +3,7 @@ label: Site configuration
migration_tags:
- Drupal 6
- Drupal 7
- Configuration
source:
plugin: variable
constants:
@@ -4,10 +4,11 @@ namespace Drupal\system\EventSubscriber;
use Drupal\Core\Routing\RouteSubscriberBase;
use Drupal\Core\Routing\RoutingEvents;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
/**
* Adds the _admin_route option to each admin route.
* Adds the _admin_route option to each admin HTML route.
*/
class AdminRouteSubscriber extends RouteSubscriberBase {
@@ -16,7 +17,7 @@ class AdminRouteSubscriber extends RouteSubscriberBase {
*/
protected function alterRoutes(RouteCollection $collection) {
foreach ($collection->all() as $route) {
if (strpos($route->getPath(), '/admin') === 0 && !$route->hasOption('_admin_route')) {
if (strpos($route->getPath(), '/admin') === 0 && !$route->hasOption('_admin_route') && static::isHtmlRoute($route)) {
$route->setOption('_admin_route', TRUE);
}
}
@@ -36,4 +37,19 @@ class AdminRouteSubscriber extends RouteSubscriberBase {
return $events;
}
/**
* Determines whether the given route is a HTML route.
*
* @param \Symfony\Component\Routing\Route $route
* The route to analyze.
*
* @return bool
* TRUE if HTML is a valid format for this route.
*/
protected static function isHtmlRoute(Route $route) {
// If a route has no explicit format, then HTML is valid.
$format = $route->hasRequirement('_format') ? explode('|', $route->getRequirement('_format')) : ['html'];
return in_array('html', $format, TRUE);
}
}
@@ -14,6 +14,8 @@ use Drupal\Core\Form\ConfigFormBaseTrait;
/**
* Configure cron settings for this site.
*
* @internal
*/
class CronForm extends FormBase {
@@ -6,6 +6,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Provides a form for adding a date format.
*
* @internal
*/
class DateFormatAddForm extends DateFormatFormBase {
@@ -8,6 +8,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Builds a form to delete a date format.
*
* @internal
*/
class DateFormatDeleteForm extends EntityDeleteForm {
@@ -6,6 +6,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Provides a form for editing a date format.
*
* @internal
*/
class DateFormatEditForm extends DateFormatFormBase {
@@ -14,6 +14,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Configure file system settings for this site.
*
* @internal
*/
class FileSystemForm extends ConfigFormBase {
@@ -10,6 +10,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Configures image toolkit settings for this site.
*
* @internal
*/
class ImageToolkitForm extends ConfigFormBase {
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Configure logging settings for this site.
*
* @internal
*/
class LoggingForm extends ConfigFormBase {
@@ -14,6 +14,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Builds a confirmation form for enabling modules with dependencies.
*
* @internal
*/
class ModulesListConfirmForm extends ConfirmFormBase {
@@ -4,6 +4,8 @@ namespace Drupal\system\Form;
/**
* Builds a confirmation form for enabling experimental modules.
*
* @internal
*/
class ModulesListExperimentalConfirmForm extends ModulesListConfirmForm {
@@ -25,6 +25,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* each module's name, description, and information about which modules it
* requires. See \Drupal\Core\Extension\InfoParser for info on module.info.yml
* descriptors.
*
* @internal
*/
class ModulesListForm extends FormBase {
@@ -176,6 +178,7 @@ class ModulesListForm extends FormBase {
// Lastly, sort all packages by title.
uasort($form['modules'], ['\Drupal\Component\Utility\SortArray', 'sortByTitleProperty']);
$form['#attached']['library'][] = 'core/drupal.tableresponsive';
$form['#attached']['library'][] = 'system/drupal.system.modules';
$form['actions'] = ['#type' => 'actions'];
$form['actions']['submit'] = [
@@ -386,7 +389,7 @@ class ModulesListForm extends FormBase {
}
// Add all dependencies to a list.
while (list($module) = each($modules['install'])) {
foreach ($modules['install'] as $module => $value) {
foreach (array_keys($data[$module]->requires) as $dependency) {
if (!isset($modules['install'][$dependency]) && !$this->moduleHandler->moduleExists($dependency)) {
$modules['dependencies'][$module][$dependency] = $data[$dependency]->info['name'];
@@ -14,6 +14,8 @@ use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
/**
* Builds a confirmation form to uninstall selected modules.
*
* @internal
*/
class ModulesUninstallConfirmForm extends ConfirmFormBase {
use ConfigDependencyDeleteFormTrait;
@@ -11,6 +11,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides a form for uninstalling modules.
*
* @internal
*/
class ModulesUninstallForm extends FormBase {
@@ -11,6 +11,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Configure performance settings for this site.
*
* @internal
*/
class PerformanceForm extends ConfigFormBase {
@@ -12,6 +12,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Provides a form removing module content entities data before uninstallation.
*
* @internal
*/
class PrepareModulesEntityUninstallForm extends ConfirmFormBase {
@@ -225,7 +227,7 @@ class PrepareModulesEntityUninstallForm extends ConfirmFormBase {
$storage->delete($entities);
}
// Sometimes deletes cause secondary deletes. For example, deleting a
// taxonomy term can cause it's children to be be deleted too.
// taxonomy term can cause its children to be be deleted too.
$context['sandbox']['progress'] = $context['sandbox']['max'] - $storage->getQuery()->count()->execute();
// Inform the batch engine that we are not finished and provide an
@@ -10,6 +10,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Configure regional settings for this site.
*
* @internal
*/
class RegionalForm extends ConfigFormBase {
@@ -6,7 +6,9 @@ use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Configure RSS settings for this site.
* Configure RSS settings for this site
*
* @internal
*/
class RssFeedsForm extends ConfigFormBase {
@@ -12,6 +12,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Configure site information settings for this site.
*
* @internal
*/
class SiteInformationForm extends ConfigFormBase {
@@ -172,7 +174,7 @@ class SiteInformationForm extends ConfigFormBase {
}
if (!$this->pathValidator->isValid($form_state->getValue('site_frontpage'))) {
$form_state->setErrorByName('site_frontpage', $this->t("The path '%path' is either invalid or you do not have access to it.", ['%path' => $form_state->getValue('site_frontpage')]));
$form_state->setErrorByName('site_frontpage', $this->t("Either the path '%path' is invalid or you do not have access to it.", ['%path' => $form_state->getValue('site_frontpage')]));
}
// Get the normal paths of both error pages.
if (!$form_state->isValueEmpty('site_403')) {
@@ -189,11 +191,11 @@ class SiteInformationForm extends ConfigFormBase {
}
// Validate 403 error path.
if (!$form_state->isValueEmpty('site_403') && !$this->pathValidator->isValid($form_state->getValue('site_403'))) {
$form_state->setErrorByName('site_403', $this->t("The path '%path' is either invalid or you do not have access to it.", ['%path' => $form_state->getValue('site_403')]));
$form_state->setErrorByName('site_403', $this->t("Either the path '%path' is invalid or you do not have access to it.", ['%path' => $form_state->getValue('site_403')]));
}
// Validate 404 error path.
if (!$form_state->isValueEmpty('site_404') && !$this->pathValidator->isValid($form_state->getValue('site_404'))) {
$form_state->setErrorByName('site_404', $this->t("The path '%path' is either invalid or you do not have access to it.", ['%path' => $form_state->getValue('site_404')]));
$form_state->setErrorByName('site_404', $this->t("Either the path '%path' is invalid or you do not have access to it.", ['%path' => $form_state->getValue('site_404')]));
}
parent::validateForm($form, $form_state);
@@ -11,6 +11,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Configure maintenance settings for this site.
*
* @internal
*/
class SiteMaintenanceModeForm extends ConfigFormBase {
@@ -0,0 +1,124 @@
<?php
namespace Drupal\system\Form;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\PluginFormBase;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* The settings_tray form handler for the SystemBrandingBlock.
*
* @internal
*/
class SystemBrandingOffCanvasForm extends PluginFormBase implements ContainerInjectionInterface {
/**
* The block plugin.
*
* @var \Drupal\Core\Block\BlockPluginInterface
*/
protected $plugin;
/**
* The config factory.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $configFactory;
/**
* The current user.
*
* @var \Drupal\Core\Session\AccountInterface
*/
protected $currentUser;
/**
* SystemBrandingOffCanvasForm constructor.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory.
* @param \Drupal\Core\Session\AccountInterface $current_user
* The current user.
*/
public function __construct(ConfigFactoryInterface $config_factory, AccountInterface $current_user) {
$this->configFactory = $config_factory;
$this->currentUser = $current_user;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('current_user')
);
}
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = $this->plugin->buildConfigurationForm($form, $form_state);
$form['block_branding']['#type'] = 'details';
$form['block_branding']['#weight'] = 10;
// Unset links to Site Information form, we can make these changes here.
unset($form['block_branding']['use_site_name']['#description'], $form['block_branding']['use_site_slogan']['#description']);
$site_config = $this->configFactory->getEditable('system.site');
// Load the immutable config to load the overrides.
$site_config_immutable = $this->configFactory->get('system.site');
$form['site_information'] = [
'#type' => 'details',
'#title' => t('Site details'),
'#open' => TRUE,
'#access' => $this->currentUser->hasPermission('administer site configuration') && !$site_config_immutable->hasOverrides('name') && !$site_config_immutable->hasOverrides('slogan'),
];
$form['site_information']['site_name'] = [
'#type' => 'textfield',
'#title' => t('Site name'),
'#default_value' => $site_config->get('name'),
'#required' => TRUE,
];
$form['site_information']['site_slogan'] = [
'#type' => 'textfield',
'#title' => t('Slogan'),
'#default_value' => $site_config->get('slogan'),
'#description' => t("How this is used depends on your site's theme."),
];
return $form;
}
/**
* {@inheritdoc}
*/
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
$this->plugin->validateConfigurationForm($form, $form_state);
}
/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
$site_config = $this->configFactory->get('system.site');
if (AccessResult::allowedIf(!$site_config->hasOverrides('name') && !$site_config->hasOverrides('slogan'))->isAllowed()) {
$site_info = $form_state->getValue('site_information');
$this->configFactory->getEditable('system.site')
->set('name', $site_info['site_name'])
->set('slogan', $site_info['site_slogan'])
->save();
}
$this->plugin->submitConfigurationForm($form, $form_state);
}
}
@@ -0,0 +1,181 @@
<?php
namespace Drupal\system\Form;
use Drupal\Component\Plugin\PluginInspectionInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\PluginFormBase;
use Drupal\Core\Render\Element;
use Drupal\Core\Routing\RedirectDestinationTrait;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
use Drupal\system\MenuInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* The setting_tray form handler for the SystemMenuBlock.
*
* @internal
*/
class SystemMenuOffCanvasForm extends PluginFormBase implements ContainerInjectionInterface {
use StringTranslationTrait;
use RedirectDestinationTrait;
/**
* The plugin.
*
* @var \Drupal\Core\Block\BlockPluginInterface
*/
protected $plugin;
/**
* The menu entity that the block uses and that will be edited in this form.
*
* @var \Drupal\system\MenuInterface
*/
protected $menu;
/**
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $menuStorage;
/**
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* The config factory.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $configFactory;
/**
* SystemMenuOffCanvasForm constructor.
*
* @param \Drupal\Core\Entity\EntityStorageInterface $menu_storage
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory.
*/
public function __construct(EntityStorageInterface $menu_storage, EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation, ConfigFactoryInterface $config_factory) {
$this->menuStorage = $menu_storage;
$this->entityTypeManager = $entity_type_manager;
$this->stringTranslation = $string_translation;
$this->configFactory = $config_factory;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity_type.manager')->getStorage('menu'),
$container->get('entity_type.manager'),
$container->get('string_translation'),
$container->get('config.factory')
);
}
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = $this->plugin->buildConfigurationForm([], $form_state);
// Move the menu levels section to the bottom.
$form['menu_levels']['#weight'] = 100;
$form['entity_form'] = [
'#type' => 'details',
'#title' => $this->t('Edit menu %label', ['%label' => $this->menu->label()]),
'#open' => TRUE,
'#access' => !$this->hasMenuOverrides() && $this->menu->access('edit'),
];
$form['entity_form'] += $this->getEntityForm($this->menu)->buildForm([], $form_state);
// Print the menu link titles as text instead of a link.
if (!empty($form['entity_form']['links']['links'])) {
foreach (Element::children($form['entity_form']['links']['links']) as $child) {
$title = $form['entity_form']['links']['links'][$child]['title'][1]['#title'];
$form['entity_form']['links']['links'][$child]['title'][1] = ['#markup' => $title];
}
}
// Change the header text.
$form['entity_form']['links']['links']['#header'][0] = $this->t('Link');
$form['entity_form']['links']['links']['#header'][1]['data'] = $this->t('On');
// Remove the label, ID, description, and buttons from the entity form.
unset($form['entity_form']['label'], $form['entity_form']['id'], $form['entity_form']['description'], $form['entity_form']['actions']);
// Since the overview form is further nested than expected, update the
// #parents. See \Drupal\menu_ui\MenuForm::form().
$form_state->set('menu_overview_form_parents', ['settings', 'entity_form', 'links']);
return $form;
}
/**
* {@inheritdoc}
*/
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
$this->plugin->validateConfigurationForm($form, $form_state);
if (!$this->hasMenuOverrides()) {
$this->getEntityForm($this->menu)->validateForm($form, $form_state);
}
}
/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
$this->plugin->submitConfigurationForm($form, $form_state);
if (!$this->hasMenuOverrides()) {
$this->getEntityForm($this->menu)->submitForm($form, $form_state);
$this->menu->save();
}
}
/**
* Gets the entity form for this menu.
*
* @param \Drupal\system\MenuInterface $menu
* The menu entity.
*
* @return \Drupal\Core\Entity\EntityFormInterface
* The entity form.
*/
protected function getEntityForm(MenuInterface $menu) {
$entity_form = $this->entityTypeManager->getFormObject('menu', 'edit');
$entity_form->setEntity($menu);
return $entity_form;
}
/**
* {@inheritdoc}
*/
public function setPlugin(PluginInspectionInterface $plugin) {
$this->plugin = $plugin;
$this->menu = $this->menuStorage->loadOverrideFree($this->plugin->getDerivativeId());
}
/**
* Determines if the menu has configuration overrides.
*
* @return bool
* TRUE if the menu has configuration overrides, otherwise FALSE.
*/
protected function hasMenuOverrides() {
// @todo Replace the following with $this->menu->hasOverrides() in https://www.drupal.org/project/drupal/issues/2910353
// and remove this function.
return $this->configFactory->get($this->menu->getEntityType()
->getConfigPrefix() . '.' . $this->menu->id())->hasOverrides();
}
}
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Form to select the administration theme.
*
* @internal
*/
class ThemeAdminForm extends ConfigFormBase {
@@ -16,6 +16,8 @@ use Drupal\Core\Theme\ThemeManagerInterface;
/**
* Displays theme configuration for entire site and individual themes.
*
* @internal
*/
class ThemeSettingsForm extends ConfigFormBase {
@@ -212,7 +214,10 @@ class ThemeSettingsForm extends ConfigFormBase {
'#type' => 'file',
'#title' => t('Upload logo image'),
'#maxlength' => 40,
'#description' => t("If you don't have direct file access to the server, use this field to upload your logo.")
'#description' => t("If you don't have direct file access to the server, use this field to upload your logo."),
'#upload_validators' => [
'file_validate_is_image' => [],
],
];
}
@@ -252,7 +257,12 @@ class ThemeSettingsForm extends ConfigFormBase {
$form['favicon']['settings']['favicon_upload'] = [
'#type' => 'file',
'#title' => t('Upload favicon image'),
'#description' => t("If you don't have direct file access to the server, use this field to upload your shortcut icon.")
'#description' => t("If you don't have direct file access to the server, use this field to upload your shortcut icon."),
'#upload_validators' => [
'file_validate_extensions' => [
'ico png gif jpg jpeg apng svg',
],
],
];
}
@@ -367,37 +377,22 @@ class ThemeSettingsForm extends ConfigFormBase {
parent::validateForm($form, $form_state);
if ($this->moduleHandler->moduleExists('file')) {
// Handle file uploads.
$validators = ['file_validate_is_image' => []];
// Check for a new uploaded logo.
$file = file_save_upload('logo_upload', $validators, FALSE, 0);
if (isset($file)) {
// File upload was attempted.
if ($file) {
// Put the temporary file in form_values so we can save it on submit.
$form_state->setValue('logo_upload', $file);
}
else {
// File upload failed.
$form_state->setErrorByName('logo_upload', $this->t('The logo could not be uploaded.'));
}
$file = _file_save_upload_from_form($form['logo']['settings']['logo_upload'], $form_state, 0);
if ($file) {
// Put the temporary file in form_values so we can save it on submit.
$form_state->setValue('logo_upload', $file);
}
$validators = ['file_validate_extensions' => ['ico png gif jpg jpeg apng svg']];
// Check for a new uploaded favicon.
$file = file_save_upload('favicon_upload', $validators, FALSE, 0);
if (isset($file)) {
// File upload was attempted.
if ($file) {
// Put the temporary file in form_values so we can save it on submit.
$form_state->setValue('favicon_upload', $file);
}
else {
// File upload failed.
$form_state->setErrorByName('favicon_upload', $this->t('The favicon could not be uploaded.'));
}
$file = _file_save_upload_from_form($form['favicon']['settings']['favicon_upload'], $form_state, 0);
if ($file) {
// Put the temporary file in form_values so we can save it on submit.
$form_state->setValue('favicon_upload', $file);
}
// When intending to use the default logo, unset the logo_path.
@@ -492,7 +487,7 @@ class ThemeSettingsForm extends ConfigFormBase {
*/
protected function validatePath($path) {
// Absolute local file paths are invalid.
if (drupal_realpath($path) == $path) {
if (\Drupal::service('file_system')->realpath($path) == $path) {
return FALSE;
}
// A path relative to the Drupal root or a fully qualified URI is valid.
@@ -15,7 +15,10 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @Block(
* id = "system_branding_block",
* admin_label = @Translation("Site branding")
* admin_label = @Translation("Site branding"),
* forms = {
* "settings_tray" = "Drupal\system\Form\SystemBrandingOffCanvasForm",
* },
* )
*/
class SystemBrandingBlock extends BlockBase implements ContainerFactoryPluginInterface {
@@ -10,7 +10,10 @@ use Drupal\Core\Block\MainContentBlockPluginInterface;
*
* @Block(
* id = "system_main_block",
* admin_label = @Translation("Main page content")
* admin_label = @Translation("Main page content"),
* forms = {
* "settings_tray" = FALSE,
* },
* )
*/
class SystemMainBlock extends BlockBase implements MainContentBlockPluginInterface {
@@ -5,7 +5,6 @@ namespace Drupal\system\Plugin\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Menu\MenuActiveTrailInterface;
use Drupal\Core\Menu\MenuLinkTreeInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -17,7 +16,10 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* id = "system_menu_block",
* admin_label = @Translation("Menu"),
* category = @Translation("Menus"),
* deriver = "Drupal\system\Plugin\Derivative\SystemMenuBlock"
* deriver = "Drupal\system\Plugin\Derivative\SystemMenuBlock",
* forms = {
* "settings_tray" = "\Drupal\system\Form\SystemMenuOffCanvasForm",
* },
* )
*/
class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterface {
@@ -29,13 +31,6 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa
*/
protected $menuTree;
/**
* The active menu trail service.
*
* @var \Drupal\Core\Menu\MenuActiveTrailInterface
*/
protected $menuActiveTrail;
/**
* Constructs a new SystemMenuBlock.
*
@@ -47,13 +42,10 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa
* The plugin implementation definition.
* @param \Drupal\Core\Menu\MenuLinkTreeInterface $menu_tree
* The menu tree service.
* @param \Drupal\Core\Menu\MenuActiveTrailInterface $menu_active_trail
* The active menu trail service.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail) {
public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuLinkTreeInterface $menu_tree) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->menuTree = $menu_tree;
$this->menuActiveTrail = $menu_active_trail;
}
/**
@@ -64,8 +56,7 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa
$configuration,
$plugin_id,
$plugin_definition,
$container->get('menu.link_tree'),
$container->get('menu.active_trail')
$container->get('menu.link_tree')
);
}
@@ -224,7 +224,7 @@ class GDToolkit extends ImageToolkitBase {
$destination = drupal_tempnam('temporary://', 'gd_');
}
// Convert stream wrapper URI to normal path.
$destination = drupal_realpath($destination);
$destination = \Drupal::service('file_system')->realpath($destination);
}
$function = 'image' . image_type_to_extension($this->getType(), FALSE);
@@ -2,506 +2,20 @@
namespace Drupal\system\Plugin\views\field;
use Drupal\Core\Cache\CacheableDependencyInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\RevisionableInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Routing\RedirectDestinationTrait;
use Drupal\Core\TypedData\TranslatableInterface;
use Drupal\views\Entity\Render\EntityTranslationRenderTrait;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\Plugin\views\field\UncacheableFieldHandlerTrait;
use Drupal\views\Plugin\views\style\Table;
use Drupal\views\ResultRow;
use Drupal\views\ViewExecutable;
use Symfony\Component\DependencyInjection\ContainerInterface;
@trigger_error(__NAMESPACE__ . '\BulkForm is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\views\Plugin\views\field\BulkForm instead. See https://www.drupal.org/node/2916716.', E_USER_DEPRECATED);
use Drupal\views\Plugin\views\field\BulkForm as ViewsBulkForm;
/**
* Defines a actions-based bulk operation form element.
*
* @ViewsField("bulk_form")
* @ViewsField("legacy_bulk_form")
*
* @deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use
* \Drupal\views\Plugin\views\field\BulkForm instead.
*
* @see https://www.drupal.org/node/2916716
*/
class BulkForm extends FieldPluginBase implements CacheableDependencyInterface {
use RedirectDestinationTrait;
use UncacheableFieldHandlerTrait;
use EntityTranslationRenderTrait;
/**
* The entity manager.
*
* @var \Drupal\Core\Entity\EntityManagerInterface
*/
protected $entityManager;
/**
* The action storage.
*
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $actionStorage;
/**
* An array of actions that can be executed.
*
* @var \Drupal\system\ActionConfigEntityInterface[]
*/
protected $actions = [];
/**
* The language manager.
*
* @var \Drupal\Core\Language\LanguageManagerInterface
*/
protected $languageManager;
/**
* Constructs a new BulkForm object.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin ID for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityManager = $entity_manager;
$this->actionStorage = $entity_manager->getStorage('action');
$this->languageManager = $language_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(
$configuration,
$plugin_id,
$plugin_definition,
$container->get('entity.manager'),
$container->get('language_manager')
);
}
/**
* {@inheritdoc}
*/
public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
parent::init($view, $display, $options);
$entity_type = $this->getEntityType();
// Filter the actions to only include those for this entity type.
$this->actions = array_filter($this->actionStorage->loadMultiple(), function ($action) use ($entity_type) {
return $action->getType() == $entity_type;
});
}
/**
* {@inheritdoc}
*/
public function getCacheMaxAge() {
// @todo Consider making the bulk operation form cacheable. See
// https://www.drupal.org/node/2503009.
return 0;
}
/**
* {@inheritdoc}
*/
public function getCacheContexts() {
return $this->languageManager->isMultilingual() ? $this->getEntityTranslationRenderer()->getCacheContexts() : [];
}
/**
* {@inheritdoc}
*/
public function getCacheTags() {
return [];
}
/**
* {@inheritdoc}
*/
public function getEntityTypeId() {
return $this->getEntityType();
}
/**
* {@inheritdoc}
*/
protected function getEntityManager() {
return $this->entityManager;
}
/**
* {@inheritdoc}
*/
protected function getLanguageManager() {
return $this->languageManager;
}
/**
* {@inheritdoc}
*/
protected function getView() {
return $this->view;
}
/**
* {@inheritdoc}
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['action_title'] = ['default' => $this->t('Action')];
$options['include_exclude'] = [
'default' => 'exclude',
];
$options['selected_actions'] = [
'default' => [],
];
return $options;
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['action_title'] = [
'#type' => 'textfield',
'#title' => $this->t('Action title'),
'#default_value' => $this->options['action_title'],
'#description' => $this->t('The title shown above the actions dropdown.'),
];
$form['include_exclude'] = [
'#type' => 'radios',
'#title' => $this->t('Available actions'),
'#options' => [
'exclude' => $this->t('All actions, except selected'),
'include' => $this->t('Only selected actions'),
],
'#default_value' => $this->options['include_exclude'],
];
$form['selected_actions'] = [
'#type' => 'checkboxes',
'#title' => $this->t('Selected actions'),
'#options' => $this->getBulkOptions(FALSE),
'#default_value' => $this->options['selected_actions'],
];
parent::buildOptionsForm($form, $form_state);
}
/**
* {@inheritdoc}
*/
public function validateOptionsForm(&$form, FormStateInterface $form_state) {
parent::validateOptionsForm($form, $form_state);
$selected_actions = $form_state->getValue(['options', 'selected_actions']);
$form_state->setValue(['options', 'selected_actions'], array_values(array_filter($selected_actions)));
}
/**
* {@inheritdoc}
*/
public function preRender(&$values) {
parent::preRender($values);
// If the view is using a table style, provide a placeholder for a
// "select all" checkbox.
if (!empty($this->view->style_plugin) && $this->view->style_plugin instanceof Table) {
// Add the tableselect css classes.
$this->options['element_label_class'] .= 'select-all';
// Hide the actual label of the field on the table header.
$this->options['label'] = '';
}
}
/**
* {@inheritdoc}
*/
public function getValue(ResultRow $row, $field = NULL) {
return '<!--form-item-' . $this->options['id'] . '--' . $row->index . '-->';
}
/**
* Form constructor for the bulk form.
*
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*/
public function viewsForm(&$form, FormStateInterface $form_state) {
// Make sure we do not accidentally cache this form.
// @todo Evaluate this again in https://www.drupal.org/node/2503009.
$form['#cache']['max-age'] = 0;
// Add the tableselect javascript.
$form['#attached']['library'][] = 'core/drupal.tableselect';
$use_revision = array_key_exists('revision', $this->view->getQuery()->getEntityTableInfo());
// Only add the bulk form options and buttons if there are results.
if (!empty($this->view->result)) {
// Render checkboxes for all rows.
$form[$this->options['id']]['#tree'] = TRUE;
foreach ($this->view->result as $row_index => $row) {
$entity = $this->getEntityTranslation($this->getEntity($row), $row);
$form[$this->options['id']][$row_index] = [
'#type' => 'checkbox',
// We are not able to determine a main "title" for each row, so we can
// only output a generic label.
'#title' => $this->t('Update this item'),
'#title_display' => 'invisible',
'#default_value' => !empty($form_state->getValue($this->options['id'])[$row_index]) ? 1 : NULL,
'#return_value' => $this->calculateEntityBulkFormKey($entity, $use_revision),
];
}
// Replace the form submit button label.
$form['actions']['submit']['#value'] = $this->t('Apply to selected items');
// Ensure a consistent container for filters/operations in the view header.
$form['header'] = [
'#type' => 'container',
'#weight' => -100,
];
// Build the bulk operations action widget for the header.
// Allow themes to apply .container-inline on this separate container.
$form['header'][$this->options['id']] = [
'#type' => 'container',
];
$form['header'][$this->options['id']]['action'] = [
'#type' => 'select',
'#title' => $this->options['action_title'],
'#options' => $this->getBulkOptions(),
];
// Duplicate the form actions into the action container in the header.
$form['header'][$this->options['id']]['actions'] = $form['actions'];
}
else {
// Remove the default actions build array.
unset($form['actions']);
}
}
/**
* Returns the available operations for this form.
*
* @param bool $filtered
* (optional) Whether to filter actions to selected actions.
* @return array
* An associative array of operations, suitable for a select element.
*/
protected function getBulkOptions($filtered = TRUE) {
$options = [];
// Filter the action list.
foreach ($this->actions as $id => $action) {
if ($filtered) {
$in_selected = in_array($id, $this->options['selected_actions']);
// If the field is configured to include only the selected actions,
// skip actions that were not selected.
if (($this->options['include_exclude'] == 'include') && !$in_selected) {
continue;
}
// Otherwise, if the field is configured to exclude the selected
// actions, skip actions that were selected.
elseif (($this->options['include_exclude'] == 'exclude') && $in_selected) {
continue;
}
}
$options[$id] = $action->label();
}
return $options;
}
/**
* Submit handler for the bulk form.
*
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
* Thrown when the user tried to access an action without access to it.
*/
public function viewsFormSubmit(&$form, FormStateInterface $form_state) {
if ($form_state->get('step') == 'views_form_views_form') {
// Filter only selected checkboxes. Use the actual user input rather than
// the raw form values array, since the site data may change before the
// bulk form is submitted, which can lead to data loss.
$user_input = $form_state->getUserInput();
$selected = array_filter($user_input[$this->options['id']]);
$entities = [];
$action = $this->actions[$form_state->getValue('action')];
$count = 0;
foreach ($selected as $bulk_form_key) {
$entity = $this->loadEntityFromBulkFormKey($bulk_form_key);
// Skip execution if the user did not have access.
if (!$action->getPlugin()->access($entity, $this->view->getUser())) {
$this->drupalSetMessage($this->t('No access to execute %action on the @entity_type_label %entity_label.', [
'%action' => $action->label(),
'@entity_type_label' => $entity->getEntityType()->getLabel(),
'%entity_label' => $entity->label()
]), 'error');
continue;
}
$count++;
$entities[$bulk_form_key] = $entity;
}
$action->execute($entities);
$operation_definition = $action->getPluginDefinition();
if (!empty($operation_definition['confirm_form_route_name'])) {
$options = [
'query' => $this->getDestinationArray(),
];
$form_state->setRedirect($operation_definition['confirm_form_route_name'], [], $options);
}
else {
// Don't display the message unless there are some elements affected and
// there is no confirmation form.
if ($count) {
drupal_set_message($this->formatPlural($count, '%action was applied to @count item.', '%action was applied to @count items.', [
'%action' => $action->label(),
]));
}
}
}
}
/**
* Returns the message to be displayed when there are no selected items.
*
* @return string
* Message displayed when no items are selected.
*/
protected function emptySelectedMessage() {
return $this->t('No items selected.');
}
/**
* {@inheritdoc}
*/
public function viewsFormValidate(&$form, FormStateInterface $form_state) {
$selected = array_filter($form_state->getValue($this->options['id']));
if (empty($selected)) {
$form_state->setErrorByName('', $this->emptySelectedMessage());
}
}
/**
* {@inheritdoc}
*/
public function query() {
if ($this->languageManager->isMultilingual()) {
$this->getEntityTranslationRenderer()->query($this->query, $this->relationship);
}
}
/**
* {@inheritdoc}
*/
public function clickSortable() {
return FALSE;
}
/**
* Wraps drupal_set_message().
*/
protected function drupalSetMessage($message = NULL, $type = 'status', $repeat = FALSE) {
drupal_set_message($message, $type, $repeat);
}
/**
* Calculates a bulk form key.
*
* This generates a key that is used as the checkbox return value when
* submitting a bulk form. This key allows the entity for the row to be loaded
* totally independently of the executed view row.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to calculate a bulk form key for.
* @param bool $use_revision
* Whether the revision id should be added to the bulk form key. This should
* be set to TRUE only if the view is listing entity revisions.
*
* @return string
* The bulk form key representing the entity's id, language and revision (if
* applicable) as one string.
*
* @see self::loadEntityFromBulkFormKey()
*/
protected function calculateEntityBulkFormKey(EntityInterface $entity, $use_revision) {
$key_parts = [$entity->language()->getId(), $entity->id()];
if ($entity instanceof RevisionableInterface && $use_revision) {
$key_parts[] = $entity->getRevisionId();
}
// An entity ID could be an arbitrary string (although they are typically
// numeric). JSON then Base64 encoding ensures the bulk_form_key is
// safe to use in HTML, and that the key parts can be retrieved.
$key = json_encode($key_parts);
return base64_encode($key);
}
/**
* Loads an entity based on a bulk form key.
*
* @param string $bulk_form_key
* The bulk form key representing the entity's id, language and revision (if
* applicable) as one string.
*
* @return \Drupal\Core\Entity\EntityInterface
* The entity loaded in the state (language, optionally revision) specified
* as part of the bulk form key.
*/
protected function loadEntityFromBulkFormKey($bulk_form_key) {
$key = base64_decode($bulk_form_key);
$key_parts = json_decode($key);
$revision_id = NULL;
// If there are 3 items, vid will be last.
if (count($key_parts) === 3) {
$revision_id = array_pop($key_parts);
}
// The first two items will always be langcode and ID.
$id = array_pop($key_parts);
$langcode = array_pop($key_parts);
// Load the entity or a specific revision depending on the given key.
$storage = $this->entityManager->getStorage($this->getEntityType());
$entity = $revision_id ? $storage->loadRevision($revision_id) : $storage->load($id);
if ($entity instanceof TranslatableInterface) {
$entity = $entity->getTranslation($langcode);
}
return $entity;
}
class BulkForm extends ViewsBulkForm {
}
@@ -111,12 +111,19 @@ trait EntityDefinitionTestTrait {
*
* @param string $type
* (optional) The field type for the new field. Defaults to 'string'.
* @param string $entity_type_id
* (optional) The entity type ID the base field should be attached to.
* Defaults to 'entity_test_update'.
* @param bool $is_revisionable
* (optional) If the base field should be revisionable or not. Defaults to
* FALSE.
*/
protected function addBaseField($type = 'string') {
protected function addBaseField($type = 'string', $entity_type_id = 'entity_test_update', $is_revisionable = FALSE) {
$definitions['new_base_field'] = BaseFieldDefinition::create($type)
->setName('new_base_field')
->setRevisionable($is_revisionable)
->setLabel(t('A new base field'));
$this->state->set('entity_test_update.additional_base_field_definitions', $definitions);
$this->state->set($entity_type_id . '.additional_base_field_definitions', $definitions);
}
/**
@@ -167,9 +174,12 @@ trait EntityDefinitionTestTrait {
/**
* Removes the new base field from the 'entity_test_update' entity type.
*
* @param string $entity_type_id
* (optional) The entity type ID the base field should be attached to.
*/
protected function removeBaseField() {
$this->state->delete('entity_test_update.additional_base_field_definitions');
protected function removeBaseField($entity_type_id = 'entity_test_update') {
$this->state->delete($entity_type_id . '.additional_base_field_definitions');
}
/**
@@ -64,6 +64,27 @@ class DistributionProfileTranslationQueryTest extends InstallerTestBase {
// The unrouted URL assembler does not exist at this point, so we build the
// URL ourselves.
$this->drupalGet($GLOBALS['base_url'] . '/core/install.php' . '?langcode=fr');
}
/**
* {@inheritdoc}
*/
protected function setUpLanguage() {
// This step is skipped, because the distribution profile uses a fixed
// language.
}
/**
* {@inheritdoc}
*/
protected function setUpProfile() {
// This step is skipped, because there is a distribution profile.
}
/**
* {@inheritdoc}
*/
protected function setUpSettings() {
// The language should have been automatically detected, all following
// screens should be translated already.
$elements = $this->xpath('//input[@type="submit"]/@value');
@@ -80,21 +101,8 @@ class DistributionProfileTranslationQueryTest extends InstallerTestBase {
$this->assertRaw($this->info['distribution']['install']['theme']);
// Verify that the "Choose profile" step does not appear.
$this->assertNoText('profile');
}
/**
* {@inheritdoc}
*/
protected function setUpLanguage() {
// This step is skipped, because the distribution profile uses a fixed
// language.
}
/**
* {@inheritdoc}
*/
protected function setUpProfile() {
// This step is skipped, because there is a distribution profile.
parent::setUpSettings();
}
/**
@@ -59,23 +59,6 @@ class DistributionProfileTranslationTest extends InstallerTestBase {
file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
parent::visitInstaller();
// The language should have been automatically detected, all following
// screens should be translated already.
$elements = $this->xpath('//input[@type="submit"]/@value');
$this->assertEqual((string) current($elements), 'Save and continue de');
$this->translations['Save and continue'] = 'Save and continue de';
// Check the language direction.
$direction = (string) current($this->xpath('/html/@dir'));
$this->assertEqual($direction, 'ltr');
// Verify that the distribution name appears.
$this->assertRaw($this->info['distribution']['name']);
// Verify that the requested theme is used.
$this->assertRaw($this->info['distribution']['install']['theme']);
// Verify that the "Choose profile" step does not appear.
$this->assertNoText('profile');
}
/**
@@ -93,6 +76,31 @@ class DistributionProfileTranslationTest extends InstallerTestBase {
// This step is skipped, because there is a distribution profile.
}
/**
* {@inheritdoc}
*/
protected function setUpSettings() {
// The language should have been automatically detected, all following
// screens should be translated already.
$elements = $this->xpath('//input[@type="submit"]/@value');
$this->assertEqual((string) current($elements), 'Save and continue de');
$this->translations['Save and continue'] = 'Save and continue de';
// Check the language direction.
$direction = (string) current($this->xpath('/html/@dir'));
$this->assertEqual($direction, 'ltr');
// Verify that the distribution name appears.
$this->assertRaw($this->info['distribution']['name']);
// Verify that the requested theme is used.
$this->assertRaw($this->info['distribution']['install']['theme']);
// Verify that the "Choose profile" step does not appear.
$this->assertNoText('profile');
parent::setUpSettings();
}
/**
* Confirms that the installation succeeded.
*/
@@ -32,6 +32,7 @@ class InstallerExistingInstallationTest extends InstallerTestBase {
$this->visitInstaller();
$this->setUpLanguage();
$this->setUpProfile();
$this->setUpRequirementsProblem();
$this->setUpSettings();
$this->assertRaw('Drupal already installed');
}
@@ -21,25 +21,20 @@ class SingleVisibleProfileTest extends InstallerTestBase {
*/
protected $profile = NULL;
/**
* The install profile info.
*
* @var array
*/
protected $info;
protected function setUp() {
$this->info = [
'type' => 'profile',
'core' => \Drupal::CORE_COMPATIBILITY,
'name' => 'Override standard',
'hidden' => TRUE,
];
// File API functions are not available yet.
$path = $this->siteDirectory . '/profiles/standard';
mkdir($path, 0777, TRUE);
file_put_contents("$path/standard.info.yml", Yaml::encode($this->info));
$profiles = ['standard', 'demo_umami'];
foreach ($profiles as $profile) {
$info = [
'type' => 'profile',
'core' => \Drupal::CORE_COMPATIBILITY,
'name' => 'Override ' . $profile,
'hidden' => TRUE,
];
// File API functions are not available yet.
$path = $this->siteDirectory . '/profiles/' . $profile;
mkdir($path, 0777, TRUE);
file_put_contents("$path/$profile.info.yml", Yaml::encode($info));
}
parent::setUp();
}
@@ -18,11 +18,8 @@ class StandardInstallerTest extends ConfigAfterInstallerTestBase {
* Ensures that the user page is available after installation.
*/
public function testInstaller() {
// Verify that the confirmation message appears.
require_once \Drupal::root() . '/core/includes/install.inc';
$this->assertRaw(t('Congratulations, you installed @drupal!', [
'@drupal' => drupal_install_profile_distribution_name(),
]));
// Verify that the Standard install profile's default frontpage appears.
$this->assertRaw('No front page content has been created yet.');
}
/**
@@ -65,7 +65,7 @@ class FrontPageTest extends WebTestBase {
// Change the front page to an invalid path.
$edit = ['site_frontpage' => '/kittens'];
$this->drupalPostForm('admin/config/system/site-information', $edit, t('Save configuration'));
$this->assertText(t("The path '@path' is either invalid or you do not have access to it.", ['@path' => $edit['site_frontpage']]));
$this->assertText(t("Either the path '@path' is invalid or you do not have access to it.", ['@path' => $edit['site_frontpage']]));
// Change the front page to a path without a starting slash.
$edit = ['site_frontpage' => $this->nodePath];
@@ -152,7 +152,7 @@ class ThemeTest extends WebTestBase {
// Semi-absolute path to arbitrary non-existing file.
'/core/misc/whatever.png',
// Absolute paths to any local file (even if it exists).
drupal_realpath($file->uri),
\Drupal::service('file_system')->realpath($file->uri),
];
$this->drupalGet('admin/appearance/settings');
foreach ($unsupported_paths as $path) {
@@ -168,7 +168,7 @@ class ThemeTest extends WebTestBase {
$edit = [
'default_logo' => FALSE,
'logo_path' => '',
'files[logo_upload]' => drupal_realpath($file->uri),
'files[logo_upload]' => \Drupal::service('file_system')->realpath($file->uri),
];
$this->drupalPostForm('admin/appearance/settings', $edit, t('Save configuration'));
@@ -390,7 +390,7 @@ class ThemeTest extends WebTestBase {
// Check that bartik can be uninstalled now.
$this->assertRaw('Uninstall Bartik theme', 'A link to uninstall the Bartik theme does appear on the theme settings page.');
// Check that the classy theme still can't be uninstalled as neither of it's
// Check that the classy theme still can't be uninstalled as neither of its
// base themes have been.
$this->assertNoRaw('Uninstall Classy theme', 'A link to uninstall the Classy theme does not appear on the theme settings page.');
+3 -3
View File
@@ -7,8 +7,8 @@ package: Core
required: true
configure: system.admin_config_system
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
+98 -5
View File
@@ -157,7 +157,11 @@ function system_requirements($phase) {
}
}
// Test PHP version and show link to phpinfo() if it's available
// Verify the user is running a supported PHP version.
// If the site is running a recommended version of PHP, just display it
// as an informational message on the status report. This will be overridden
// with an error or warning if the site is running older PHP versions for
// which Drupal has already or will soon drop support.
$phpversion = $phpversion_label = phpversion();
if (function_exists('phpinfo')) {
if ($phase === 'runtime') {
@@ -169,6 +173,8 @@ function system_requirements($phase) {
];
}
else {
// @todo Revisit whether this description makes sense in
// https://www.drupal.org/project/drupal/issues/2927318.
$requirements['php'] = [
'title' => t('PHP'),
'value' => $phpversion_label,
@@ -183,11 +189,25 @@ function system_requirements($phase) {
// If PHP is old, it's not safe to continue with the requirements check.
return $requirements;
}
if ((version_compare($phpversion, DRUPAL_RECOMMENDED_PHP) < 0) && ($phase === 'install' || $phase === 'runtime')) {
// Warn if still on PHP 5. If at least PHP 7.0, relax from "warning" to
// "info", and show it at runtime only, to not scare users while installing.
if (version_compare($phpversion, '7.0') < 0) {
$requirements['php']['description'] = t('Drupal will drop support for this version on March 6, 2019. Upgrade to PHP version %recommended or higher to ensure your site can receive updates and remain secure. See <a href="http://php.net/supported-versions.php">PHP\'s version support documentation</a> and the <a href=":php_requirements">Drupal 8 PHP requirements handbook page</a> for more information.', ['%recommended' => DRUPAL_RECOMMENDED_PHP, ':php_requirements' => 'https://www.drupal.org/docs/8/system-requirements/php']);
$requirements['php']['severity'] = REQUIREMENT_WARNING;
}
else {
if ($phase === 'runtime') {
$requirements['php']['description'] = t('It is recommended to upgrade to PHP version %recommended or higher for the best ongoing support. See <a href="http://php.net/supported-versions.php">PHP\'s version support documentation</a> and the <a href=":php_requirements">Drupal 8 PHP requirements handbook page</a> for more information.', ['%recommended' => DRUPAL_RECOMMENDED_PHP, ':php_requirements' => 'https://www.drupal.org/docs/8/system-requirements/php']);
$requirements['php']['severity'] = REQUIREMENT_INFO;
}
}
}
// Suggest to update to at least 5.5.21 or 5.6.5 for disabling multiple
// statements.
if (($phase === 'install' || \Drupal::database()->driver() === 'mysql') && !SystemRequirements::phpVersionWithPdoDisallowMultipleStatements($phpversion)) {
$requirements['php'] = [
$requirements['php_multiple_statement'] = [
'title' => t('PHP (multiple statement disabling)'),
'value' => $phpversion_label,
'description' => t('PHP versions higher than 5.6.5 or 5.5.21 provide built-in SQL injection protection for mysql databases. It is recommended to update.'),
@@ -469,19 +489,20 @@ function system_requirements($phase) {
// Try to write the .htaccess files first, to prevent false alarms in case
// (for example) the /tmp directory was wiped.
file_ensure_htaccess();
$file_system = \Drupal::service('file_system');
$htaccess_files['public://.htaccess'] = [
'title' => t('Public files directory'),
'directory' => drupal_realpath('public://'),
'directory' => $file_system->realpath('public://'),
];
if (PrivateStream::basePath()) {
$htaccess_files['private://.htaccess'] = [
'title' => t('Private files directory'),
'directory' => drupal_realpath('private://'),
'directory' => $file_system->realpath('private://'),
];
}
$htaccess_files['temporary://.htaccess'] = [
'title' => t('Temporary files directory'),
'directory' => drupal_realpath('temporary://'),
'directory' => $file_system->realpath('temporary://'),
];
foreach ($htaccess_files as $htaccess_file => $info) {
// Check for the string which was added to the recommended .htaccess file
@@ -2042,3 +2063,75 @@ function system_update_8403() {
}
}
}
/**
* Add the 'revision_default' field to all relevant entity types.
*/
function system_update_8501() {
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
// Clear the cached entity type definitions so we get the new
// 'revision_default' revision metadata key.
\Drupal::entityTypeManager()->clearCachedDefinitions();
// Get a list of revisionable entity types.
/** @var \Drupal\Core\Entity\ContentEntityTypeInterface[] $definitions */
$definitions = array_filter(\Drupal::entityTypeManager()->getDefinitions(), function (EntityTypeInterface $entity_type) use ($definition_update_manager) {
if ($entity_type = $definition_update_manager->getEntityType($entity_type->id())) {
return $entity_type->isRevisionable();
}
return FALSE;
});
// Install the 'revision_default' field.
foreach ($definitions as $entity_type_id => $entity_type) {
$field_name = $entity_type->getRevisionMetadataKey('revision_default');
// Install the 'revision_default' field if needed.
if (!$definition_update_manager->getFieldStorageDefinition($field_name, $entity_type_id)) {
// Make sure the new "revision_default" revision metadata key is available
// also to code using the latest installed definition.
$installed_entity_type = $definition_update_manager->getEntityType($entity_type_id);
$revision_metadata_keys = $installed_entity_type->get('revision_metadata_keys');
if (!isset($revision_metadata_keys['revision_default'])) {
// Update the property holding the required revision metadata keys,
// which is used by the BC layer for retrieving the revision metadata
// keys.
// @see \Drupal\Core\Entity\ContentEntityType::getRevisionMetadataKeys().
$required_revision_metadata_keys = $installed_entity_type->get('requiredRevisionMetadataKeys');
$required_revision_metadata_keys['revision_default'] = $field_name;
$installed_entity_type->set('requiredRevisionMetadataKeys', $required_revision_metadata_keys);
// Update the revision metadata keys to add the new required revision
// metadata key "revision_default".
$revision_metadata_keys['revision_default'] = $required_revision_metadata_keys['revision_default'];
$installed_entity_type->set('revision_metadata_keys', $revision_metadata_keys);
$definition_update_manager->updateEntityType($installed_entity_type);
}
$storage_definition = BaseFieldDefinition::create('boolean')
->setLabel(t('Default revision'))
->setDescription(t('A flag indicating whether this was a default revision when it was saved.'))
->setStorageRequired(TRUE)
->setTranslatable(FALSE)
->setRevisionable(TRUE)
// We cannot tell whether existing revisions were default or not when
// they were created, but since we did not support creating non-default
// revisions in any core stable UI so far, we default to TRUE.
->setInitialValue(TRUE);
$definition_update_manager
->installFieldStorageDefinition($field_name, $entity_type_id, $entity_type_id, $storage_definition);
}
else {
$variables = ['@entity_type_label' => $entity_type->getLabel()];
if ($field_name === 'revision_default') {
\Drupal::logger('system')->error('An existing "Default revision" field was found for the @entity_type_label entity type, but no "revision_default" revision metadata key was found in its definition.', $variables);
}
else {
\Drupal::logger('system')->error('An existing "Default revision" field was found for the @entity_type_label entity type.', $variables);
}
}
}
}
@@ -68,3 +68,8 @@ system.admin_content:
title: Content
route_name: system.admin_content
base_route: system.admin_content
system.performance_settings:
title: 'Performance'
route_name: system.performance_settings
base_route: system.performance_settings
+15 -3
View File
@@ -258,7 +258,7 @@ function system_theme() {
'file' => 'system.admin.inc',
],
'admin_block' => [
'variables' => ['block' => NULL],
'variables' => ['block' => NULL, 'attributes' => []],
'file' => 'system.admin.inc',
],
'admin_block_content' => [
@@ -276,6 +276,9 @@ function system_theme() {
],
'template' => 'entity-add-list',
],
'off_canvas_page_wrapper' => [
'variables' => ['children' => NULL],
],
]);
}
@@ -447,7 +450,7 @@ function template_preprocess_entity_add_list(&$variables) {
* $form_state->setRedirectUrl(system_authorized_get_url());
* @endcode
*
* @param $callback
* @param callable $callback
* The name of the function to invoke once the user authorizes the operation.
* @param $file
* The full path to the file where the callback function is implemented.
@@ -1443,7 +1446,7 @@ function system_retrieve_file($url, $destination = NULL, $managed = FALSE, $repl
$path = file_build_uri(drupal_basename($parsed_url['path']));
}
else {
if (is_dir(drupal_realpath($destination))) {
if (is_dir(\Drupal::service('file_system')->realpath($destination))) {
// Prevent URIs with triple slashes when glueing parts together.
$path = str_replace('///', '//', "$destination/") . drupal_basename($parsed_url['path']);
}
@@ -1522,3 +1525,12 @@ function system_query_entity_reference_alter(AlterableInterface $query) {
$handler = $query->getMetadata('entity_reference_selection_handler');
$handler->entityQueryAlter($query);
}
/**
* Implements hook_element_info_alter().
*/
function system_element_info_alter(&$type) {
if (isset($type['page'])) {
$type['page']['#theme_wrappers']['off_canvas_page_wrapper'] = ['#weight' => -1000];
}
}
@@ -15,6 +15,10 @@ access site in maintenance mode:
view the administration theme:
title: 'View the administration theme'
description: 'This is only used when the site is configured to use a separate administration theme on the Appearance page.'
# Note that the 'access content' permission is moved to the Node section of the
# permission form when the Node module is enabled.
access content:
title: 'View published content'
access site reports:
title: 'View site reports'
restrict access: true
@@ -81,3 +81,33 @@ function system_post_update_classy_message_library() {
function system_post_update_field_type_plugins() {
// Empty post-update hook.
}
/**
* Clear caches due to schema changes in core.entity.schema.yml.
*/
function system_post_update_field_formatter_entity_schema() {
// Empty post-update hook.
}
/**
* Change plugin IDs of actions.
*/
function system_post_update_change_action_plugins() {
$old_new_action_id_map = [
'comment_publish_action' => 'entity:publish_action:comment',
'comment_unpublish_action' => 'entity:unpublish_action:comment',
'comment_save_action' => 'entity:save_action:comment',
'node_publish_action' => 'entity:publish_action:node',
'node_unpublish_action' => 'entity:unpublish_action:node',
'node_save_action' => 'entity:save_action:node',
];
/** @var \Drupal\system\Entity\Action[] $actions */
$actions = \Drupal::entityTypeManager()->getStorage('action')->loadMultiple();
foreach ($actions as $action) {
if (isset($old_new_action_id_map[$action->getPlugin()->getPluginId()])) {
$action->setPlugin($old_new_action_id_map[$action->getPlugin()->getPluginId()]);
$action->save();
}
}
}
@@ -10,11 +10,17 @@
* - content: (optional) The content of the block.
* - description: (optional) A description of the block.
* (Description should only be output if content is not available).
* - attributes: HTML attributes for the containing div element.
*
* @ingroup themeable
*/
#}
<div class="panel">
{%
set classes = [
'panel',
]
%}
<div{{ attributes.addClass(classes) }}>
{% if block.title %}
<h3 class="panel__title">{{ block.title }}</h3>
{% endif %}
@@ -0,0 +1,26 @@
{#
/**
* @file
* Default theme implementation for a page wrapper.
*
* For consistent wrapping to {{ page }} render in all themes. The
* "data-off-canvas-main-canvas" attribute is required by the off-canvas dialog.
* This is used by the core/drupal.dialog.off_canvas library to select the
* "main canvas" page element as opposed to the "off canvas" which is the dialog
* itself. The "main canvas" element must be resized according to the width of
* the "off canvas" dialog so that no portion of the "main canvas" is obstructed
* by the off-canvas dialog. The off-canvas dialog can vary in width when opened
* and can be resized by the user. The "data-off-canvas-main-canvas" attribute
* cannot be removed without breaking the off-canvas dialog functionality.
*
* Available variables:
* - children: Contains the child elements of the page.
*
* @ingroup themeable
*/
#}
{% if children %}
<div class="dialog-off-canvas-main-canvas" data-off-canvas-main-canvas>
{{ children }}
</div>
{% endif %}
@@ -23,7 +23,7 @@
<div>
<h3 id="{{ group.type }}">{{ group.title }}</h3>
{% for requirement in group.items %}
<details class="system-status-report__entry">
<details class="system-status-report__entry" open>
{%
set summary_classes = [
'system-status-report__status-title',
@@ -24,7 +24,7 @@
* @ingroup themeable
*/
#}
<table class="responsive-enabled" data-striping="1">
<table class="responsive-enabled">
<thead>
<tr>
<th class="checkbox visually-hidden">{{ 'Installed'|t }}</th>
@@ -23,7 +23,7 @@
#}
{{ form.filters }}
<table class="responsive-enabled" data-striping="1">
<table class="responsive-enabled">
<thead>
<tr>
<th>{{ 'Uninstall'|t }}</th>
@@ -0,0 +1,32 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2455125.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Structure of a view with timestamp fields.
$views_configs = [];
$views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/drupal-8.views-entity-views-data-2846614.yml'));
foreach ($views_configs as $views_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'views.view.' . $views_config['id'],
'data' => serialize($views_config),
])
->execute();
}
@@ -0,0 +1,240 @@
uuid: 001475a0-daec-4e8a-8ca7-97b0d24100a6
langcode: en
status: true
dependencies:
module:
- user
id: test_user_multi_value
label: test_user_multi_value
module: views
description: ''
tag: ''
base_table: users_field_data
base_field: uid
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'access user profiles'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ‹‹
next: ››
style:
type: default
options:
grouping: { }
row_class: ''
default_row_class: true
uses_fields: false
row:
type: fields
options:
inline: { }
separator: ''
hide_empty: false
default_field_elements: true
fields:
roles:
id: roles
table: user__roles
field: roles
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_label
settings:
link: true
group_column: target_id
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: user
entity_field: roles
plugin_id: field
filters:
roles:
id: roles
table: user__roles
field: roles
relationship: none
group_type: group
admin_label: ''
operator: '='
value: ''
group: 1
exposed: false
expose:
operator_id: ''
label: ''
description: ''
use_operator: false
operator: ''
identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
entity_type: user
entity_field: roles
plugin_id: string
sorts: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments:
roles:
id: roles
table: user__roles
field: roles
relationship: none
group_type: group
admin_label: ''
default_action: ignore
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: fixed
default_argument_options:
argument: ''
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
glossary: false
limit: 0
case: none
path_case: none
transform_dash: false
break_phrase: false
entity_type: user
entity_field: roles
plugin_id: string
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- user.permissions
tags: { }
@@ -4,8 +4,8 @@ type: module
package: Testing
# version: VERSION
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -2,16 +2,15 @@
namespace Drupal\accept_header_routing_test\Routing;
use Drupal\Core\Routing\RouteFilterInterface;
use Drupal\Core\Routing\FilterInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
/**
* Filters routes based on the media type specified in the HTTP Accept headers.
*/
class AcceptHeaderMatcher implements RouteFilterInterface {
class AcceptHeaderMatcher implements FilterInterface {
/**
* {@inheritdoc}
@@ -59,11 +58,4 @@ class AcceptHeaderMatcher implements RouteFilterInterface {
throw new NotAcceptableHttpException('No route found for the specified formats ' . implode(' ', $acceptable_mime_types));
}
/**
* {@inheritdoc}
*/
public function applies(Route $route) {
return TRUE;
}
}
@@ -5,8 +5,8 @@ package: Testing
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -5,8 +5,8 @@ description: 'Test for AJAX form calls.'
package: Testing
# version: VERSION
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -9,6 +9,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Form builder: Builds a form that has each FAPI elements triggering a simple
* Ajax callback.
*
* @internal
*/
class AjaxFormsTestAjaxElementsForm extends FormBase {
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Form constructor for the Ajax Command display form.
*
* @internal
*/
class AjaxFormsTestCommandsForm extends FormBase {
@@ -8,6 +8,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Form builder: Builds a form that has image button with an ajax callback.
*
* @internal
*/
class AjaxFormsTestImageButtonForm extends FormBase {
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Form builder: Builds a form that triggers a simple AJAX callback.
*
* @internal
*/
class AjaxFormsTestLazyLoadForm extends FormBase {
@@ -8,6 +8,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Form builder: Builds a form that triggers a simple AJAX callback.
*
* @internal
*/
class AjaxFormsTestSimpleForm extends FormBase {
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Form builder: Builds a form that triggers a simple AJAX callback.
*
* @internal
*/
class AjaxFormsTestValidationForm extends FormBase {
@@ -7,8 +7,8 @@ package: Testing
dependencies:
- contact
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -11,6 +11,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Dummy form for testing DialogRenderer with _form routes.
*
* @internal
*/
class AjaxTestDialogForm extends FormBase {
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Dummy form for testing DialogRenderer with _form routes.
*
* @internal
*/
class AjaxTestForm extends FormBase {
@@ -5,8 +5,8 @@ package: Testing
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Generate form of id batch_test_chained_form.
*
* @internal
*/
class BatchTestChainedForm extends FormBase {
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Generate form of id batch_test_mock_form.
*
* @internal
*/
class BatchTestMockForm extends FormBase {
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Generate form of id batch_test_multistep_form.
*
* @internal
*/
class BatchTestMultiStepForm extends FormBase {
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
/**
* Generate form of id batch_test_simple_form.
*
* @internal
*/
class BatchTestSimpleForm extends FormBase {
@@ -5,8 +5,8 @@ package: Testing
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -5,8 +5,8 @@ package: Testing
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -5,8 +5,8 @@ package: Testing
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -5,8 +5,8 @@ package: Testing
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -5,8 +5,8 @@ package: Testing
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825

Some files were not shown because too many files have changed in this diff Show More