Bolt\Storage\Collection\Relations::incoming PHP Method

incoming() public method

Identifies which relations are incoming to the given entity
public incoming ( Content $entity ) : mixed
$entity Bolt\Storage\Entity\Content
return mixed
    public function incoming(Entity\Content $entity)
    {
        return $this->filter(function ($el) use($entity) {
            /** @var Entity\Relations $el */
            return $el->getToContenttype() == (string) $entity->getContenttype() && $el->getToId() === $entity->getId();
        });
    }