Updated LinkPreviewOptions
This commit is contained in:
parent
aa62427906
commit
115379e5ab
1 changed files with 6 additions and 2 deletions
|
@ -82,10 +82,14 @@ class LinkPreviewOptions implements ObjectTypeInterface
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(array $data): ObjectTypeInterface
|
||||
public static function fromArray(?array $data): ?LinkPreviewOptions
|
||||
{
|
||||
$object = new self();
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$object = new self();
|
||||
$object->is_disabled = $data['is_disabled'] ?? false;
|
||||
$object->url = $data['url'] ?? null;
|
||||
$object->prefer_small_media = $data['prefer_small_media'] ?? false;
|
||||
|
|
Loading…
Add table
Reference in a new issue