Add an availability to remove plugins from sources as per:

https://www.drupal.org/project/feeds_tamper/issues/2937728#comment-12434039

Route: admin/structure/feeds/%feed_type/tamper/%tamper_uuid/delete
UI: the same or similar to D7

Comments

max-kuzomko created an issue. See original summary.

max-kuzomko’s picture

Status: Active » Needs review
StatusFileSize
new13.06 KB

Fixed, needs review.
Also found a bug with updating feeds tampers - after update the uuid of the tamper is null. Fixed it also.

megachriz’s picture

Good work, Max!

I've reviewed the code and made the following changes:

  1. Moved t() call to TamperDeleteForm::getQuestion. If possible, only string literals should be passed to t().
  2. Changed text of question to be similar to other delete forms. In particular I took \Drupal\image\Form\ImageEffectDeleteForm as an example. The concept of image effects to an image style is similar to the concept of Feeds tampers to a feed type in my opinion.
  3. When referring to a Tamper plugin instance, I used its label instead of its description.
  4. In the question I referred to the source as well.
  5. Minor: in the docblock of TamperFormTrait::assertTamper I documented that the method can throw an exception.
  6. Minor: changed all todo's in @todo. Not sure if there is a coding standard for this, but I usually see todo's documented in this form.

I also tried the new functionality in action and can confirm that a plugin gets properly deleted!

One note: after deleting you do get to a page not found page, but I know that is because the Tamper overview page is not yet implemented.

If you are okay with the changes, I'll commit the patch.

max-kuzomko’s picture

Sounds great! I am fine with the changes.
Thank you, @MegaChriz!

  • MegaChriz committed 31cfc68 on 8.x-2.x authored by max-kuzomko
    Issue #2948850 by max-kuzomko, MegaChriz: Add an availability to remove...
megachriz’s picture

Status: Needs review » Fixed

Thanks for reporting back! Committed #3.

Status: Fixed » Closed (fixed)

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