No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace Lc\PietroBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\SovBundle\Doctrine\EntityInterface;
  5. use Lc\SovBundle\Doctrine\Extension\StatusInterface;
  6. use Lc\SovBundle\Doctrine\Extension\StatusTrait;
  7. /**
  8. * @ORM\MappedSuperclass()
  9. */
  10. abstract class AbstractData implements StatusInterface, EntityInterface
  11. {
  12. use StatusTrait;
  13. const TERRITORY = "Territory";
  14. const CATEGORY_REVOLT = "Revolt";
  15. const CATEGORY_DREAM = "Dream";
  16. const CATEGORY_PROJECTBOOST = "ProjectBoost";
  17. const CATEGORY_PROJECTINSPIRING = "ProjectInspiring";
  18. const CATEGORY_LABEL_REVOLT = "Nos révoltes";
  19. const CATEGORY_LABEL_DREAM = "Nos rêves";
  20. const CATEGORY_LABEL_PROJECTBOOST = "Les actions à booster";
  21. const CATEGORY_LABEL_PROJECTINSPIRING = "Les actions inspirantes";
  22. static function getCategory(): array
  23. {
  24. return [
  25. self::CATEGORY_LABEL_REVOLT => self::CATEGORY_REVOLT,
  26. self::CATEGORY_LABEL_DREAM => self::CATEGORY_DREAM,
  27. self::CATEGORY_LABEL_PROJECTBOOST => self::CATEGORY_PROJECTBOOST,
  28. self::CATEGORY_LABEL_PROJECTINSPIRING => self::CATEGORY_PROJECTINSPIRING,
  29. ];
  30. }
  31. static function getCategoryByLabel(string $label): string
  32. {
  33. $categoryArray = self::getCategory();
  34. return $categoryArray[$label];
  35. }
  36. }