Also, why not just pass in the `LinkCollection` from the `$halResource` (i.e., via `$halResource->getLinks()`)? That would save some method calls later in this closure.