Skip to content
Snippets Groups Projects

Issue #2707689: NodeForm::actions() checks for delete access on new entities

5 files
+ 92
3
Compare changes
  • Side-by-side
  • Inline
Files
5
  • be7d65ec
    Issue #3225354 by eddie_c, paulocs, Bhanu951, daffie, Spokje, Berdir: Add a... · be7d65ec
    catch authored
    Issue #3225354 by eddie_c, paulocs, Bhanu951, daffie, Spokje, Berdir: Add a clearByPrefix() method to the flood API
@@ -9,7 +9,7 @@
/**
* Defines the database flood backend. This is the default Drupal backend.
*/
class DatabaseBackend implements FloodInterface {
class DatabaseBackend implements FloodInterface, PrefixFloodInterface {
/**
* The database table name.
@@ -107,6 +107,21 @@ public function clear($name, $identifier = NULL) {
}
}
/**
* {@inheritdoc}
*/
public function clearByPrefix(string $name, string $prefix): void {
try {
$this->connection->delete(static::TABLE_NAME)
->condition('event', $name)
->condition('identifier', $prefix . '-%', 'LIKE')
->execute();
}
catch (\Exception $e) {
$this->catchException($e);
}
}
/**
* {@inheritdoc}
*/
Loading