@@ -2,15 +2,15 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Netgen\Bundle\InformationCollectionBundle\Controller\Admin; |
| 4 | 4 | |
| 5 | -use eZ\Bundle\EzPublishCoreBundle\Controller; |
|
| 6 | -use eZ\Publish\API\Repository\ContentService; |
|
| 7 | -use Netgen\InformationCollection\API\Service\Exporter; |
|
| 5 | +use League\Csv\Writer; |
|
| 8 | 6 | use Netgen\Bundle\InformationCollectionBundle\API\Value\Export\ExportCriteria; |
| 9 | 7 | use Netgen\Bundle\InformationCollectionBundle\Form\Type\ExportType; |
| 10 | -use Symfony\Component\HttpFoundation\Request; |
|
| 11 | -use League\Csv\Writer; |
|
| 8 | +use Netgen\InformationCollection\API\Service\Exporter; |
|
| 12 | 9 | use SplTempFileObject; |
| 10 | +use Symfony\Component\HttpFoundation\Request; |
|
| 13 | 11 | use Symfony\Component\HttpFoundation\Response; |
| 12 | +use eZ\Bundle\EzPublishCoreBundle\Controller; |
|
| 13 | +use eZ\Publish\API\Repository\ContentService; |
|
| 14 | 14 | |
| 15 | 15 | final class ExportController extends Controller |
| 16 | 16 | { |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Netgen\Bundle\InformationCollectionBundle\DependencyInjection; |
| 4 | 4 | |
| 5 | -use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\Configuration as SiteAccessConfiguration; |
|
| 6 | -use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
| 7 | 5 | use Symfony\Component\Config\Definition\Builder\NodeBuilder; |
| 6 | +use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
| 7 | +use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\Configuration as SiteAccessConfiguration; |
|
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * This is the class that validates and merges configuration from your app/config files. |
@@ -14,16 +14,14 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * Creates Information collection Form object for given Location object. |
| 16 | 16 | * |
| 17 | - * @param \eZ\Publish\API\Repository\Values\Content\Location $location |
|
| 18 | 17 | * |
| 19 | - * @return \Symfony\Component\Form\FormBuilderInterface |
|
| 18 | + * @return FormInterface |
|
| 20 | 19 | */ |
| 21 | 20 | public function createForm(Content $content): FormInterface; |
| 22 | 21 | |
| 23 | 22 | /** |
| 24 | 23 | * Creates Information collection Form object for given Location object. |
| 25 | 24 | * |
| 26 | - * @param \eZ\Publish\API\Repository\Values\Content\Location $location |
|
| 27 | 25 | * |
| 28 | 26 | * @return \Symfony\Component\Form\FormBuilderInterface |
| 29 | 27 | */ |
@@ -4,10 +4,10 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Netgen\InformationCollection\API\Form; |
| 6 | 6 | |
| 7 | -use eZ\Publish\API\Repository\Values\Content\Content; |
|
| 8 | -use eZ\Publish\API\Repository\Values\Content\Location; |
|
| 9 | 7 | use Symfony\Component\Form\FormBuilderInterface; |
| 10 | 8 | use Symfony\Component\Form\FormInterface; |
| 9 | +use eZ\Publish\API\Repository\Values\Content\Content; |
|
| 10 | +use eZ\Publish\API\Repository\Values\Content\Location; |
|
| 11 | 11 | |
| 12 | 12 | interface DynamicFormBuilderInterface |
| 13 | 13 | { |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Netgen\InformationCollection\API; |
| 4 | 4 | |
| 5 | +use Netgen\InformationCollection\API\Value\Event\InformationCollected; |
|
| 5 | 6 | use eZ\Publish\Core\MVC\Symfony\View\ContentValueView; |
| 6 | 7 | use eZ\Publish\Core\MVC\Symfony\View\LocationValueView; |
| 7 | -use Netgen\InformationCollection\API\Value\Event\InformationCollected; |
|
| 8 | 8 | //use Netgen\InformationCollection\API\Events; |
| 9 | -use Symfony\Component\HttpFoundation\Request; |
|
| 10 | 9 | use Netgen\InformationCollection\API\Form\DynamicFormBuilderInterface; |
| 10 | +use Symfony\Component\HttpFoundation\Request; |
|
| 11 | 11 | |
| 12 | 12 | trait InformationCollectionTrait |
| 13 | 13 | { |
@@ -5,18 +5,17 @@ |
||
| 5 | 5 | namespace Netgen\InformationCollection\Core\Action; |
| 6 | 6 | |
| 7 | 7 | use Doctrine\DBAL\DBALException; |
| 8 | -use eZ\Publish\API\Repository\Repository; |
|
| 9 | -use eZ\Publish\Core\Repository\Values\Content\Content; |
|
| 10 | -use Netgen\InformationCollection\Doctrine\Entity\EzInfoCollection; |
|
| 11 | -use Netgen\InformationCollection\API\Value\Event\InformationCollected; |
|
| 12 | 8 | use Netgen\InformationCollection\API\Exception\ActionFailedException; |
| 9 | +use Netgen\InformationCollection\API\Value\Event\InformationCollected; |
|
| 13 | 10 | use Netgen\InformationCollection\Core\Factory\FieldDataFactory; |
| 11 | +use Netgen\InformationCollection\Doctrine\Entity\EzInfoCollection; |
|
| 14 | 12 | use Netgen\InformationCollection\Doctrine\Repository\EzInfoCollectionAttributeRepository; |
| 15 | 13 | use Netgen\InformationCollection\Doctrine\Repository\EzInfoCollectionRepository; |
| 14 | +use eZ\Publish\API\Repository\Repository; |
|
| 15 | +use eZ\Publish\Core\Repository\Values\Content\Content; |
|
| 16 | 16 | |
| 17 | 17 | use Netgen\InformationCollection\API\Action\ActionInterface; |
| 18 | 18 | use Netgen\InformationCollection\API\Action\CrucialActionInterface; |
| 19 | -use Netgen\InformationCollection\API\Value\Legacy\FieldValue; |
|
| 20 | 19 | |
| 21 | 20 | class DatabaseAction implements ActionInterface, CrucialActionInterface |
| 22 | 21 | { |
@@ -5,8 +5,8 @@ |
||
| 5 | 5 | namespace Netgen\InformationCollection\Core\Mailer; |
| 6 | 6 | |
| 7 | 7 | use Netgen\InformationCollection\API\Exception\EmailNotSentException; |
| 8 | -use Netgen\InformationCollection\API\Value\DataTransfer\EmailContent; |
|
| 9 | 8 | use Netgen\InformationCollection\API\Mailer\MailerInterface; |
| 9 | +use Netgen\InformationCollection\API\Value\DataTransfer\EmailContent; |
|
| 10 | 10 | |
| 11 | 11 | class Mailer implements MailerInterface |
| 12 | 12 | { |
@@ -4,13 +4,13 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Netgen\Bundle\InformationCollectionBundle\Core\Persistence\Anonymizer; |
| 6 | 6 | |
| 7 | -use eZ\Publish\API\Repository\Repository; |
|
| 8 | -use eZ\Publish\API\Repository\Values\ContentType\ContentType; |
|
| 9 | 7 | use Netgen\Bundle\InformationCollectionBundle\API\Persistence\Anonymizer\Anonymizer; |
| 10 | 8 | use Netgen\Bundle\InformationCollectionBundle\API\Persistence\Anonymizer\Visitor\FieldAnonymizerVisitor; |
| 11 | 9 | use Netgen\Bundle\InformationCollectionBundle\Entity\EzInfoCollection; |
| 12 | 10 | use Netgen\Bundle\InformationCollectionBundle\Repository\EzInfoCollectionAttributeRepository; |
| 13 | 11 | use Netgen\Bundle\InformationCollectionBundle\Repository\EzInfoCollectionRepository; |
| 12 | +use eZ\Publish\API\Repository\Repository; |
|
| 13 | +use eZ\Publish\API\Repository\Values\ContentType\ContentType; |
|
| 14 | 14 | |
| 15 | 15 | class AnonymizerService implements Anonymizer |
| 16 | 16 | { |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * |
| 50 | 50 | * @param int $contentId Content id |
| 51 | 51 | * @param array $fields Fields list |
| 52 | - * @param DateTime|null $date Anonymize collections older that this date |
|
| 52 | + * @param null|\DateTimeImmutable $date Anonymize collections older that this date |
|
| 53 | 53 | * |
| 54 | 54 | * @return int |
| 55 | 55 | */ |
@@ -73,9 +73,8 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * Map field id's to list of field identifiers. |
| 75 | 75 | * |
| 76 | - * @param int $content |
|
| 77 | 76 | * @param array $fieldIdentifiers |
| 78 | - * @param mixed $contentId |
|
| 77 | + * @param integer $contentId |
|
| 79 | 78 | * |
| 80 | 79 | * @return array |
| 81 | 80 | */ |
@@ -93,6 +92,9 @@ discard block |
||
| 93 | 92 | return $ids; |
| 94 | 93 | } |
| 95 | 94 | |
| 95 | + /** |
|
| 96 | + * @param integer $contentId |
|
| 97 | + */ |
|
| 96 | 98 | private function getCollections($contentId, \DateTimeImmutable $date = null) |
| 97 | 99 | { |
| 98 | 100 | if (null === $date) { |
@@ -4,7 +4,6 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace Netgen\InformationCollection\Core\Service; |
| 6 | 6 | |
| 7 | -use eZ\Publish\API\Repository\Repository; |
|
| 8 | 7 | use Netgen\Bundle\InformationCollectionBundle\API\Service\InformationCollection; |
| 9 | 8 | use Netgen\Bundle\InformationCollectionBundle\API\Value\InformationCollection\Attribute; |
| 10 | 9 | use Netgen\Bundle\InformationCollectionBundle\API\Value\InformationCollection\Collection; |
@@ -16,6 +15,7 @@ discard block |
||
| 16 | 15 | use Netgen\Bundle\InformationCollectionBundle\Entity\EzInfoCollectionAttribute; |
| 17 | 16 | use Netgen\Bundle\InformationCollectionBundle\Repository\EzInfoCollectionAttributeRepository; |
| 18 | 17 | use Netgen\Bundle\InformationCollectionBundle\Repository\EzInfoCollectionRepository; |
| 18 | +use eZ\Publish\API\Repository\Repository; |
|
| 19 | 19 | |
| 20 | 20 | class InformationCollectionService implements InformationCollection |
| 21 | 21 | { |