Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpcs fixes #2

Open
wants to merge 9 commits into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions bluecadet_accessibility.install
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* @file
* Implements hook_install().
*/

/**
* Implements hook_install().
*/
Expand All @@ -13,7 +18,7 @@ function bluecadet_accessibility_install() {
function bluecadet_accessibility_enable_plugin() {
// Enable ajax_ally_option plugin.
$config = \Drupal::service('config.factory')->getEditable('views.settings');
$display_extenders = $config->get('display_extenders') ?: array();
$display_extenders = $config->get('display_extenders') ?: [];
$display_extenders[] = 'ajax_ally_option';
$config->set('display_extenders', $display_extenders);
$config->save();
Expand All @@ -25,10 +30,10 @@ function bluecadet_accessibility_enable_plugin() {
function bluecadet_accessibility_uninstall() {
// Disable ajax_ally_option plugin.
$config = \Drupal::service('config.factory')->getEditable('views.settings');
$display_extenders = $config->get('display_extenders') ?: array();
$display_extenders = $config->get('display_extenders') ?: [];

$key = array_search('ajax_ally_option', $display_extenders);
if ($key!== FALSE) {
if ($key !== FALSE) {
unset($display_extenders[$key]);
$config->set('display_extenders', $display_extenders);
$config->save();
Expand Down
15 changes: 3 additions & 12 deletions bluecadet_accessibility.module
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,12 @@

use Drupal\views\ViewExecutable;

/**
* Implements hook_page_attachments().
*/
// function bluecadet_accessibility_page_attachments(array &$attachments) {
// $attachments['#attached']['library'][] = 'bluecadet_accessibility/bluecadet_accessibility';
// }

/**
* Implements hook_form_views_pre_render().
*
* Add instance dates to view results.
*/
function bluecadet_accessibility_views_pre_render(ViewExecutable $view) {
// Grab the current view display.
$display = $view->getDisplay();

// Grab the options set on the view display.
$display_extenders_options = $view->display_handler->getOption('display_extenders');
Expand All @@ -34,9 +25,9 @@ function bluecadet_accessibility_views_pre_render(ViewExecutable $view) {
)
) &&
empty($view->is_attachment) && empty($view->live_preview)
) {
) {

// Attach the library.
$view->element['#attached']['library'][] = 'bluecadet_accessibility/viewsAjaxA11y';
// Attach the library.
$view->element['#attached']['library'][] = 'bluecadet_accessibility/viewsAjaxA11y';
}
}
16 changes: 12 additions & 4 deletions src/EventSubscriber/ViewsAjaxResponseSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\bluecadet_accessibility\EventSubscriber;

use Drupal\bluecadet_accessibility\Ajax\ViewsAjaxReFocusCommand;
use Drupal\Core\Ajax\AnnounceCommand;
use Drupal\Core\Ajax\FocusFirstCommand;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\views\Ajax\ViewAjaxResponse;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
Expand All @@ -15,6 +15,8 @@
*/
class ViewsAjaxResponseSubscriber implements EventSubscriberInterface {

use StringTranslationTrait;

/**
* {@inheritdoc}
*/
Expand All @@ -29,8 +31,8 @@
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* The event process.
*/
public function onResponse(FilterResponseEvent $event) {

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (9.5.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has typehint with deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent: since Symfony 4.3, use ResponseEvent instead

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (9.5.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has typehint with deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent: since Symfony 4.3, use ResponseEvent instead

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (9.5.x, 8.0, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has typehint with deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent: since Symfony 4.3, use ResponseEvent instead

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (9.5.x, 8.0, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has typehint with deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent: since Symfony 4.3, use ResponseEvent instead

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (9.5.x, 8.1, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has typehint with deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent: since Symfony 4.3, use ResponseEvent instead

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (9.5.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has typehint with deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent: since Symfony 4.3, use ResponseEvent instead

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (9.5.x, 8.0, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has typehint with deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent: since Symfony 4.3, use ResponseEvent instead

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.6)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has invalid type Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 34 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (9.5.x, 8.0, 10.4)

Parameter $event of method Drupal\bluecadet_accessibility\EventSubscriber\ViewsAjaxResponseSubscriber::onResponse() has typehint with deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent: since Symfony 4.3, use ResponseEvent instead
$response = $event->getResponse();

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.2, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.1.x, 8.1, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.2, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.2.x, 8.1, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.2, 10.4)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

Check failure on line 35 in src/EventSubscriber/ViewsAjaxResponseSubscriber.php

View workflow job for this annotation

GitHub Actions / test (10.0.x, 8.1, 10.6)

Call to method getResponse() on an unknown class Symfony\Component\HttpKernel\Event\FilterResponseEvent.

// Only act on a Views Ajax Response.
if ($response instanceof ViewAjaxResponse) {
Expand All @@ -41,8 +43,14 @@

$display_extenders_options = $view->display_handler->getOption('display_extenders');

if (($view->ajaxEnabled() && (isset($display_extenders_options['ajax_ally_option']['enable_ally']) && $display_extenders_options['ajax_ally_option']['enable_ally'] == TRUE)) && empty($view->is_attachment) && empty($view->live_preview)) {
// Disable the default behavior of visually scrolling on view refreshes caused by form changes or pagination.
if (
($view->ajaxEnabled() && (isset($display_extenders_options['ajax_ally_option']['enable_ally'])
&& $display_extenders_options['ajax_ally_option']['enable_ally'] == TRUE)
)
&& empty($view->is_attachment) && empty($view->live_preview)
) {
// Disable the default behavior of visually scrolling
// on view refreshes caused by form changes or pagination.
foreach ($commands as &$command) {
if (isset($command['command']) && $command['command'] === 'viewsScrollTop') {
unset($command['command']);
Expand All @@ -52,7 +60,7 @@
// Add in Announce for number of results.
$result_count = count($view->result);
// @todo variablise this in a settings page.
$msg = \Drupal::translation()->formatPlural($result_count, '1 result loaded.', '@count results loaded.');;
$msg = $this->formatPlural($result_count, '1 result loaded.', '@count results loaded.');
$response->addCommand(new AnnounceCommand($msg, 'assertive'));

// Add in focus command.
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/views/display_extender/AjaxAllyOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\bluecadet_accessibility\Plugin\views\display_extender;

use Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase;

/**
* Ajax AJAX A11y display extender plugin.
Expand Down
1 change: 0 additions & 1 deletion tests/src/Functional/BluecadeAccessibilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ protected function setUp() : void {
* Test Basic Functionality.
*/
public function testBasicFunc() {
$session = $this->assertSession();

$this->assertTrue(TRUE);

Expand Down
Loading