-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DGIR-44 : Update hook for cascading Entity Status #3
Conversation
islandora_entity_status.module
Outdated
*/ | ||
function islandora_entity_status_entity_update(EntityInterface $entity) { | ||
// Check if the entity is a node with the bundle "islandora_object". | ||
if ($entity->getEntityTypeId() == 'node' && $entity->bundle() == 'islandora_object') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this check, check if entity has field IslandoraUtils::MEDIA_OF_FIELD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can not validate IslandoraUtils::MEDIA_OF_FIELD
as its not present in islandora_object
content type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking for MEMBER_OF_FIELD field.
islandora_entity_status.module
Outdated
/** | ||
* Implements hook_entity_update(). | ||
*/ | ||
function islandora_entity_status_entity_update(EntityInterface $entity) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hook change from hook_entity_update to hook_ENTITY_TYPE_update
No description provided.