-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '16457-updatepatch-entity_browser-module'
- Loading branch information
Showing
4 changed files
with
117 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
patches/3408217-error-call-to-member-function-getstorage-on-null.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
diff --git a/src/Plugin/Field/FieldWidget/EntityReferenceBrowserTableWidget.php b/src/Plugin/Field/FieldWidget/EntityReferenceBrowserTableWidget.php | ||
index 177fda745f27e21d6377025e50b2caee9f28894a..af1f8b00834c9d9fadf9314a26c67769732d1694 100644 | ||
--- a/src/Plugin/Field/FieldWidget/EntityReferenceBrowserTableWidget.php | ||
+++ b/src/Plugin/Field/FieldWidget/EntityReferenceBrowserTableWidget.php | ||
@@ -4,19 +4,10 @@ namespace Drupal\entity_browser_table\Plugin\Field\FieldWidget; | ||
|
||
use Drupal\Component\Plugin\Exception\PluginException; | ||
use Drupal\Component\Utility\Html; | ||
-use Drupal\content_moderation\ModerationInformation; | ||
use Drupal\Core\Entity\EntityInterface; | ||
-use Drupal\Core\Entity\EntityTypeBundleInfo; | ||
-use Drupal\Core\Entity\EntityTypeManagerInterface; | ||
-use Drupal\Core\Extension\ModuleHandlerInterface; | ||
-use Drupal\Core\Field\FieldDefinitionInterface; | ||
use Drupal\Core\Field\FieldItemListInterface; | ||
use Drupal\Core\Form\FormStateInterface; | ||
-use Drupal\Core\Language\LanguageManagerInterface; | ||
-use Drupal\Core\Messenger\MessengerInterface; | ||
-use Drupal\Core\Session\AccountInterface; | ||
use Drupal\Core\Url; | ||
-use Drupal\entity_browser\FieldWidgetDisplayManager; | ||
use Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
||
@@ -47,55 +38,13 @@ class EntityReferenceBrowserTableWidget extends EntityReferenceBrowserWidget { | ||
protected $moderationInfo; | ||
|
||
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { | ||
- | ||
- return new static( | ||
- $plugin_id, | ||
- $plugin_definition, | ||
- $configuration['field_definition'], | ||
- $configuration['settings'], | ||
- $configuration['third_party_settings'], | ||
- $container->get('entity_type.manager'), | ||
- $container->get('plugin.manager.entity_browser.field_widget_display'), | ||
- $container->get('module_handler'), | ||
- $container->get('current_user'), | ||
- $container->get('messenger'), | ||
- $container->get('language_manager'), | ||
- $container->get('entity_type.bundle.info'), | ||
- $container->has('content_moderation.moderation_information') | ||
- ? $container->get('content_moderation.moderation_information') | ||
- : NULL | ||
- ); | ||
- } | ||
- | ||
- public function __construct( | ||
- $plugin_id, | ||
- array $plugin_definition, | ||
- FieldDefinitionInterface $field_definition, | ||
- array $settings, | ||
- array $third_party_settings, | ||
- EntityTypeManagerInterface $entity_type_manager, | ||
- FieldWidgetDisplayManager $field_display_manager, | ||
- ModuleHandlerInterface $module_handler, | ||
- AccountInterface $current_user, | ||
- MessengerInterface $messenger, | ||
- LanguageManagerInterface $languageManager, | ||
- EntityTypeBundleInfo $bundleInfo, | ||
- ModerationInformation $moderationInformation = NULL) { | ||
- parent::__construct( | ||
- $plugin_id, | ||
- $plugin_definition, | ||
- $field_definition, | ||
- $settings, | ||
- $third_party_settings, | ||
- $entity_type_manager, | ||
- $field_display_manager, | ||
- $module_handler, | ||
- $current_user, | ||
- $messenger | ||
- ); | ||
- $this->currentLanguage = $languageManager->getCurrentLanguage()->getId(); | ||
- $this->entityBundleInfo = $bundleInfo; | ||
- $this->moderationInfo = $moderationInformation; | ||
+ $instance = parent::create($container, $configuration, $plugin_id, $plugin_definition); | ||
+ $instance->currentLanguage = $container->get('language_manager')->getCurrentLanguage()->getId(); | ||
+ $instance->entityBundleInfo = $container->get('entity_type.bundle.info'); | ||
+ $instance->moderationInfo = $container->has('content_moderation.moderation_information') | ||
+ ? $container->get('content_moderation.moderation_information') | ||
+ : NULL; | ||
+ return $instance; | ||
} | ||
|
||
/** |
18 changes: 0 additions & 18 deletions
18
tests/cypress/integration/features/platform/entity_reference_validation.feature
This file was deleted.
Oops, something went wrong.