Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehuynh205 committed Aug 23, 2022
1 parent d78f4ff commit da0180d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libcal.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'LibCal Integration'
type: module
description: 'This module is integrate Libcal API and feed to drupal'
core_version_requirement: '^8.8 || ^9'
core_version_requirement: ^8.8 || ^9 || ^10
package: DSU
dependencies:
- menu_ui:menu_ui
5 changes: 3 additions & 2 deletions libcal.module
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Drupal\Core\Entity\EntityInterface;
/**
* @file
* Contains libcal.module.
Expand Down Expand Up @@ -125,7 +126,7 @@ function generateEventAlias($node)
/**
* Implements hook_insert().
*/
function libcal_entity_insert(\Drupal\Core\Entity\EntityInterface $node)
function libcal_entity_insert(EntityInterface $node)
{
// Set the URL alias
//if (get_class($node) == 'Drupal\node\Entity\Node') {
Expand All @@ -143,7 +144,7 @@ function libcal_entity_insert(\Drupal\Core\Entity\EntityInterface $node)
}
}

function libcal_entity_update(\Drupal\Core\Entity\EntityInterface $node)
function libcal_entity_update(EntityInterface $node)
{
// Set the URL alias
//if (get_class($node) == 'Drupal\node\Entity\Node') {
Expand Down
2 changes: 1 addition & 1 deletion src/EventDownloadService.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function updatePastFieldEventNode($flag)
//$query->condition('field_past_event', false);
$nids = $query->execute();
foreach ($nids as $nid) {
$eventnode = \Drupal\node\Entity\Node::load($nid);
$eventnode = Node::load($nid);
//$eventnode->set('field_past_event', $flag);

// check if current timestamp with event timestamp
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Functional/LoadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class LoadTest extends BrowserTestBase {
*
* @var array
*/
public static $modules = ['libcal'];
protected static $modules = ['libcal'];

/**
* A user with permission to administer site configuration.
Expand All @@ -29,7 +29,7 @@ class LoadTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
protected function setUp(): void {
parent::setUp();
$this->user = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($this->user);
Expand Down

0 comments on commit da0180d

Please sign in to comment.