Currently there are some methods to addItem/getItem/getItems/setItemOption but there is none to remove an item from a view.

Before doing that there has to be explicit test coverage of all this functions, probably one for each handler type.

CommentFileSizeAuthor
#2 1786540-2.patch4.58 KBdamiankloip
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 8.x-3.x-dev » 8.x-dev
Component: Code » views.module
damiankloip’s picture

Title: Add a view::removeItem method » Add a ViewExecutable::removeItem method
Status: Active » Needs review
FileSize
4.58 KB

Here is a new method, with a small test. We have basic tests for the set/getItem(s) methods, so we could add this here for now? It will have similar test coverage to the other methods currently :)

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

THis is looking pretty good!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

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