1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace App\Entity;
- use ApiPlatform\Core\Annotation\ApiFilter;
- use ApiPlatform\Core\Annotation\ApiProperty;
- use ApiPlatform\Core\Annotation\ApiResource;
- use App\Http\WebflowApi\WebflowApiCollectionItem;
- use App\Filter\SearchFilter;
- /**
- * @ApiResource(
- * collectionOperations={"get", "post"},
- * itemOperations={"get"}
- * )
- * @ApiFilter(SearchFilter::class, properties={"cid": "exact"})
- */
- class WebflowItem extends AbstractEntity {
- /**
- * @ApiProperty(identifier=true)
- */
- protected $id;
- private $cid;
- private $reCaptcha = null;
- protected $archived;
- protected $draft;
- public function __construct(WebflowApiCollectionItem $webflowApiCollectionItem) {
- $this->setFromData($webflowApiCollectionItem->data);
- }
- public function getId(): ?string {
- return $this->id;
- }
- public function getCid(): ?string {
- return $this->cid;
- }
- public function setCid(string $cid): self {
- $this->cid = $cid;
- return $this;
- }
- public function getArchived(): bool {
- return $this->archived;
- }
- public function getDraft(): bool {
- return $this->draft;
- }
- public function setReCaptcha(string $value) {
- $this->reCaptcha = $value;
- }
- }
|