<?php
namespace App\V4\Model\Tab;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Model\IriNormalizableInterface;
use App\Model\NormalizeAsIRITrait;
use App\Model\Traits\ImportableObjectTrait;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ApiResource(
* shortName="V4/Tab",
* attributes={
* "api_allow_update": true
* },
* collectionOperations={
* "get": {
* "path": "/V4/tabs",
* "normalization_context": {
* "groups": {"tab:list"},
* "isFromAdmin": true
* },
* "security": "is_granted(constant('App\\V4\\Voters\\TabVoter::TAB_SHOW_LIST'), 'App\V4\Voters\TabVoter')"
* },
* "post_tab": {
* "method": "POST",
* "deserialize": false,
* "write": false,
* "controller": "App\V4\Controller\Tab\TabDataPersisterAction",
* "path": "/V4/tabs",
* "input_formats": {
* "multipart": {"multipart/form-data"}
* },
* "normalization_context": {
* "groups": {"tab:read"}
* },
* "denormalization_context": {
* "groups": {}
* }
* },
* "get_form": {
* "method": "GET",
* "path": "/V4/tabs/form",
* "controller": App\V4\Controller\Tab\GetTabFormAction::class
* },
* },
* itemOperations={
* "get": {
* "path": "/V4/tabs/{id}",
* },
* "get_form": {
* "method": "GET",
* "path": "/V4/tabs/{id}/form",
* "controller": App\V4\Controller\Tab\GetTabFormAction::class,
* "normalization_context": {
* "isFromAdmin": true
* },
* },
* "put_tab": {
* "method": "POST",
* "deserialize": false,
* "write": false,
* "controller": "App\V4\Controller\Tab\TabDataPersisterAction",
* "path": "/V4/tabs/{id}",
* "input_formats": {
* "multipart": {"multipart/form-data"}
* },
* "normalization_context": {
* "groups": {"tab:read"}
* },
* "denormalization_context": {
* "groups": {}
* }
* },
* "delete_tab": {
* "method": "DELETE",
* "deserialize": false,
* "write": false,
* "controller": "App\V4\Controller\Tab\TabDataPersisterAction",
* "path": "/V4/tabs/{id}",
* "normalization_context": {
* "isFromAdmin": true
* },
* }
* }
* )
*/
class Tab implements IriNormalizableInterface
{
use ImportableObjectTrait;
use NormalizeAsIRITrait;
/**
* @ApiProperty(identifier=true)
*
* @var string|null
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $id;
/**
* @var string|null
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $customerId;
/**
* @var string|null
* @Assert\NotBlank(
* message="Ce champ ne peut pas être vide"
* )
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $savedUserSearchInfo;
/**
* @var string|null
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $searchContent;
/**
* @var string|null
*
* @Assert\NotBlank(
* message="Ce champ ne peut pas être vide"
* )
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $name;
/**
* @var string|null
*
* @Assert\NotBlank(
* message="Ce champ ne peut pas être vide"
* )
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $title;
/**
* @var string|null
*
* @Assert\NotBlank(
* message="Ce champ ne peut pas être vide"
* )
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $slug;
/**
* @var string|null
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $searchType;
/**
* @var string|null
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $groupLabel;
/**
* @var bool
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $isDisabledDisplaySublist = false;
/**
* @var int|null
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $position = 0;
/**
* @var string|null
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $role;
/**
* @var bool
*
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $isRoleNeeded = false;
/**
* @var string|null
*
* @Groups({
* "list",
* "read",
* "tab:list",
* "tab:read",
* "tab:write",
* "tab:update"
* })
*/
private $badgeId;
/**
* @return string|null
*/
public function getId(): ?string
{
return $this->id;
}
/**
* @param string|null $id
*
* @return Tab
*/
public function setId(?string $id): Tab
{
$this->id = $id;
return $this;
}
/**
* @return string|null
*/
public function getCustomerId(): ?string
{
return $this->customerId;
}
/**
* @param string|null $customerId
*
* @return Tab
*/
public function setCustomerId(?string $customerId): Tab
{
$this->customerId = $customerId;
return $this;
}
/**
* @return string|null
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param string|null $name
*
* @return Tab
*/
public function setName(?string $name): Tab
{
$this->name = $name;
return $this;
}
/**
* @return string|null
*/
public function getSavedUserSearchInfo(): ?string
{
return $this->savedUserSearchInfo;
}
/**
* @param string|null $savedUserSearchInfo
*
* @return Tab
*/
public function setSavedUserSearchInfo(?string $savedUserSearchInfo): self
{
$this->savedUserSearchInfo = $savedUserSearchInfo;
return $this;
}
/**
* @return string|null
*/
public function getSearchContent(): ?string
{
return $this->searchContent;
}
/**
* @param string|null $searchContent
*
* @return Tab
*/
public function setSearchContent(?string $searchContent): Tab
{
$this->searchContent = $searchContent;
return $this;
}
/**
* @return string|null
*/
public function getTitle(): ?string
{
return $this->title;
}
/**
* @param string|null $title
*
* @return Tab
*/
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
/**
* @return string|null
*/
public function getSlug(): ?string
{
return $this->slug;
}
/**
* @param string|null $slug
*
* @return Tab
*/
public function setSlug(?string $slug): self
{
$this->slug = $slug;
return $this;
}
/**
* @return string|null
*/
public function getSearchType(): ?string
{
return $this->searchType;
}
/**
* @param string|null $searchType
*
* @return Tab
*/
public function setSearchType(?string $searchType): self
{
$this->searchType = $searchType;
return $this;
}
/**
* @return string|null
*/
public function getGroupLabel(): ?string
{
return $this->groupLabel;
}
/**
* @param string|null $groupLabel
*
* @return Tab
*/
public function setGroupLabel(?string $groupLabel): self
{
$this->groupLabel = $groupLabel;
return $this;
}
/**
* @return bool
*/
public function getIsDisabledDisplaySublist(): bool
{
return $this->isDisabledDisplaySublist;
}
/**
* @param bool $isDisabledDisplaySublist
*
* @return Tab
*/
public function setIsDisabledDisplaySublist(bool $isDisabledDisplaySublist): self
{
$this->isDisabledDisplaySublist = $isDisabledDisplaySublist;
return $this;
}
/**
* @return int|null
*/
public function getPosition(): ?int
{
return $this->position;
}
/**
* @param int|null $position
*
* @return Tab
*/
public function setPosition(?int $position): self
{
$this->position = $position;
return $this;
}
/**
* @return string|null
*/
public function getRole(): ?string
{
return $this->role;
}
/**
* @param string|null $role
*
* @return Tab
*/
public function setRole(?string $role): self
{
$this->role = $role;
return $this;
}
/**
* @return bool
*/
public function isRoleNeeded(): bool
{
return $this->isRoleNeeded;
}
/**
* @param bool $isRoleNeeded
*
* @return Tab
*/
public function setIsRoleNeeded(bool $isRoleNeeded): self
{
$this->isRoleNeeded = $isRoleNeeded;
return $this;
}
/**
* @return string|null
*/
public function getBadgeId(): ?string
{
return $this->badgeId;
}
/**
* @param string|null $badgeId
*
* @return Tab
*/
public function setBadgeId(?string $badgeId): self
{
$this->badgeId = $badgeId;
return $this;
}
}