Created
April 9, 2020 20:01
-
-
Save MarioBlazek/af78002d5d66d1cbfab090bf7df3d175 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Integration\TheCatApi; | |
use AppBundle\Integration\TheCatApi\Value\TheCatApiValue; | |
use Netgen\Layouts\Item\ValueConverterInterface; | |
class TheCatApiValueConverter implements ValueConverterInterface | |
{ | |
public function supports(object $object): bool | |
{ | |
return $object instanceof TheCatApiValue; | |
} | |
public function getValueType(object $object): string | |
{ | |
return 'the_cat_api_value_type'; | |
} | |
public function getId(object $object) | |
{ | |
return $object->getId(); | |
} | |
public function getRemoteId(object $object) | |
{ | |
return $object->getId(); | |
} | |
public function getName(object $object): string | |
{ | |
return $object->getName(); | |
} | |
public function getIsVisible(object $object): bool | |
{ | |
return true; | |
} | |
public function getObject(object $object): object | |
{ | |
return $object; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment