Skip to content

Commit 455bf98

Browse files
committed
Add defaults to asset types
1 parent b3dcda5 commit 455bf98

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Model/ImageAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function getModelName()
183183
*/
184184
public function __construct(array $data = null)
185185
{
186-
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
186+
$this->container['type'] = isset($data['type']) ? $data['type'] : 'image';
187187
$this->container['src'] = isset($data['src']) ? $data['src'] : null;
188188
}
189189

src/Model/TitleAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function getStyleAllowableValues()
209209
*/
210210
public function __construct(array $data = null)
211211
{
212-
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
212+
$this->container['type'] = isset($data['type']) ? $data['type'] : 'title';
213213
$this->container['text'] = isset($data['text']) ? $data['text'] : null;
214214
$this->container['style'] = isset($data['style']) ? $data['style'] : null;
215215
}

src/Model/VideoAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function getModelName()
193193
*/
194194
public function __construct(array $data = null)
195195
{
196-
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
196+
$this->container['type'] = isset($data['type']) ? $data['type'] : 'video';
197197
$this->container['src'] = isset($data['src']) ? $data['src'] : null;
198198
$this->container['trim'] = isset($data['trim']) ? $data['trim'] : null;
199199
$this->container['volume'] = isset($data['volume']) ? $data['volume'] : null;

0 commit comments

Comments
 (0)