filterByAssociatedEntry
Permalink
I'm looking for more information (or example) for searching in entries based on an association. Currently I have a job express list and a application express list. There is a one-to-one association between the two, with a user selector attribute. I've the following code to determine if a user has already applied:
I know there is a entry for my current setup, but there is are no $items. It's empty.
Can anybody help me?
Best,
Corretje
// 'applications' is the handle of the entries I need to look for. $entity = Express::getObjectByHandle('applications'); $list = new \Concrete\Core\Express\EntryList($entity); // Current loggedin userID $list->filterByAttribute('application_uID', $u->getUserID()); // Current $entry is the job I'm viewing $list->filterByAssociatedEntry($entry->getAssociations()[0]->getAssociation(), $entry); $list->debug(); $items = $list->getResults();
I know there is a entry for my current setup, but there is are no $items. It's empty.
Can anybody help me?
Best,
Corretje