1 | <?php |
||
20 | class UserGroup extends APIUserGroup |
||
21 | { |
||
22 | /** |
||
23 | * Internal content representation. |
||
24 | * |
||
25 | * @var \eZ\Publish\API\Repository\Values\Content\Content |
||
26 | */ |
||
27 | protected $content; |
||
28 | |||
29 | /** |
||
30 | * Returns the VersionInfo for this version. |
||
31 | * |
||
32 | * @return \eZ\Publish\API\Repository\Values\Content\VersionInfo |
||
33 | */ |
||
34 | public function getVersionInfo() |
||
38 | |||
39 | public function getContentType(): ContentType |
||
43 | |||
44 | /** |
||
45 | * Returns a field value for the given value |
||
46 | * $version->fields[$fieldDefId][$languageCode] is an equivalent call |
||
47 | * if no language is given on a translatable field this method returns |
||
48 | * the value of the initial language of the version if present, otherwise null. |
||
49 | * On non translatable fields this method ignores the languageCode parameter. |
||
50 | * |
||
51 | * @param string $fieldDefIdentifier |
||
52 | * @param string $languageCode |
||
53 | * |
||
54 | * @return mixed a primitive type or a field type Value object depending on the field type. |
||
55 | */ |
||
56 | public function getFieldValue($fieldDefIdentifier, $languageCode = null) |
||
60 | |||
61 | /** |
||
62 | * This method returns the complete fields collection. |
||
63 | * |
||
64 | * @return \eZ\Publish\API\Repository\Values\Content\Field[] |
||
65 | */ |
||
66 | public function getFields() |
||
70 | |||
71 | /** |
||
72 | * This method returns the fields for a given language and non translatable fields. |
||
73 | * |
||
74 | * If note set the initialLanguage of the content version is used. |
||
75 | * |
||
76 | * @param string $languageCode |
||
77 | * |
||
78 | * @return \eZ\Publish\API\Repository\Values\Content\Field[] with field identifier as keys |
||
79 | */ |
||
80 | public function getFieldsByLanguage($languageCode = null) |
||
84 | |||
85 | /** |
||
86 | * This method returns the field for a given field definition identifier and language. |
||
87 | * |
||
88 | * If not set the initialLanguage of the content version is used. |
||
89 | * |
||
90 | * @param string $fieldDefIdentifier |
||
91 | * @param string|null $languageCode |
||
92 | * |
||
93 | * @return \eZ\Publish\API\Repository\Values\Content\Field|null A {@link Field} or null if nothing is found |
||
94 | */ |
||
95 | public function getField($fieldDefIdentifier, $languageCode = null) |
||
99 | |||
100 | /** |
||
101 | * Function where list of properties are returned. |
||
102 | * |
||
103 | * Override to add dynamic properties |
||
104 | * |
||
105 | * @uses \parent::getProperties() |
||
106 | * |
||
107 | * @param array $dynamicProperties |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | protected function getProperties($dynamicProperties = ['id', 'contentInfo', 'versionInfo', 'fields']) |
||
115 | |||
116 | /** |
||
117 | * Magic getter for retrieving convenience properties. |
||
118 | * |
||
119 | * @param string $property The name of the property to retrieve |
||
120 | * |
||
121 | * @return mixed |
||
122 | */ |
||
123 | public function __get($property) |
||
151 | |||
152 | /** |
||
153 | * Magic isset for signaling existence of convenience properties. |
||
154 | * |
||
155 | * @param string $property |
||
156 | * |
||
157 | * @return bool |
||
158 | */ |
||
159 | public function __isset($property) |
||
183 | |||
184 | public function getThumbnail(): ?Thumbnail |
||
188 | } |
||
189 |
If you suppress an error, we recommend checking for the error condition explicitly: