Skip to content

Commit 366265f

Browse files
authored
Merge pull request #3 from digitalutsc/feat/add-ci-and-linting
feat/add-ci-and-linting
2 parents c94961b + fc8dae6 commit 366265f

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
islandora-module-ci:
12+
uses: digitalutsc/reusable_workflows/.github/workflows/islandora-module-ci.yml@main
13+
with:
14+
module_name: advanced_search_default_sort_override
15+
install_chromedriver: false

advanced_search_default_sort_override.module

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* Contains advanced_search_tips.module.
66
*/
77

8-
use \Drupal\Core\Routing\RouteMatchInterface;
9-
use \Drupal\node\Entity\Node;
8+
use Drupal\Core\Form\FormStateInterface;
9+
use Drupal\Core\Routing\RouteMatchInterface;
1010
use Drupal\views\ViewExecutable;
1111

1212
/**
@@ -38,8 +38,9 @@ function advanced_search_default_sort_override_theme() {
3838

3939
/**
4040
* Implements hook_views_pre_build().
41-
*
42-
* Replaces hook_views_pre_view. This modifiees the live objects instead of the config array.
41+
*
42+
* Replaces hook_views_pre_view.
43+
* This modifies the live objects instead of the config array.
4344
*/
4445
function advanced_search_default_sort_override_views_pre_build(ViewExecutable $view) {
4546
// Only run on views except for the admin UI.
@@ -64,7 +65,7 @@ function advanced_search_default_sort_override_views_pre_build(ViewExecutable $v
6465
/**
6566
* Implements hook_form_FORM_ID_alter() for views_ui_config_item_form.
6667
*/
67-
function advanced_search_default_sort_override_form_views_ui_config_item_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
68+
function advanced_search_default_sort_override_form_views_ui_config_item_form_alter(&$form, FormStateInterface $form_state, $form_id) {
6869
// Only alter sort handler forms.
6970
if ($form_state->get('type') !== 'sort') {
7071
return;
@@ -94,7 +95,7 @@ function advanced_search_default_sort_override_form_views_ui_config_item_form_al
9495
* into the saved handler options, since core's unpackOptions() only keeps
9596
* options that are declared in the handler's defineOptions().
9697
*/
97-
function advanced_search_default_sort_override_config_item_form_submit(array &$form, \Drupal\Core\Form\FormStateInterface $form_state) {
98+
function advanced_search_default_sort_override_config_item_form_submit(array &$form, FormStateInterface $form_state) {
9899
$view = $form_state->get('view');
99100
$display_id = $form_state->get('display_id');
100101
$type = $form_state->get('type');

0 commit comments

Comments
 (0)