Eccube\Service\CsvExportService::findDeserializeObjects PHP Method

findDeserializeObjects() protected method

XXX self::setExportQueryBuilder() をコールする前に EntityManager を取得したいので、引数で渡している
protected findDeserializeObjects ( array &$searchData )
$searchData array セッションから取得した検索条件の配列
    protected function findDeserializeObjects(array &$searchData)
    {
        $em = $this->getEntityManager();
        foreach ($searchData as &$Conditions) {
            if ($Conditions instanceof ArrayCollection) {
                $Conditions = new ArrayCollection(array_map(function ($Entity) use($em) {
                    return $em->getRepository(get_class($Entity))->find($Entity->getId());
                }, $Conditions->toArray()));
            } elseif ($Conditions instanceof \Eccube\Entity\AbstractEntity) {
                $Conditions = $em->getRepository(get_class($Conditions))->find($Conditions->getId());
            }
        }
    }