private function getRecords($contentTypeName, MutableBag $exportData, MutableBag $responseBag)
    {
        /** @var ContentRepository $repo */
        $repo = $this->em->getRepository($contentTypeName);
        $metadata = $repo->getClassMetadata();
        // Get all the records for the ContentType
        $entities = $this->query->getContent($contentTypeName);
        $contentTypeBag = $exportData->get($contentTypeName);

        foreach ($entities as $key => $entity) {
            $this->addRecord($contentTypeBag, $metadata, $entity);
        }

        /** @var MutableBag $success */
        $success = $responseBag->get('success');
        $success->add(sprintf('%s: %s records', $contentTypeName, count($entities)));
    }
private function getRecords($contentTypeName, MutableBag $exportData, MutableBag $responseBag)
    {
        /** @var ContentRepository $repo */
        $repo = $this->em->getRepository($contentTypeName);
        $metadata = $repo->getClassMetadata();
        // Get all the records for the ContentType
        $entities = $this->query->getContent($contentTypeName);
        $contentTypeBag = $exportData->get($contentTypeName);

        foreach ($entities as $key => $entity) {
            $this->addRecord($contentTypeBag, $metadata, $entity);
        }

        /** @var MutableBag $success */
        $success = $responseBag->get('success');
        $success->add(sprintf('%s: %s records', $contentTypeName, count($entities)));
    }
private function getRecords ( $ contentTypeName , MutableBag $ exportData , MutableBag $ responseBag ) { /** @var ContentRepository $repo */ $ repo = $ this -> em -> getRepository ( $ contentTypeName ) ; $ metadata = $ repo -> getClassMetadata ( ) ; // Get all the records for the ContentType $ entities = $ this -> query -> getContent ( $ contentTypeName ) ; $ contentTypeBag = $ exportData -> get ( $ contentTypeName ) ; foreach ( $ entities as $ key => $ entity ) { $ this -> addRecord ( $ contentTypeBag , $ metadata , $ entity ) ; } /** @var MutableBag $success */ $ success = $ responseBag -> get ( 'success' ) ; $ success -> add ( sprintf ( '%s: %s records' , $ contentTypeName , count ( $ entities ) ) ) ; }
Get the records for a given ContentType.

@param string     $contentTypeName
@param MutableBag $exportData
@param MutableBag $responseBag

@throws \Bolt\Exception\InvalidRepositoryException
Get the records for a given ContentType .