Loading comment_approver.info.yml +1 −2 Original line number Diff line number Diff line name: Comment approver type: module description: A module to allow adminstrators to automatically approve comments core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^9.3 || ^10 package: Comment approver configure: comment_approver.comment_approver_settings Loading comment_approver.module +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ function comment_approver_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { // Main module help for the comment_approver module. case 'help.page.comment_approver': $output = '<pre>' . file_get_contents(drupal_get_path('module', 'comment_approver') . '/README.md') . '</pre>'; $output = '<pre>' . file_get_contents(\Drupal::service('extension.list.module')->getPath('comment_approver') . '/README.md') . '</pre>'; return $output; default: Loading Loading @@ -72,5 +72,5 @@ function _commment_approver_dispatch_event(string $event_name, CommentInterface // Get the event_dispatcher service and dispatch the event. $event_dispatcher = \Drupal::service('event_dispatcher'); $event_dispatcher->dispatch($event_name, $event); $event_dispatcher->dispatch($event, $event_name); } src/Event/CommentApproverEvent.php +1 −1 Original line number Diff line number Diff line Loading @@ -2,8 +2,8 @@ namespace Drupal\comment_approver\Event; use Symfony\Contracts\EventDispatcher\Event; use Drupal\comment\CommentInterface; use Symfony\Component\EventDispatcher\Event; /** * Event that is fired when comment approver approves / blocks a comment. Loading tests/src/Functional/LoadTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
comment_approver.info.yml +1 −2 Original line number Diff line number Diff line name: Comment approver type: module description: A module to allow adminstrators to automatically approve comments core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^9.3 || ^10 package: Comment approver configure: comment_approver.comment_approver_settings Loading
comment_approver.module +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ function comment_approver_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { // Main module help for the comment_approver module. case 'help.page.comment_approver': $output = '<pre>' . file_get_contents(drupal_get_path('module', 'comment_approver') . '/README.md') . '</pre>'; $output = '<pre>' . file_get_contents(\Drupal::service('extension.list.module')->getPath('comment_approver') . '/README.md') . '</pre>'; return $output; default: Loading Loading @@ -72,5 +72,5 @@ function _commment_approver_dispatch_event(string $event_name, CommentInterface // Get the event_dispatcher service and dispatch the event. $event_dispatcher = \Drupal::service('event_dispatcher'); $event_dispatcher->dispatch($event_name, $event); $event_dispatcher->dispatch($event, $event_name); }
src/Event/CommentApproverEvent.php +1 −1 Original line number Diff line number Diff line Loading @@ -2,8 +2,8 @@ namespace Drupal\comment_approver\Event; use Symfony\Contracts\EventDispatcher\Event; use Drupal\comment\CommentInterface; use Symfony\Component\EventDispatcher\Event; /** * Event that is fired when comment approver approves / blocks a comment. Loading
tests/src/Functional/LoadTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading