Loading imageshop.info.yml +1 −1 Original line number Diff line number Diff line name: Imageshop core_version_requirement: ^8.8 || ^9 core_version_requirement: ^9.3 || ^10 type: module dependencies: - drupal:image imageshop.module +3 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,9 @@ function imageshop_form_media_library_add_form_upload_alter(&$form, FormStateInt if (!in_array($type, $config)) { return; } if (empty($form["container"]["upload"]["#process"])) { return; } $form["container"]["upload"]["#type"] = 'imageshop'; // We need to set the values before the media module does. array_unshift($form["container"]["upload"]["#process"], [ Loading src/Element/ImageShopElement.php +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ class ImageShopElement extends ManagedFile { /** * Validates the upload element. */ public function validateMediaUploadElement(array $element, FormStateInterface $form_state) { public static function validateMediaUploadElement(array $element, FormStateInterface $form_state) { if ($form_state::hasAnyErrors()) { // When an error occurs during uploading files, remove all files so the // user can re-upload the files. Loading tests/modules/imageshop_test/imageshop_test.info.yml +1 −1 Original line number Diff line number Diff line name: Imageshop testing type: module package: Testing core_version_requirement: ^8.8 || ^9 core_version_requirement: ^9.3 || ^10 tests/src/FunctionalJavascript/MediaBrowserTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ class MediaBrowserTest extends WebDriverTestBase { $element->pressButton('Add media'); /** @var \Drupal\FunctionalJavascriptTests\WebDriverWebAssert $session */ $session = $this->assertSession(); $session->assertWaitOnAjaxRequest(); $element = $session->waitForElement('css', '.imageshop-trigger'); $files = $this->container->get('entity_type.manager')->getStorage('file')->loadByProperties([]); self::assertEmpty($files); Loading Loading
imageshop.info.yml +1 −1 Original line number Diff line number Diff line name: Imageshop core_version_requirement: ^8.8 || ^9 core_version_requirement: ^9.3 || ^10 type: module dependencies: - drupal:image
imageshop.module +3 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,9 @@ function imageshop_form_media_library_add_form_upload_alter(&$form, FormStateInt if (!in_array($type, $config)) { return; } if (empty($form["container"]["upload"]["#process"])) { return; } $form["container"]["upload"]["#type"] = 'imageshop'; // We need to set the values before the media module does. array_unshift($form["container"]["upload"]["#process"], [ Loading
src/Element/ImageShopElement.php +1 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ class ImageShopElement extends ManagedFile { /** * Validates the upload element. */ public function validateMediaUploadElement(array $element, FormStateInterface $form_state) { public static function validateMediaUploadElement(array $element, FormStateInterface $form_state) { if ($form_state::hasAnyErrors()) { // When an error occurs during uploading files, remove all files so the // user can re-upload the files. Loading
tests/modules/imageshop_test/imageshop_test.info.yml +1 −1 Original line number Diff line number Diff line name: Imageshop testing type: module package: Testing core_version_requirement: ^8.8 || ^9 core_version_requirement: ^9.3 || ^10
tests/src/FunctionalJavascript/MediaBrowserTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ class MediaBrowserTest extends WebDriverTestBase { $element->pressButton('Add media'); /** @var \Drupal\FunctionalJavascriptTests\WebDriverWebAssert $session */ $session = $this->assertSession(); $session->assertWaitOnAjaxRequest(); $element = $session->waitForElement('css', '.imageshop-trigger'); $files = $this->container->get('entity_type.manager')->getStorage('file')->loadByProperties([]); self::assertEmpty($files); Loading