-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathRelatedElementData.php
More file actions
82 lines (71 loc) · 2.29 KB
/
Copy pathRelatedElementData.php
File metadata and controls
82 lines (71 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
declare(strict_types=1);
/**
* This source file is available under the terms of the
* Pimcore Open Core License (POCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
* @license Pimcore Open Core License (POCL)
*/
namespace Pimcore\Bundle\StudioBackendBundle\Element\Schema;
use OpenApi\Attributes\Property;
use OpenApi\Attributes\Schema;
/**
* @internal
*/
#[Schema(
schema: 'RelatedElementData',
title: 'RelatedElementData',
required: ['id', 'type', 'subtype', 'fullPath', 'isPublished', 'hasAccess', 'canEdit'],
type: 'object'
)]
final readonly class RelatedElementData
{
public function __construct(
#[Property(description: 'ID', type: 'integer', example: 83)]
private int $id,
#[Property(description: 'Type of the element', type: 'string', example: 'object')]
private string $type,
#[Property(description: 'Subtype of the element', type: 'string', example: 'Product')]
private string $subtype,
#[Property(description: 'Full path of the element', type: 'string', example: '/path/to/element')]
private string $fullPath,
#[Property(description: 'Is the element published', type: 'boolean', example: true)]
private ?bool $isPublished = null,
#[Property(description: 'Whether the current user has view access to the element', type: 'boolean', example: true)]
private bool $hasAccess = true,
#[Property(description: 'Whether the current user has save or publish permission on the element', type: 'boolean', example: true)]
private bool $canEdit = true,
) {
}
public function getId(): int
{
return $this->id;
}
public function getType(): string
{
return $this->type;
}
public function getSubtype(): string
{
return $this->subtype;
}
public function getFullPath(): string
{
return $this->fullPath;
}
public function getIsPublished(): ?bool
{
return $this->isPublished;
}
public function getHasAccess(): bool
{
return $this->hasAccess;
}
public function getCanEdit(): bool
{
return $this->canEdit;
}
}