Skip to content

Commit

Permalink
LDT-52: Moved configurations to config folder and renamed .module to …
Browse files Browse the repository at this point in the history
….install file.
  • Loading branch information
axelabhay committed Apr 29, 2024
1 parent 3b46807 commit 69f4efc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore files.
*.DS_Store
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
count_limit: 5
time_limit: 30
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
<?php

/**
* Implements hook_install().
*/
function rate_limit_install() {
// Set default values for configs.
\Drupal::configFactory()->getEditable('rate_limit.settings')
->set('count_limit', 5)
->set('time_limit', 30) // In seconds.
->save();
}

/**
* Implements hook_schema().
*/
Expand Down

0 comments on commit 69f4efc

Please sign in to comment.