public function loadEntities($entity, $id = null)
    {
        $params = $this->options;
        $params['id'] = $id;
        $params['repositories'] = $this->repositories;

        $event = $this->loadEntitiesEvents->getEvent($entity, $this, $params);
        $responses = $this->loadEntitiesEvents->triggerEventUntil(
            function ($response) {
                return (is_array($response) || $response instanceof \Traversable) && count($response);
            },
            $event
        );

        $entities = $responses->last();

        return $entities;
    }