BitmaskedComment.php 797 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace TestApp\Model\Entity;
  3. use Tools\Model\Entity\Entity;
  4. class BitmaskedComment extends Entity {
  5. /**
  6. * @param mixed|null $value
  7. * @return mixed
  8. */
  9. public static function statuses($value = null) {
  10. $options = [
  11. static::STATUS_ACTIVE => __d('tools', 'Active'),
  12. static::STATUS_PUBLISHED => __d('tools', 'Published'),
  13. static::STATUS_APPROVED => __d('tools', 'Approved'),
  14. static::STATUS_FLAGGED => __d('tools', 'Flagged'),
  15. ];
  16. return parent::enum($value, $options);
  17. }
  18. /**
  19. * @var int
  20. */
  21. public const STATUS_NONE = 0;
  22. /**
  23. * @var int
  24. */
  25. public const STATUS_ACTIVE = 1;
  26. /**
  27. * @var int
  28. */
  29. public const STATUS_PUBLISHED = 2;
  30. /**
  31. * @var int
  32. */
  33. public const STATUS_APPROVED = 4;
  34. /**
  35. * @var int
  36. */
  37. public const STATUS_FLAGGED = 8;
  38. }