|
- <?php
-
- namespace Lc\PietroBundle\Model;
-
- use Doctrine\ORM\Mapping as ORM;
- use Lc\SovBundle\Doctrine\EntityInterface;
- use Lc\SovBundle\Doctrine\Extension\StatusInterface;
- use Lc\SovBundle\Doctrine\Extension\StatusTrait;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class AbstractData implements StatusInterface, EntityInterface
- {
- use StatusTrait;
-
- const TERRITORY = "Territory";
- const CATEGORY_REVOLT = "Revolt";
- const CATEGORY_DREAM = "Dream";
- const CATEGORY_PROJECTBOOST = "ProjectBoost";
- const CATEGORY_PROJECTINSPIRING = "ProjectInspiring";
-
- const CATEGORY_LABEL_REVOLT = "Nos révoltes";
- const CATEGORY_LABEL_DREAM = "Nos rêves";
- const CATEGORY_LABEL_PROJECTBOOST = "Les actions à booster";
- const CATEGORY_LABEL_PROJECTINSPIRING = "Les actions inspirantes";
-
- static function getCategory(): array
- {
- return [
- self::CATEGORY_LABEL_REVOLT => self::CATEGORY_REVOLT,
- self::CATEGORY_LABEL_DREAM => self::CATEGORY_DREAM,
- self::CATEGORY_LABEL_PROJECTBOOST => self::CATEGORY_PROJECTBOOST,
- self::CATEGORY_LABEL_PROJECTINSPIRING => self::CATEGORY_PROJECTINSPIRING,
- ];
- }
-
- static function getCategoryByLabel(string $label): string
- {
- $categoryArray = self::getCategory();
-
- return $categoryArray[$label];
- }
- }
|