Closed (outdated)
Project:
Entityqueue
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2015 at 07:13 UTC
Updated:
30 Jun 2026 at 09:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mercepedraza commentedThis is an approach that adds a new migrate destination field to any entity where to specify the entityqueue/s where the entity has to be added.
Comment #2
mercepedraza commentedThis patch corrects the previous way to get the values of the entityqueues names from $entity instead of from $row.
In this way it guarantees that when multiples values are received they arrive in an array without any separator.
Comment #3
mercepedraza commentedThe previous patch contains only the interdiff, this one is the right one.
Comment #4
rodrigoaguileraI can confirm this patch is working as expected. Even with no rollback functionality I think it can be commited.
Comment #5
amateescu commentedThe patch looks ok to me as well. Here's a few things that could be improved:
This description could be expanded with a few more words :)
These can be simply {@inheritdoc}.
We can change this to:
and drop the conversion below.
Unneeded empty lines in the
complete()method.It looks like we're not using $migration or $destination below, so we can inline everything to:
Comment #6
rodrigoaguileraAddressed all the points.
Comment #7
amateescu commentedThanks, looks much better :)
I wonder why this is the case. We can not support rollback at all or it's just not part of this implementation because you didn't need it?
Comment #8
rodrigoaguileraAFAIK We cannot support rollback. I removed the wording about support, now is just a phrase telling what happens when you rollback.
Removed the files[] declaration because migrate already detects the file. See the first lines of
http://cgit.drupalcode.org/migrate/tree/migrate_example/migrate_example....
Comment #9
amateescu commentedAre you sure it detects the file even when the hook_migrate_api() implementation is in that file? I kind of doubt that.. :) It would make more sense to move the hook at the bottom of entityqueue.module.
Comment #10
rodrigoaguileraYes, I'm 100% sure. If you look at the migrate_example module there's no other reference to the *.migrate.inc file in the .info file.
Yo can also test it very quickly in https://simplytest.me/
Comment #11
amateescu commentedOh, I overlooked the fact that our filename ends in .migrate.inc, I thought it was named after the class name like we do in Drupal 8. So, yep, I think we're good here.
Setting back to RTBC to give some time to @jojonaloha if he wants to review this as well.
Comment #12
jojonaloha commentedI haven't tested this, but the only thing I see is I would change
$key = 'eq_' . $entity_type;to$key = _entityqueue_get_target_field_name($entity_type);Comment #13
amateescu commentedClosing issues for the 7.x version, which is not supported anymore.