diff --git a/composer.json b/composer.json index eb632de..27c2f3e 100644 --- a/composer.json +++ b/composer.json @@ -6,10 +6,11 @@ "license": "GPL-2.0+", "require": { "cweagans/composer-patches": "~1.0", - "drupal/panelizer": "4.1", + "drupal/panelizer": "^4.4", + "drupal/panels": "^4.6", "drupal/ckeditor_font": "^1.0", "drupal/dynamic_entity_reference": "^1.7", - "drupal/duration_field": "^1.6" + "drupal/duration_field": "^2.0" }, "minimum-stability": "dev", "repositories": [ @@ -17,15 +18,5 @@ "type": "composer", "url": "https://packages.drupal.org/8" } - ], - "extra": { - "patches": { - "drupal/duration_field": { - "2978206 - Undefined index: #states in drupal_process_states()": "https://www.drupal.org/files/issues/2018-06-08/2978206-2.patch" - }, - "drupal/panels": { - "2895962 - Add \"methods\" to Panels IPE routes to support Drupal 8.4.0 / Symfony 3.x": "https://www.drupal.org/files/issues/panels-deprecate-method.patch" - } - } - } + ] } diff --git a/modules/ds_datetime_range/ds_datetime_range.info.yml b/modules/ds_datetime_range/ds_datetime_range.info.yml index d23b054..d0620b6 100644 --- a/modules/ds_datetime_range/ds_datetime_range.info.yml +++ b/modules/ds_datetime_range/ds_datetime_range.info.yml @@ -2,6 +2,7 @@ name: Digital Signage Datetime Range type: module description: Datetime Range cusomizations. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - datetime_range + - drupal:datetime_range diff --git a/modules/openy_digital_signage_alerts/openy_digital_signage_alerts.info.yml b/modules/openy_digital_signage_alerts/openy_digital_signage_alerts.info.yml index fba658e..375f720 100644 --- a/modules/openy_digital_signage_alerts/openy_digital_signage_alerts.info.yml +++ b/modules/openy_digital_signage_alerts/openy_digital_signage_alerts.info.yml @@ -2,7 +2,8 @@ name: Open Y Digital Signage Alerts type: module description: Digital Signage Alerts. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - openy_digital_signage_screen - - openy_node_alert + - openy_node_alert:openy_node_alert diff --git a/modules/openy_digital_signage_classes_schedule/modules/openy_digital_signage_groupex_schedule/openy_digital_signage_groupex_schedule.info.yml b/modules/openy_digital_signage_classes_schedule/modules/openy_digital_signage_groupex_schedule/openy_digital_signage_groupex_schedule.info.yml index b48c6d0..851cbfc 100644 --- a/modules/openy_digital_signage_classes_schedule/modules/openy_digital_signage_groupex_schedule/openy_digital_signage_groupex_schedule.info.yml +++ b/modules/openy_digital_signage_classes_schedule/modules/openy_digital_signage_groupex_schedule/openy_digital_signage_groupex_schedule.info.yml @@ -2,9 +2,10 @@ name: OpenY Digital Signage GroupEx Pro Classes Schedule type: module description: OpenY Digital Signage GroupEx Pro Classes Schedule. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - openy_digital_signage_classes_schedule - - openy_digital_signage_room - - ymca_mappings - - ymca_groupex + - openy_digital_signage_room:openy_digital_signage_room + - ymca_mappings:ymca_mappings + - ymca_groupex:ymca_groupex diff --git a/modules/openy_digital_signage_classes_schedule/modules/openy_digital_signage_personify_schedule/openy_digital_signage_personify_schedule.info.yml b/modules/openy_digital_signage_classes_schedule/modules/openy_digital_signage_personify_schedule/openy_digital_signage_personify_schedule.info.yml index b5b6755..0e56371 100644 --- a/modules/openy_digital_signage_classes_schedule/modules/openy_digital_signage_personify_schedule/openy_digital_signage_personify_schedule.info.yml +++ b/modules/openy_digital_signage_classes_schedule/modules/openy_digital_signage_personify_schedule/openy_digital_signage_personify_schedule.info.yml @@ -2,9 +2,10 @@ name: OpenY Digital Signage Personify Classes Schedule type: module description: OpenY Digital Signage Personify Schedule. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - openy_digital_signage_classes_schedule - - openy_digital_signage_room - - ymca_mappings - - ymca_personify + - openy_digital_signage_room:openy_digital_signage_room + - ymca_mappings:ymca_mappings + - ymca_personify:ymca_personify diff --git a/modules/openy_digital_signage_classes_schedule/openy_digital_signage_classes_schedule.info.yml b/modules/openy_digital_signage_classes_schedule/openy_digital_signage_classes_schedule.info.yml index 2ba0bfa..6e7d732 100644 --- a/modules/openy_digital_signage_classes_schedule/openy_digital_signage_classes_schedule.info.yml +++ b/modules/openy_digital_signage_classes_schedule/openy_digital_signage_classes_schedule.info.yml @@ -2,7 +2,8 @@ name: Digital Signage Classes Schedule type: module description: Digital Signage Classes Schedule. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - ds_datetime_range - - openy_digital_signage_room + - ds_datetime_range:ds_datetime_range + - openy_digital_signage_room:openy_digital_signage_room diff --git a/modules/openy_digital_signage_classes_schedule/openy_digital_signage_classes_schedule.services.yml b/modules/openy_digital_signage_classes_schedule/openy_digital_signage_classes_schedule.services.yml index bf94d59..cf0fd25 100644 --- a/modules/openy_digital_signage_classes_schedule/openy_digital_signage_classes_schedule.services.yml +++ b/modules/openy_digital_signage_classes_schedule/openy_digital_signage_classes_schedule.services.yml @@ -1,7 +1,7 @@ services: openy_digital_signage_classes_schedule.manager: class: Drupal\openy_digital_signage_classes_schedule\OpenYClassesScheduleManager - arguments: ['@entity.manager', '@entity.query', '@logger.factory'] + arguments: ['@entity_type.manager', '@logger.factory'] openy_digital_signage_classes_schedule.cron: class: Drupal\openy_digital_signage_classes_schedule\OpenYClassesScheduleCron arguments: ['@config.factory', '@entity_type.manager', '@logger.factory'] diff --git a/modules/openy_digital_signage_classes_schedule/src/OpenYClassesScheduleManager.php b/modules/openy_digital_signage_classes_schedule/src/OpenYClassesScheduleManager.php index bf1446b..1db0b49 100644 --- a/modules/openy_digital_signage_classes_schedule/src/OpenYClassesScheduleManager.php +++ b/modules/openy_digital_signage_classes_schedule/src/OpenYClassesScheduleManager.php @@ -5,7 +5,6 @@ use Drupal\Core\Entity\EntityTypeManager; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityStorageInterface; -use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Logger\LoggerChannelFactoryInterface; /** @@ -25,13 +24,6 @@ class OpenYClassesScheduleManager implements OpenYClassesScheduleManagerInterfac */ const STORAGE = 'openy_ds_classes_session'; - /** - * The query factory. - * - * @var QueryFactory - */ - protected $entityQuery; - /** * The entity type manager. * @@ -56,8 +48,7 @@ class OpenYClassesScheduleManager implements OpenYClassesScheduleManagerInterfac /** * Constructor. */ - public function __construct(EntityTypeManagerInterface $entity_type_manager, QueryFactory $entity_query, LoggerChannelFactoryInterface $logger_factory) { - $this->entityQuery = $entity_query; + public function __construct(EntityTypeManagerInterface $entity_type_manager, LoggerChannelFactoryInterface $logger_factory) { $this->entityTypeManager = $entity_type_manager; $this->logger = $logger_factory->get(self::CHANNEL); $this->storage = $this->entityTypeManager->getStorage(self::STORAGE); diff --git a/modules/openy_digital_signage_playlist/openy_digital_signage_playlist.info.yml b/modules/openy_digital_signage_playlist/openy_digital_signage_playlist.info.yml index 89d8ada..773c699 100644 --- a/modules/openy_digital_signage_playlist/openy_digital_signage_playlist.info.yml +++ b/modules/openy_digital_signage_playlist/openy_digital_signage_playlist.info.yml @@ -2,14 +2,14 @@ name: Open Y Digital Signage Playlists type: module description: Add Playlists to Open Y Digital Signage. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - openy_digital_signage_schedule - - datetime - - duration_field + - drupal:datetime + - drupal:duration_field - drupal:media (>= 8.4) - - openy_media_image - - entity_browser - - openy_digital_signage_schedule - - openy_digital_signage_screen - - openy_ds_media_library + - openy_media_image:openy_media_image + - entity_browser:entity_browser + - openy_digital_signage_schedule:openy_digital_signage_schedule + - openy_digital_signage_screen:openy_digital_signage_screen + - openy_ds_media_library:openy_ds_media_library diff --git a/modules/openy_digital_signage_playlist/src/Form/OpenYPlaylistAssignScreenForm.php b/modules/openy_digital_signage_playlist/src/Form/OpenYPlaylistAssignScreenForm.php index ddb4090..ee367b0 100644 --- a/modules/openy_digital_signage_playlist/src/Form/OpenYPlaylistAssignScreenForm.php +++ b/modules/openy_digital_signage_playlist/src/Form/OpenYPlaylistAssignScreenForm.php @@ -7,7 +7,7 @@ use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\RedirectCommand; use Drupal\Core\Database\Connection; -use Drupal\Core\Entity\EntityManagerInterface; +use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\RendererInterface; @@ -25,8 +25,8 @@ class OpenYPlaylistAssignScreenForm extends OpenYScheduleItemForm { /** * Constructors a OpenYPlaylistAssignScreenForm object. * - * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager - * The entity manager service. + * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository + * The entity repository. * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info * The entity type bundle info. * @param \Drupal\Component\Datetime\TimeInterface $time @@ -36,8 +36,8 @@ class OpenYPlaylistAssignScreenForm extends OpenYScheduleItemForm { * @param \Drupal\Core\Render\RendererInterface $renderer * The renderer service. */ - public function __construct(EntityManagerInterface $entity_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, Connection $database, RendererInterface $renderer) { - parent::__construct($entity_manager, $entity_type_bundle_info, $time); + public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, Connection $database, RendererInterface $renderer) { + parent::__construct($entity_repository, $entity_type_bundle_info, $time); $this->database = $database; $this->renderer = $renderer; @@ -45,7 +45,7 @@ public function __construct(EntityManagerInterface $entity_manager, EntityTypeBu public static function create(ContainerInterface $container) { return new static( - $container->get('entity.manager'), + $container->get('entity.repository'), $container->get('entity_type.bundle.info'), $container->get('datetime.time'), $container->get('database'), @@ -123,10 +123,10 @@ public function validateForm(array &$form, FormStateInterface $form_state) { // In the first step, we check the intersection of the selected time // interval with the interval of the current Schedule item, and then // conversely for determine all intersections of time intervals. - if ($wd_start_time >= $wd_start_time_slot && $wd_start_time <= $wd_end_time_slot || - $wd_end_time >= $wd_start_time_slot && $wd_end_time <= $wd_end_time_slot || - $wd_start_time_slot >= $wd_start_time && $wd_start_time_slot <= $wd_end_time || - $wd_end_time_slot >= $wd_start_time && $wd_end_time_slot <= $wd_end_time) { + if (($wd_start_time >= $wd_start_time_slot && $wd_start_time <= $wd_end_time_slot) || + ($wd_end_time >= $wd_start_time_slot && $wd_end_time <= $wd_end_time_slot) || + ($wd_start_time_slot >= $wd_start_time && $wd_start_time_slot <= $wd_end_time) || + ($wd_end_time_slot >= $wd_start_time && $wd_end_time_slot <= $wd_end_time)) { // If dates are specified in the selected and current Schedule item, // they should also be checked for intersection. @@ -134,10 +134,10 @@ public function validateForm(array &$form, FormStateInterface $form_state) { $start_date_slot = $time_slot->date__value; $end_date_slot = $time_slot->date__end_value; - if ($start_date >= $start_date_slot && $start_date <= $end_date_slot || - $end_date >= $start_date_slot && $end_date <= $end_date_slot || - $start_date_slot >= $start_date && $start_date_slot <= $end_date || - $end_date_slot >= $start_date && $end_date_slot <= $end_date) { + if (($start_date >= $start_date_slot && $start_date <= $end_date_slot) || + ($end_date >= $start_date_slot && $end_date <= $end_date_slot) || + ($start_date_slot >= $start_date && $start_date_slot <= $end_date) || + ($end_date_slot >= $start_date && $end_date_slot <= $end_date)) { $isUsed = TRUE; break; diff --git a/modules/openy_digital_signage_playlist/src/Form/OpenYPlaylistForm.php b/modules/openy_digital_signage_playlist/src/Form/OpenYPlaylistForm.php index e4c1ce5..e5897f9 100644 --- a/modules/openy_digital_signage_playlist/src/Form/OpenYPlaylistForm.php +++ b/modules/openy_digital_signage_playlist/src/Form/OpenYPlaylistForm.php @@ -6,7 +6,7 @@ use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\HtmlCommand; use Drupal\Core\Entity\ContentEntityForm; -use Drupal\Core\Entity\EntityManagerInterface; +use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\RendererInterface; @@ -22,10 +22,17 @@ class OpenYPlaylistForm extends ContentEntityForm { /** * OpenYPlaylistForm constructor. * + * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository + * The entity repository. + * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info + * The entity type bundle info. + * @param \Drupal\Component\Datetime\TimeInterface $time + * The time service. * @param \Drupal\Core\Render\RendererInterface $renderer + * The renderer service. */ - public function __construct(EntityManagerInterface $entity_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, RendererInterface $renderer) { - parent::__construct($entity_manager, $entity_type_bundle_info, $time); + public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, RendererInterface $renderer) { + parent::__construct($entity_repository, $entity_type_bundle_info, $time); $this->renderer = $renderer; } @@ -35,7 +42,7 @@ public function __construct(EntityManagerInterface $entity_manager, EntityTypeBu */ public static function create(ContainerInterface $container) { return new static( - $container->get('entity.manager'), + $container->get('entity.repository'), $container->get('entity_type.bundle.info'), $container->get('datetime.time'), $container->get('renderer') diff --git a/modules/openy_digital_signage_playlist/src/Plugin/Block/OpenYDigitalSignageBlockPlaylist.php b/modules/openy_digital_signage_playlist/src/Plugin/Block/OpenYDigitalSignageBlockPlaylist.php index ae0550f..11b6097 100644 --- a/modules/openy_digital_signage_playlist/src/Plugin/Block/OpenYDigitalSignageBlockPlaylist.php +++ b/modules/openy_digital_signage_playlist/src/Plugin/Block/OpenYDigitalSignageBlockPlaylist.php @@ -68,17 +68,17 @@ class OpenYDigitalSignageBlockPlaylist extends BlockBase implements ContainerFac * The plugin definition. * @param \Symfony\Component\DependencyInjection\ContainerInterface $container * The container. - * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * The entity manager service. * @param \Drupal\openy_digital_signage_screen\OpenYScreenManagerInterface $screen_manager * The Open Y DS Screen Manager. * @param \Drupal\openy_digital_signage_room\OpenYRoomManagerInterface $room_manager * The Open Y DS Room Manager. */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, ContainerInterface $container, EntityTypeManagerInterface $entity_manager, OpenYScreenManagerInterface $screen_manager, OpenYRoomManagerInterface $room_manager) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, ContainerInterface $container, EntityTypeManagerInterface $entity_type_manager, OpenYScreenManagerInterface $screen_manager, OpenYRoomManagerInterface $room_manager) { // Call parent construct method. parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->entityTypeManager = $entity_manager; + $this->entityTypeManager = $entity_type_manager; $this->screenManager = $screen_manager; $this->roomManager = $room_manager; $this->container = $container; @@ -93,7 +93,7 @@ public static function create(ContainerInterface $container, array $configuratio $plugin_id, $plugin_definition, $container, - $container->get('entity.manager'), + $container->get('entity_type.manager'), $container->get('openy_digital_signage_screen.manager'), $container->get('openy_digital_signage_room.manager') ); diff --git a/modules/openy_digital_signage_room/modules/openy_ds_room_pef/openy_ds_room_pef.info.yml b/modules/openy_digital_signage_room/modules/openy_ds_room_pef/openy_ds_room_pef.info.yml index ff18774..65d401f 100644 --- a/modules/openy_digital_signage_room/modules/openy_ds_room_pef/openy_ds_room_pef.info.yml +++ b/modules/openy_digital_signage_room/modules/openy_ds_room_pef/openy_ds_room_pef.info.yml @@ -2,7 +2,8 @@ name: Open Y Digital Signage Room integration with Open Y PEF type: module description: Open Y Digital Signage Room integration with Open Y PEF. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - openy_digital_signage_room - - openy_repeat + - openy_digital_signage_room:openy_digital_signage_room + - openy_repeat:openy_repeat diff --git a/modules/openy_digital_signage_room/openy_digital_signage_room.info.yml b/modules/openy_digital_signage_room/openy_digital_signage_room.info.yml index 282e8a9..b09f6cf 100644 --- a/modules/openy_digital_signage_room/openy_digital_signage_room.info.yml +++ b/modules/openy_digital_signage_room/openy_digital_signage_room.info.yml @@ -2,6 +2,7 @@ name: OpenY Digital Signage Room type: module description: OpenY Digital Signage Room. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - openy_digital_signage + - openy_digital_signage:openy_digital_signage diff --git a/modules/openy_digital_signage_room/openy_digital_signage_room.services.yml b/modules/openy_digital_signage_room/openy_digital_signage_room.services.yml index 5364954..bdbbc23 100644 --- a/modules/openy_digital_signage_room/openy_digital_signage_room.services.yml +++ b/modules/openy_digital_signage_room/openy_digital_signage_room.services.yml @@ -1,4 +1,4 @@ services: openy_digital_signage_room.manager: class: Drupal\openy_digital_signage_room\OpenYRoomManager - arguments: ['@entity.manager', '@logger.factory', '@config.factory'] + arguments: ['@entity_type.manager', '@logger.factory', '@config.factory'] diff --git a/modules/openy_digital_signage_schedule/openy_digital_signage_schedule.info.yml b/modules/openy_digital_signage_schedule/openy_digital_signage_schedule.info.yml index f72cc43..bccd3ba 100644 --- a/modules/openy_digital_signage_schedule/openy_digital_signage_schedule.info.yml +++ b/modules/openy_digital_signage_schedule/openy_digital_signage_schedule.info.yml @@ -2,10 +2,11 @@ name: OpenY Digital Signage Schedule type: module description: OpenY Digital Signage Schedule module. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - time_range - - ds_datetime_range - - openy_digital_signage - - openy_digital_signage_screen_content - - dynamic_entity_reference + - time_range:time_range + - ds_datetime_range:ds_datetime_range + - openy_digital_signage:openy_digital_signage + - openy_digital_signage_screen_content:openy_digital_signage_screen_content + - dynamic_entity_reference:dynamic_entity_reference diff --git a/modules/openy_digital_signage_schedule/openy_digital_signage_schedule.services.yml b/modules/openy_digital_signage_schedule/openy_digital_signage_schedule.services.yml index 366da73..8083ec8 100644 --- a/modules/openy_digital_signage_schedule/openy_digital_signage_schedule.services.yml +++ b/modules/openy_digital_signage_schedule/openy_digital_signage_schedule.services.yml @@ -1,7 +1,7 @@ services: openy_digital_signage_schedule.manager: class: Drupal\openy_digital_signage_schedule\OpenYScheduleManager - arguments: ['@entity.manager', '@entity.query', '@logger.factory'] + arguments: ['@entity_type.manager', '@logger.factory'] plugin.manager.schedule_item_data_type: class: Drupal\openy_digital_signage_schedule\ScheduleItemDataTypePluginManager parent: default_plugin_manager diff --git a/modules/openy_digital_signage_schedule/src/OpenYScheduleManager.php b/modules/openy_digital_signage_schedule/src/OpenYScheduleManager.php index 48601c7..05530aa 100644 --- a/modules/openy_digital_signage_schedule/src/OpenYScheduleManager.php +++ b/modules/openy_digital_signage_schedule/src/OpenYScheduleManager.php @@ -2,14 +2,10 @@ namespace Drupal\openy_digital_signage_schedule; -use Drupal\Core\Entity\EntityTypeManager; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Entity\EntityStorageInterface; -use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Logger\LoggerChannelFactoryInterface; use Drupal\openy_digital_signage_schedule\Entity\OpenYSchedule; use Drupal\openy_digital_signage_screen\Entity\OpenYScreen; -use Drupal\openy_digital_signage_screen\Entity\OpenYScreenInterface; /** * Class OpenYScheduleManager. @@ -26,39 +22,31 @@ class OpenYScheduleManager implements OpenYScheduleManagerInterface { */ const STORAGE = 'openy_digital_signage_schedule'; - /** - * The query factory. - * - * @var QueryFactory - */ - protected $entityQuery; - /** * The entity type manager. * - * @var EntityTypeManager + * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ protected $entityTypeManager; /** * The entity storage. * - * @var EntityStorageInterface + * @var \Drupal\Core\Entity\EntityStorageInterface */ protected $storage; /** * LoggerChannelFactoryInterface definition. * - * @var LoggerChannelFactoryInterface + * @var \Drupal\Core\Logger\LoggerChannelFactoryInterface */ protected $logger; /** * Constructor. */ - public function __construct(EntityTypeManagerInterface $entity_type_manager, QueryFactory $entity_query, LoggerChannelFactoryInterface $logger_factory) { - $this->entityQuery = $entity_query; + public function __construct(EntityTypeManagerInterface $entity_type_manager, LoggerChannelFactoryInterface $logger_factory) { $this->entityTypeManager = $entity_type_manager; $this->logger = $logger_factory->get(self::CHANNEL); $this->storage = $this->entityTypeManager->getStorage(self::STORAGE); @@ -79,7 +67,7 @@ public function getUpcomingScreenContents(OpenYSchedule $schedule, $timespan, $n $now = time(); } - $query = $this->entityQuery->get('openy_digital_signage_sch_item'); + $query = $this->entityTypeManager->getStorage('openy_digital_signage_sch_item')->getQuery(); $query->condition('schedule', $schedule->id()); if (!$include_disabled) { $query->condition('status', 1); @@ -171,7 +159,7 @@ public function daysWithOverrides(OpenYSchedule $schedule, $year, $month) { $date_last->sub($day_interval); // Retrieve all override schedule items that fit the given month. - $query = $this->entityQuery->get('openy_digital_signage_sch_item'); + $query = $this->entityTypeManager->getStorage('openy_digital_signage_sch_item')->getQuery(); $query->condition('schedule', $schedule->id()); $query->condition('show_date', 0); $query->condition('date__value', $first_day_of_next_month, '<'); diff --git a/modules/openy_digital_signage_screen/openy_digital_signage_screen.info.yml b/modules/openy_digital_signage_screen/openy_digital_signage_screen.info.yml index 887e8b6..5c37723 100644 --- a/modules/openy_digital_signage_screen/openy_digital_signage_screen.info.yml +++ b/modules/openy_digital_signage_screen/openy_digital_signage_screen.info.yml @@ -2,8 +2,9 @@ name: OpenY Digital Signage Screen type: module description: OpenY Digital Signage Screen Entity module. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - openy_digital_signage - - openy_digital_signage_schedule - - openy_digital_signage_room + - openy_digital_signage:openy_digital_signage + - openy_digital_signage_schedule:openy_digital_signage_schedule + - openy_digital_signage_room:openy_digital_signage_room diff --git a/modules/openy_digital_signage_screen/openy_digital_signage_screen.services.yml b/modules/openy_digital_signage_screen/openy_digital_signage_screen.services.yml index 52c5605..69df1a0 100644 --- a/modules/openy_digital_signage_screen/openy_digital_signage_screen.services.yml +++ b/modules/openy_digital_signage_screen/openy_digital_signage_screen.services.yml @@ -1,7 +1,7 @@ services: openy_digital_signage_screen.manager: class: Drupal\openy_digital_signage_screen\OpenYScreenManager - arguments: ['@entity.manager', '@entity.query', '@logger.factory', '@current_route_match', '@request_stack'] + arguments: ['@entity_type.manager', '@logger.factory', '@current_route_match', '@request_stack'] openy_digital_signage_screen: class: '\Drupal\openy_digital_signage_screen\EventSubscriber\ResponseEventSubscriber' tags: diff --git a/modules/openy_digital_signage_screen/src/Form/OpenYScreenAddForm.php b/modules/openy_digital_signage_screen/src/Form/OpenYScreenAddForm.php index 2e2f558..1eac85d 100644 --- a/modules/openy_digital_signage_screen/src/Form/OpenYScreenAddForm.php +++ b/modules/openy_digital_signage_screen/src/Form/OpenYScreenAddForm.php @@ -5,11 +5,11 @@ use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\ReplaceCommand; use Drupal\Core\Entity\ContentEntityForm; +use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; -use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; -use Drupal\user\PrivateTempStoreFactory; +use Drupal\Core\TempStore\PrivateTempStoreFactory; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Component\Datetime\TimeInterface; @@ -21,24 +21,26 @@ class OpenYScreenAddForm extends ContentEntityForm { /** - * The private temp store. + * TempStore service. * - * @var \Drupal\user\PrivateTempStore + * @var \Drupal\Core\TempStore\PrivateTempStoreFactory */ protected $store; /** * Constructs a ContentEntityForm object. * - * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager - * The entity manager. + * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository + * The entity repository. + * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory + * TempStore service. * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info * The entity type bundle service. * @param \Drupal\Component\Datetime\TimeInterface $time * The time service. */ - public function __construct(EntityManagerInterface $entity_manager, PrivateTempStoreFactory $temp_store_factory, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL) { - parent::__construct($entity_manager, $entity_type_bundle_info, $time); + public function __construct(EntityRepositoryInterface $entity_repository, PrivateTempStoreFactory $temp_store_factory, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time) { + parent::__construct($entity_repository, $entity_type_bundle_info, $time); $this->store = $temp_store_factory->get('multistep_data'); } @@ -47,7 +49,7 @@ public function __construct(EntityManagerInterface $entity_manager, PrivateTempS */ public static function create(ContainerInterface $container) { return new static( - $container->get('entity.manager'), + $container->get('entity.repository'), $container->get('user.private_tempstore'), $container->get('entity_type.bundle.info'), $container->get('datetime.time') diff --git a/modules/openy_digital_signage_screen/src/OpenYScreenManager.php b/modules/openy_digital_signage_screen/src/OpenYScreenManager.php index 95ca1d9..b72bc3a 100644 --- a/modules/openy_digital_signage_screen/src/OpenYScreenManager.php +++ b/modules/openy_digital_signage_screen/src/OpenYScreenManager.php @@ -2,10 +2,7 @@ namespace Drupal\openy_digital_signage_screen; -use Drupal\Core\Entity\EntityTypeManager; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Entity\EntityStorageInterface; -use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Logger\LoggerChannelFactoryInterface; use Drupal\Core\Routing\RouteMatchInterface; use Symfony\Component\HttpFoundation\RequestStack; @@ -27,31 +24,24 @@ class OpenYScreenManager implements OpenYScreenManagerInterface { */ const STORAGE = 'openy_digital_signage_screen'; - /** - * The query factory. - * - * @var QueryFactory - */ - protected $entityQuery; - /** * The entity type manager. * - * @var EntityTypeManager + * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ protected $entityTypeManager; /** * The entity storage. * - * @var EntityStorageInterface + * @var \Drupal\Core\Entity\EntityStorageInterface */ protected $storage; /** * LoggerChannelFactoryInterface definition. * - * @var LoggerChannelFactoryInterface + * @var \Drupal\Core\Logger\LoggerChannelFactoryInterface */ protected $logger; @@ -72,8 +62,7 @@ class OpenYScreenManager implements OpenYScreenManagerInterface { /** * Constructor. */ - public function __construct(EntityTypeManagerInterface $entity_type_manager, QueryFactory $entity_query, LoggerChannelFactoryInterface $logger_factory, RouteMatchInterface $route_match, RequestStack $request_stack) { - $this->entityQuery = $entity_query; + public function __construct(EntityTypeManagerInterface $entity_type_manager, LoggerChannelFactoryInterface $logger_factory, RouteMatchInterface $route_match, RequestStack $request_stack) { $this->entityTypeManager = $entity_type_manager; $this->logger = $logger_factory->get(self::CHANNEL); $this->storage = $this->entityTypeManager->getStorage(self::STORAGE); @@ -93,11 +82,8 @@ public function getScreenContext() { } // Try to find Screen ID in a URL. $screen = NULL; - $request = \Drupal::request(); if ($request->query->has('screen')) { - $storage = \Drupal::entityTypeManager() - ->getStorage('openy_digital_signage_screen'); - $screen = $storage->load($request->query->get('screen')); + $screen = $this->storage->load($request->query->get('screen')); } return $screen; diff --git a/modules/openy_digital_signage_screen_content/modules/openy_digital_signage_blocks/openy_digital_signage_blocks.info.yml b/modules/openy_digital_signage_screen_content/modules/openy_digital_signage_blocks/openy_digital_signage_blocks.info.yml index 96abb11..8a0e0f8 100644 --- a/modules/openy_digital_signage_screen_content/modules/openy_digital_signage_blocks/openy_digital_signage_blocks.info.yml +++ b/modules/openy_digital_signage_screen_content/modules/openy_digital_signage_blocks/openy_digital_signage_blocks.info.yml @@ -2,8 +2,9 @@ name: OpenY Digital Signage Blocks type: module description: Provides various DS blocks. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - openy_digital_signage_screen_content - - openy_digital_signage_room + - openy_digital_signage_screen_content:openy_digital_signage_screen_content + - openy_digital_signage_room:openy_digital_signage_room diff --git a/modules/openy_digital_signage_screen_content/openy_digital_signage_screen_content.info.yml b/modules/openy_digital_signage_screen_content/openy_digital_signage_screen_content.info.yml index a5f8793..1e3d985 100644 --- a/modules/openy_digital_signage_screen_content/openy_digital_signage_screen_content.info.yml +++ b/modules/openy_digital_signage_screen_content/openy_digital_signage_screen_content.info.yml @@ -2,10 +2,11 @@ name: OpenY Digital Signage Screen content type: module description: OpenY Digital Signage Screen content module. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - panelizer - - openy_digital_signage - - openy_digital_signage_room - - ckeditor_font - - token_filter + - panelizer:panelizer + - openy_digital_signage:openy_digital_signage + - openy_digital_signage_room:openy_digital_signage_room + - ckeditor_font:ckeditor_font + - token_filter:token_filter diff --git a/modules/openy_ds_media_library/openy_ds_media_library.info.yml b/modules/openy_ds_media_library/openy_ds_media_library.info.yml index f593bd8..5f603de 100644 --- a/modules/openy_ds_media_library/openy_ds_media_library.info.yml +++ b/modules/openy_ds_media_library/openy_ds_media_library.info.yml @@ -2,8 +2,9 @@ name: Open Y Digital Signage Media Library type: module description: Provides separate Media library to Open Y Digital Signage. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - drupal:media (>= 8.4) - - openy_media_image - - entity_browser + - openy_media_image:openy_media_image + - entity_browser:entity_browser diff --git a/modules/openy_ds_pef_schedule/openy_ds_pef_schedule.info.yml b/modules/openy_ds_pef_schedule/openy_ds_pef_schedule.info.yml index ea8ba24..497714e 100644 --- a/modules/openy_ds_pef_schedule/openy_ds_pef_schedule.info.yml +++ b/modules/openy_ds_pef_schedule/openy_ds_pef_schedule.info.yml @@ -2,6 +2,7 @@ name: Digital Signage Classes PEF Schedule integration type: module description: Digital Signage Classes Schedule. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - openy_ds_room_pef + - openy_ds_room_pef:openy_ds_room_pef diff --git a/modules/openy_ds_pef_schedule/openy_ds_pef_schedule.services.yml b/modules/openy_ds_pef_schedule/openy_ds_pef_schedule.services.yml index 89cf9fc..c5753f1 100644 --- a/modules/openy_ds_pef_schedule/openy_ds_pef_schedule.services.yml +++ b/modules/openy_ds_pef_schedule/openy_ds_pef_schedule.services.yml @@ -1,4 +1,4 @@ services: openy_ds_pef_schedule.manager: class: Drupal\openy_ds_pef_schedule\OpenYPEFScheduleManager - arguments: ['@entity.manager', '@entity.query', '@logger.factory', '@database'] + arguments: ['@entity_type.manager', '@logger.factory', '@database'] diff --git a/modules/openy_ds_pef_schedule/src/OpenYPEFScheduleManager.php b/modules/openy_ds_pef_schedule/src/OpenYPEFScheduleManager.php index 8108cdd..12589b7 100644 --- a/modules/openy_ds_pef_schedule/src/OpenYPEFScheduleManager.php +++ b/modules/openy_ds_pef_schedule/src/OpenYPEFScheduleManager.php @@ -3,9 +3,7 @@ namespace Drupal\openy_ds_pef_schedule; use Drupal\Core\Database\Connection; -use Drupal\Core\Entity\EntityTypeManager; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Logger\LoggerChannelFactoryInterface; use Drupal\node\NodeInterface; @@ -25,24 +23,17 @@ class OpenYPEFScheduleManager implements OpenYPEFScheduleManagerInterface { const NEXT_DAY_ALWAYS = 1; const NEXT_DAY_IF_EMPTY = 2; - /** - * The query factory. - * - * @var QueryFactory - */ - protected $entityQuery; - /** * The entity type manager. * - * @var EntityTypeManager + * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ protected $entityTypeManager; /** * LoggerChannelFactoryInterface definition. * - * @var LoggerChannelFactoryInterface + * @var \Drupal\Core\Logger\LoggerChannelFactoryInterface */ protected $logger; @@ -55,9 +46,15 @@ class OpenYPEFScheduleManager implements OpenYPEFScheduleManagerInterface { /** * Constructor. + * + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * The entity type manager. + * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory + * The logger channel factory. + * @param \Drupal\Core\Database\Connection $database + * Database connection. */ - public function __construct(EntityTypeManagerInterface $entity_type_manager, QueryFactory $entity_query, LoggerChannelFactoryInterface $logger_factory, Connection $database) { - $this->entityQuery = $entity_query; + public function __construct(EntityTypeManagerInterface $entity_type_manager, LoggerChannelFactoryInterface $logger_factory, Connection $database) { $this->entityTypeManager = $entity_type_manager; $this->logger = $logger_factory->get(self::CHANNEL); $this->database = $database; diff --git a/modules/time_range/time_range.info.yml b/modules/time_range/time_range.info.yml index 7749d89..50a8543 100644 --- a/modules/time_range/time_range.info.yml +++ b/modules/time_range/time_range.info.yml @@ -3,7 +3,8 @@ type: module description: 'Provides the ability to store start and end times.' package: "OpenY: Digital Signage" core: 8.x +core_version_requirement: ^8 || ^9 project: 'drupal' dependencies: - - datetime - - datetime_range + - drupal:datetime + - drupal:datetime_range diff --git a/openy_digital_signage.info.yml b/openy_digital_signage.info.yml index 3819c8b..45210a5 100644 --- a/openy_digital_signage.info.yml +++ b/openy_digital_signage.info.yml @@ -2,6 +2,7 @@ name: OpenY Digital Signage type: module description: OpenY Digital Signage module. core: 8.x +core_version_requirement: ^8 || ^9 package: "OpenY: Digital Signage" dependencies: - - openy_upgrade_tool + - openy_upgrade_tool:openy_upgrade_tool