Iterating through Express Entries for single Object, stuffing various results into arrays, then drawing... keeping fidelity?

I think I’m missing a bit of subtle context as to why I see this style come up in your code examples, so a few… maybe unrelated… questions:

  1. Why are these commented out?
  2. What’s with the @var?
  3. What is this part about?

I’m just not sure if this is some sort of programming practice that I’m not yet familiar with seeing and understanding is all :^)

I have a HUNCH it is maybe just a comment, and not that I necessarily need to “use …” declare those or not. But I figured I should ask.

As for the method, thanks again! I’ll try that :smiley:

LOL so that caused the page to HTTP 500, didn’t even get PHP debug XD

Is dd() expected to just output raw data? I really am looking for some way to dynamically retrieve the Entry ID value and stuff it into $associatedEntry = Express:getEntry($EntryID); for use with ->filterByAssociatedEntry()

And yes, the issue so far is that the “$variable = $c->getAttribute(‘event_express_attribute’)” produces a \Concrete\Core\Entity\Attribute\Value\Value\ExpressValue type when the ->filterByAssocciatedEntry() says it needs \Concrete\Core\Entity\Express\Entry

Ahh I found this thread from @MrKDilkington that I think is getting me the EntryID from the Page Attribute Express type :smiley: : Get Express Values from page attribute - concrete5

Initial testing seems to show it gets me the right value! Thanks to both of you! :smiley:

1 Like

It’s just helper line for IDEs like phpStorm or VSCode to help them autocomplete available methods and/or navigate between files. IDEs are not always aware what kind of object is returned from variable. You can delete those comments if you want.

2 Likes

You don’t have necessarily fetch id from $entry. It is already an Entry object, which you can directly use for associate filtering (unless you need id or some other attribute from it).