Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kim.pepper’s picture

Assigned: Unassigned » kim.pepper

Assigning

kim.pepper’s picture

Status: Active » Needs review
FileSize
88 bytes

Initial conversion for image style and image effect confirm delete forms.

K

kim.pepper’s picture

Lets try that again.

Status: Needs review » Needs work

The last submitted patch, 1946416-image-admin-confirm-form-3.patch, failed testing.

kim.pepper’s picture

Those test failures don't seem to be related. Re-testing.

kim.pepper’s picture

Status: Needs work » Needs review
tim.plunkett’s picture

Status: Needs review » Needs work
+++ b/core/modules/image/image.moduleundefined
@@ -156,13 +156,8 @@ function image_menu() {
-    'type' => MENU_LOCAL_TASK,

Why is the MENU_LOCAL_TASK being removed?

+++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.phpundefined
@@ -0,0 +1,78 @@
+  public function buildForm(array $form, array &$form_state, $image_style = NULL, $image_effect = NULL) {
+
+    $this->imageStyle = $image_style;

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,86 @@
+  public function buildForm(array $form, array &$form_state, $image_style = NULL) {
+
+    $this->imageStyle = $image_style;

$image_style can be typehinted, ImageStyle. Also, might as well remove that blank line

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,86 @@
+<?php
+/**
+ * @file

Missing blank line

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,86 @@
+   * @var \Drupal\image\Plugin\Core\Entity\ImageStyle $imageStyle

the $imageStyle is redundant

kim.pepper’s picture

Status: Needs work » Needs review
FileSize
2.38 KB
10.56 KB

Applied fixes per #7

kim.pepper’s picture

Fixed put type hint on wrong method.

larowlan’s picture

Just some minor nitpicks - mostly down to the change in coding standards (yuck)

+++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.phpundefined
@@ -0,0 +1,79 @@
+   * The image style associated with the image effect to be deleted.

containing instead of associated? Or perhaps 'The image style which the effect to be deleted belongs to'

+++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.phpundefined
@@ -0,0 +1,79 @@
+   * Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.phpundefined
@@ -0,0 +1,79 @@
+   * Implements \Drupal\Core\Form\ConfirmFormBase::getConfirmText().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.phpundefined
@@ -0,0 +1,79 @@
+   * Implements \Drupal\Core\Form\ConfirmFormBase::getCancelPath().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.phpundefined
@@ -0,0 +1,79 @@
+   * Implements \Drupal\Core\Form\FormInterface::getFormID().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.phpundefined
@@ -0,0 +1,79 @@
+   * Implements \Drupal\Core\Form\FormInterface::buildForm().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageEffectDeleteForm.phpundefined
@@ -0,0 +1,79 @@
+   * Implements \Drupal\Core\Form\FormInterface::submitForm().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,88 @@
+   * Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,88 @@
+   * Implements \Drupal\Core\Form\ConfirmFormBase::getConfirmText().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,88 @@
+   * Implements \Drupal\Core\Form\ConfirmFormBase::getCancelPath().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,88 @@
+   * Implements \Drupal\Core\Form\FormInterface::getFormID().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,88 @@
+   * Implements \Drupal\Core\Form\FormInterface::getDescription().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,88 @@
+   * Implements \Drupal\Core\Form\FormInterface::buildForm().

should use {@inheritdoc}

+++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleDeleteForm.phpundefined
@@ -0,0 +1,88 @@
+   * Implements \Drupal\Core\Form\FormInterface::submitForm().

should use {@inheritdoc}

kim.pepper’s picture

Thanks @larowlan! I went with "The image style containing the image effect to be deleted." Make enough sense?

Also added {@inheritdoc} everywhere.

ParisLiakos’s picture

Status: Needs review » Reviewed & tested by the community

its ready now :)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 1ebed3a and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.