Skip to content

Instantly share code, notes, and snippets.

@MarioBlazek
Created April 9, 2020 20:01
Show Gist options
  • Save MarioBlazek/af78002d5d66d1cbfab090bf7df3d175 to your computer and use it in GitHub Desktop.
Save MarioBlazek/af78002d5d66d1cbfab090bf7df3d175 to your computer and use it in GitHub Desktop.
<?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