File tree 1 file changed +4
-4
lines changed
Documentation/Tutorials/UsageOfAddressRepository
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,18 +13,18 @@ All you need to do is adopt the following code to your needs:
13
13
14
14
<?php
15
15
16
- $addressRepository = $this->objectManager->get (\FriendsOfTYPO3\TtAddress\Domain\Repository\AddressRepository::class);
16
+ $addressRepository = GeneralUtility::makeInstance (\FriendsOfTYPO3\TtAddress\Domain\Repository\AddressRepository::class);
17
17
18
18
// single selection
19
19
// which means: output addresses in given order
20
- $demand = $this->objectManager->get( \FriendsOfTYPO3\TtAddress\Domain\Model\Dto\Demand::class );
20
+ $demand = new \FriendsOfTYPO3\TtAddress\Domain\Model\Dto\Demand( );
21
21
$demand->setSingleRecords('12,34'); // Ids of tt_address records;
22
22
$addresses = $addressRepository->getAddressesByCustomSorting($demand);
23
23
24
24
// list action
25
- $demand = $this->objectManager->get( \FriendsOfTYPO3\TtAddress\Domain\Model\Dto\Demand::class );
25
+ $demand = new \FriendsOfTYPO3\TtAddress\Domain\Model\Dto\Demand( );
26
26
$demand->setPages(['12']); // list of pages where records are saved
27
- $demand->setCategories('1,3') // list of categories desired address records need to be assigned to
27
+ $demand->setCategories('1,3'); // list of categories desired address records need to be assigned to
28
28
$demand->setCategoryCombination('or'); // combine given categories either by "or" or "and"
29
29
$demand->setSortBy('last_name'); // order field
30
30
$demand->setSortOrder('asc');
You can’t perform that action at this time.
0 commit comments