mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Generate a context for docgen, on accompanying period
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Service\DocGenerator;
|
||||
|
||||
use Chill\DocGeneratorBundle\Context\DocGeneratorContextInterface;
|
||||
use Chill\DocGeneratorBundle\Context\Exception\UnexpectedTypeException;
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
@@ -12,16 +20,6 @@ class AccompanyingPeriodContext implements DocGeneratorContextInterface
|
||||
{
|
||||
public NormalizerInterface $normalizer;
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return 'Accompanying Period';
|
||||
}
|
||||
|
||||
public static function getKey(): string
|
||||
{
|
||||
return self::class;
|
||||
}
|
||||
|
||||
public function getData($entity): array
|
||||
{
|
||||
if (!$entity instanceof AccompanyingPeriod) {
|
||||
@@ -36,6 +34,16 @@ class AccompanyingPeriodContext implements DocGeneratorContextInterface
|
||||
// TODO: Implement getForm() method.
|
||||
}
|
||||
|
||||
public static function getKey(): string
|
||||
{
|
||||
return self::class;
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return 'Accompanying Period';
|
||||
}
|
||||
|
||||
public function hasForm(): bool
|
||||
{
|
||||
return false;
|
||||
@@ -43,6 +51,6 @@ class AccompanyingPeriodContext implements DocGeneratorContextInterface
|
||||
|
||||
public function supports(string $entityClass): bool
|
||||
{
|
||||
return $entityClass === AccompanyingPeriod::class;
|
||||
return AccompanyingPeriod::class === $entityClass;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user