Skip to content

Commit

Permalink
Merge pull request #12 from wieni/feature/drupal-10
Browse files Browse the repository at this point in the history
d10
  • Loading branch information
akasake authored Sep 12, 2023
2 parents fb9eb26 + 16cba37 commit 0f6f98b
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": ">=7.1.0",
"drupal/core": "^8.0 || ^9.0"
"drupal/core": "^9.1 || ^10"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Event/EntityOverviewAlterEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\wmentity_overview\Event;

use Drupal\Component\EventDispatcher\Event;
use Drupal\wmentity_overview\Annotation\OverviewBuilder;
use Drupal\wmentity_overview\OverviewBuilder\OverviewBuilderInterface;
use Symfony\Component\EventDispatcher\Event;

class EntityOverviewAlterEvent extends Event
{
Expand Down
2 changes: 1 addition & 1 deletion src/Event/EntityOverviewAlternativesAlterEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\wmentity_overview\Event;

use Drupal\Component\EventDispatcher\Event;
use Drupal\wmentity_overview\Annotation\OverviewBuilder;
use Symfony\Component\EventDispatcher\Event;

class EntityOverviewAlternativesAlterEvent extends Event
{
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/BulkActionOverviewSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(
$this->formBuilder = $formBuilder;
}

public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
$events[WmEntityOverviewEvents::ENTITY_OVERVIEW_ALTER] = ['onOverviewAlter'];

Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/CollectionRouteSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
$this->overviewBuilders = $overviewBuilders;
}

public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
// Run before Drupal\Core\EventSubscriber/ParamConverterSubscriber
$events[RoutingEvents::ALTER] = ['onAlterRoutes', -180];
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/FilterableOverviewSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
$this->formBuilder = $formBuilder;
}

public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
$events[WmEntityOverviewEvents::ENTITY_OVERVIEW_ALTER] = ['onOverviewAlter'];

Expand Down
3 changes: 1 addition & 2 deletions wmentity_overview.info.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Entity Overview
type: module
description: Improved EntityListBuilders with support for paging, table sorting, table dragging, filtering, bulk actions, database queries and more.
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^9.1 || ^10
package: Wieni
12 changes: 11 additions & 1 deletion wmentity_overview.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ bulk-action-form:
base:
css/bulk-action-form.css: {}

popperjs:
remote: https://github.com/floating-ui/floating-ui
version: '2.11.7'
license:
name: MIT
url: https://github.com/floating-ui/floating-ui/blob/v2.x/LICENSE.md
gpl-compatible: true
js:
https://unpkg.com/@popperjs/[email protected]/dist/umd/popper.min.js: { type: external , minified: true }

tooltip:
version: VERSION
css:
Expand All @@ -18,4 +28,4 @@ tooltip:
js:
js/tooltip.js: {}
dependencies:
- core/popperjs
- wmentity_overview/popperjs
4 changes: 2 additions & 2 deletions wmentity_overview.module
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function wmentity_overview_entity_overview_alter(array &$overview, OverviewBuild
$dispatcher = \Drupal::getContainer()->get('event_dispatcher');
$event = new EntityOverviewAlterEvent($builder, $overview);

$dispatcher->dispatch(WmEntityOverviewEvents::ENTITY_OVERVIEW_ALTER, $event);
$dispatcher->dispatch($event, WmEntityOverviewEvents::ENTITY_OVERVIEW_ALTER);
}


Expand All @@ -20,7 +20,7 @@ function wmentity_overview_entity_overview_alternatives_alter(array &$alternativ
$dispatcher = \Drupal::getContainer()->get('event_dispatcher');
$event = new EntityOverviewAlternativesAlterEvent($definition, $alternatives);

$dispatcher->dispatch(WmEntityOverviewEvents::ENTITY_OVERVIEW_ALTERNATIVES_ALTER, $event);
$dispatcher->dispatch($event, WmEntityOverviewEvents::ENTITY_OVERVIEW_ALTERNATIVES_ALTER);
}


Expand Down

0 comments on commit 0f6f98b

Please sign in to comment.