BitmaskedComment.php 643 B

123456789101112131415161718192021222324252627282930
  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. const STATUS_NONE = 0;
  19. const STATUS_ACTIVE = 1;
  20. const STATUS_PUBLISHED = 2;
  21. const STATUS_APPROVED = 4;
  22. const STATUS_FLAGGED = 8;
  23. }