StatusService.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace Drupal\statusmessage;
  3. use Drupal\Core\Database\Driver\mysql\Connection;
  4. use Drupal\Core\Entity\EntityTypeManager;
  5. use Drupal\Core\Entity\Query\QueryFactory;
  6. use Drupal\Core\Database\Database;
  7. use Drupal\flag\FlagService;
  8. /**
  9. * Class StatusService.
  10. *
  11. * @package Drupal\statusmessage
  12. */
  13. class StatusService {
  14. /**
  15. * Drupal\Core\Entity\EntityTypeManager definition.
  16. *
  17. * @var Drupal\Core\Entity\EntityTypeManager
  18. */
  19. protected $entity_type_manager;
  20. /**
  21. * Drupal\Core\Entity\Query\QueryFactory definition.
  22. *
  23. * @var Drupal\Core\Entity\Query\QueryFactory
  24. */
  25. protected $entity_query;
  26. /**
  27. * Drupal\flag\FlagService definition.
  28. *
  29. * @var Drupal\flag\FlagService
  30. */
  31. protected $flag;
  32. /**
  33. * Constructor.
  34. */
  35. public function __construct(EntityTypeManager $entity_type_manager, QueryFactory $entity_query, FlagService $flag) {
  36. $this->entity_type_manager = $entity_type_manager;
  37. $this->entity_query = $entity_query;
  38. $this->flag = $flag;
  39. }
  40. public function getMimeTypes() {
  41. return ['image/jpeg', 'image/png', 'application/octet-stream', 'video/mp4', 'text/plain', 'application/pdf', 'image/gif'];
  42. }
  43. }