Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ayelet_Cr’s picture

Assigned: Unassigned » ayelet_Cr
ayelet_Cr’s picture

Status: Active » Needs review
FileSize
6.67 KB
tim.plunkett’s picture

This looks great! Just a couple things that are in here that are redundant.

+++ b/core/modules/picture/lib/Drupal/picture/Form/PictureMappingActionConfirmForm.phpundefined
@@ -0,0 +1,113 @@
+   * Returns the question to ask the user.
+   *
+   * @return string
+   *   The form question. The page title will be set to this value.

This should be either "Implements \Drupal\Core\Form\ConfirmFormBase::getQuestion()", or just "{@inheritdoc}" per #1906474: [policy adopted] Stop documenting methods with "Overrides …", but there is no need to duplicate all of the docblock. This applies to all methods in the class.

+++ b/core/modules/picture/lib/Drupal/picture/Form/PictureMappingActionConfirmForm.phpundefined
@@ -0,0 +1,113 @@
+  /**
+   * Returns additional text to display as a description.
+   *
+   * @return string
+   *   The form description.
+   */
+  protected function getDescription() {
+    return t('This action cannot be undone.');
...
+  /**
+   * Returns a caption for the link which cancels the action.
+   *
+   * @return string
+   *   The form cancellation text.
+   */
+  protected function getCancelText() {
+    return t('Cancel');
+  }
...
+  /**
+   * Returns the internal name used to refer to the confirmation item.
+   *
+   * @return string
+   *   The internal form name.
+   */
+  protected function getFormName() {
+    return 'confirm';
...
+  /**
+   * Implements \Drupal\Core\Form\FormInterface::validateForm().
+   */
+  public function validateForm(array &$form, array &$form_state) {

This is in the base class, it can be ommitted

ayelet_Cr’s picture

Crell’s picture

+++ b/core/modules/picture/lib/Drupal/picture/Form/PictureMappingActionConfirmForm.php
@@ -0,0 +1,63 @@
+<?php
+
+namespace Drupal\picture\Form;

This file needs to have a "Contains" @file docblock at the top. Otherwise I think this is ready to go.

ayelet_Cr’s picture

Status: Needs review » Needs work
Issue tags: -FormInterface, -WSCCI-conversion

The last submitted patch, 1946450-picture_mapping_confirm_form.patch, failed testing.

ayelet_Cr’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
Issue tags: +FormInterface, +WSCCI-conversion

The last submitted patch, 1946450-picture_mapping_confirm_form.patch, failed testing.

tim.plunkett’s picture

Did you possibly edit that patch manually? Line 6 says "@@ -0,0 +1,69 @@", it should be "@@ -0,0 +1,68 @@". But to avoid corrupt patch, its safest just to reroll it regularly...

ayelet_Cr’s picture

Status: Needs work » Needs review
FileSize
5.19 KB
Crell’s picture

Status: Needs review » Reviewed & tested by the community

Let's do.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

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

Eli-T’s picture

Component: picture.module » responsive_image.module
Issue summary: View changes