1 | <?php |
||
31 | class ContentInfo extends ValueObject |
||
32 | { |
||
33 | const STATUS_DRAFT = 0; |
||
34 | const STATUS_PUBLISHED = 1; |
||
35 | const STATUS_TRASHED = 2; |
||
36 | |||
37 | /** |
||
38 | * The unique id of the Content object. |
||
39 | * |
||
40 | * @var mixed |
||
41 | */ |
||
42 | protected $id; |
||
43 | |||
44 | /** |
||
45 | * The Content Type id of the Content object. |
||
46 | * |
||
47 | * @var mixed |
||
48 | */ |
||
49 | protected $contentTypeId; |
||
50 | |||
51 | /** |
||
52 | * The computed name (via name schema) in the main language of the Content object. |
||
53 | * |
||
54 | * For names in other languages then main see {@see \eZ\Publish\API\Repository\Values\Content\VersionInfo} |
||
55 | * |
||
56 | * @var string |
||
57 | */ |
||
58 | protected $name; |
||
59 | |||
60 | /** |
||
61 | * The section to which the Content object is assigned. |
||
62 | * |
||
63 | * @var mixed |
||
64 | */ |
||
65 | protected $sectionId; |
||
66 | |||
67 | /** |
||
68 | * Current Version number is the version number of the published version or the version number of |
||
69 | * a newly created draft (which is 1). |
||
70 | * |
||
71 | * @var int |
||
72 | */ |
||
73 | protected $currentVersionNo; |
||
74 | |||
75 | /** |
||
76 | * True if there exists a published version, false otherwise. |
||
77 | * |
||
78 | * @var bool Constant. |
||
79 | */ |
||
80 | protected $published; |
||
81 | |||
82 | /** |
||
83 | * The owner of the Content object. |
||
84 | * |
||
85 | * @var mixed |
||
86 | */ |
||
87 | protected $ownerId; |
||
88 | |||
89 | /** |
||
90 | * Content modification date. |
||
91 | * |
||
92 | * @var \DateTime |
||
93 | */ |
||
94 | protected $modificationDate; |
||
95 | |||
96 | /** |
||
97 | * Content publication date. |
||
98 | * |
||
99 | * @var \DateTime |
||
100 | */ |
||
101 | protected $publishedDate; |
||
102 | |||
103 | /** |
||
104 | * Indicates if the Content object is shown in the mainlanguage if its not present in an other requested language. |
||
105 | * |
||
106 | * @var bool |
||
107 | */ |
||
108 | protected $alwaysAvailable; |
||
109 | |||
110 | /** |
||
111 | * Remote identifier used as a custom identifier for the object. |
||
112 | * |
||
113 | * @var string |
||
114 | */ |
||
115 | protected $remoteId; |
||
116 | |||
117 | /** |
||
118 | * The main language code of the Content object. |
||
119 | * |
||
120 | * @var string |
||
121 | */ |
||
122 | protected $mainLanguageCode; |
||
123 | |||
124 | /** |
||
125 | * Identifier of the main location. |
||
126 | * |
||
127 | * If the Content object has multiple locations, |
||
128 | * $mainLocationId will point to the main one. |
||
129 | * |
||
130 | * @var mixed |
||
131 | */ |
||
132 | protected $mainLocationId; |
||
133 | |||
134 | /** |
||
135 | * Status of the content. |
||
136 | * |
||
137 | * Replaces deprecated API\ContentInfo::$published. |
||
138 | * |
||
139 | * @var int |
||
140 | */ |
||
141 | protected $status; |
||
142 | |||
143 | /** |
||
144 | * @return bool |
||
145 | */ |
||
146 | public function isDraft() |
||
150 | |||
151 | /** |
||
152 | * @return bool |
||
153 | */ |
||
154 | public function isPublished() |
||
158 | |||
159 | /** |
||
160 | * @return bool |
||
161 | */ |
||
162 | public function isTrashed() |
||
166 | } |
||
167 |