Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Classes/Domain/Model/Order/AbstractAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
* LICENSE file that was distributed with this source code.
*/

use TYPO3\CMS\Extbase\Annotation\ORM\Lazy;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;

abstract class AbstractAddress extends AbstractEntity
{
protected ?Item $item = null;
#[Lazy]
protected LazyLoadingProxy|Item|null $item = null;

protected string $title = '';

Expand Down Expand Up @@ -72,6 +75,10 @@ public function toArray(): array

public function getItem(): ?Item
{
if ($this->item instanceof LazyLoadingProxy) {
$this->item->_loadRealInstance();
}

return $this->item;
}

Expand Down
9 changes: 8 additions & 1 deletion Classes/Domain/Model/Order/AbstractService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
* LICENSE file that was distributed with this source code.
*/

use TYPO3\CMS\Extbase\Annotation\ORM\Lazy;
use TYPO3\CMS\Extbase\Annotation\Validate;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;

abstract class AbstractService extends AbstractEntity
{
protected ?Item $item = null;
#[Lazy]
protected LazyLoadingProxy|Item|null $item = null;

protected string $serviceCountry = '';

Expand Down Expand Up @@ -65,6 +68,10 @@ public function toArray(): array

public function getItem(): ?Item
{
if ($this->item instanceof LazyLoadingProxy) {
$this->item->_loadRealInstance();
}

return $this->item;
}

Expand Down
9 changes: 8 additions & 1 deletion Classes/Domain/Model/Order/Discount.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
*/

use Extcode\Cart\Domain\Model\Cart\TaxClass;
use TYPO3\CMS\Extbase\Annotation\ORM\Lazy;
use TYPO3\CMS\Extbase\Annotation\Validate;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;

class Discount extends AbstractEntity
{
protected Item $item;
#[Lazy]
protected LazyLoadingProxy|Item $item;

public function __construct(
#[Validate(['validator' => 'NotEmpty'])]
Expand All @@ -36,6 +39,10 @@ public function __construct(

public function getItem(): ?Item
{
if ($this->item instanceof LazyLoadingProxy) {
$this->item->_loadRealInstance();
}

return $this->item;
}

Expand Down
9 changes: 8 additions & 1 deletion Classes/Domain/Model/Order/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
* LICENSE file that was distributed with this source code.
*/

use TYPO3\CMS\Extbase\Annotation\ORM\Lazy;
use TYPO3\CMS\Extbase\Annotation\Validate;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;

class Product extends AbstractEntity
{
protected Item $item;
#[Lazy]
protected LazyLoadingProxy|Item $item;

protected int $productId = 0;

Expand Down Expand Up @@ -74,6 +77,10 @@ protected function initStorageObjects(): void

public function getItem(): ?Item
{
if ($this->item instanceof LazyLoadingProxy) {
$this->item->_loadRealInstance();
}

return $this->item;
}

Expand Down
4 changes: 2 additions & 2 deletions Documentation/guides.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
interlink-shortcode="extcode/cart"
/>
<project title="Cart"
release="10.2.12"
version="10.2"
release="10.3.0"
version="10.3"
copyright="2018 - 2024"
/>
<inventory id="t3tsref" url="https://docs.typo3.org/typo3cms/TyposcriptReference/"/>
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'title' => 'Cart',
'description' => 'Shopping Cart(s) for TYPO3',
'category' => 'plugin',
'version' => '10.2.12',
'version' => '10.3.0',
'state' => 'stable',
'author' => 'Daniel Gohlke',
'author_email' => 'ext@extco.de',
Expand Down