DrupalDriver icon indicating copy to clipboard operation
DrupalDriver copied to clipboard

Adding node and user alter functionality

Open aronbeal opened this issue 9 years ago • 2 comments

This is a continuation of the thread here. I had thought that I didn't need alteration functionality, but I've expanded the extension capabilities to the point where I needed to have this thing in the core driver, and I felt it might be a useful general addition.

I'm currently using my own fork of DrupalDriver within DrupalExtension that contains this code. I think it's a useful general addition, so I'm submitting the pull request. The alter functions expect fully loaded drupal objects for the first argument.

This is currently a D7 only implementation. I'm game to implement in D8 as well eventually, when we aren't so under the gun at my shop.

One area I need to highlight is the modification to userCreate to deal with the handling for user roles. I'm not sure that exploding the string there is the best solution to the problem - I welcome input.

aronbeal avatar May 30 '16 19:05 aronbeal

Note: in addition to the above, I've also added support for deleting multiple nodes and users at once to the interfaces, base classes (that throw 'non-implement' exceptions), and to D7. I don't (yet) have the ability to add and test the functionality for a D8 instance.

aronbeal avatar Jun 01 '16 15:06 aronbeal

Are all the entity load methods needed for the alter functionality, or did they sneak in from another branch/PR?

jhedstrom avatar Sep 28 '16 20:09 jhedstrom