Last active
May 5, 2018 21:06
-
-
Save init90/3a4488a7036294db4aca335e6288e5f9 to your computer and use it in GitHub Desktop.
drupal 7, entity query by date and entity reference field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $q = new EntityFieldQuery; | |
| $exam_id = $exam_wrp->field_event_exan_id->value(); | |
| $assignee_user = $q->entityCondition('entity_type', 'event') | |
| ->propertyCondition('type', 'exam_event') | |
| ->fieldCondition('field_start_event_date', 'value', date('Y-m-d'), '>') | |
| ->fieldCondition('field_event_exan_id', 'value', $exam_id, '=') | |
| ->fieldCondition('field_assignee', 'target_id', array($GLOBALS['user']->uid), 'IN') | |
| ->execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment