Skip to content

Commit

Permalink
Merge branch 'main' into refactoring/OP-466-change-select-to-autocomp…
Browse files Browse the repository at this point in the history
…lete
  • Loading branch information
senghe authored Aug 13, 2024
2 parents 3a33b69 + 0b4552d commit d86a0b6
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,38 @@ Define new Entity mapping inside your src/Resources/config/doctrine directory.
</doctrine-mapping>
```

Or edit Customer Entity this way if you use attributes:

```php
<?php

declare(strict_types=1);

namespace App\Entity\Customer;

use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Customer as BaseCustomer;

#[ORM\Entity]
#[ORM\Table(name: 'sylius_customer')]
class Customer extends BaseCustomer implements CustomerInterface
{
#[ORM\Column(type: 'string', nullable: false)]
protected $fraudStatus = FraudStatusInterface::FRAUD_STATUS_NEUTRAL;

public function getFraudStatus(): ?string
{
return $this->fraudStatus;
}

public function setFraudStatus(?string $fraudStatus): void
{
$this->fraudStatus = $fraudStatus;
}
}

```

Or edit Customer Entity this way if you use annotations:

```php
Expand All @@ -119,7 +151,6 @@ declare(strict_types=1);
namespace App\Entity\Customer;

use Doctrine\ORM\Mapping as ORM;
use BitBag\SyliusBlacklistPlugin\Entity\Customer\FraudStatusInterface;use BitBag\SyliusBlacklistPlugin\Model\FraudStatusTrait;
use Sylius\Component\Core\Model\Customer as BaseCustomer;

/**
Expand Down Expand Up @@ -243,7 +274,7 @@ when@test_cached:
```

Override Customer form template (`@SyliusAdminBundle\Customer\_form.html.twig`) by adding lines below
Override Customer form template (`@SyliusAdminBundle\Customer\_form.html.twig` or `@SyliusAdminBundle/Customer/Form/_firstColumn.html.twig`) by adding lines below

```html
<div class="ui segment">
Expand Down

0 comments on commit d86a0b6

Please sign in to comment.