You are here

public function CliCommandsInterface::enable in Site Alert 8

Enables a site alert.

Parameters

string $label: The label of the site alert to enable.

Return value

int The number of site alerts that were enabled.

Throws

\Drupal\Core\Entity\EntityStorageException Thrown when an error occurs while enabling a site alert.

1 method overrides CliCommandsInterface::enable()
CliCommands::enable in src/CliCommands.php
Enables a site alert.

File

src/CliCommandsInterface.php, line 103

Class

CliCommandsInterface
Interface for a service with shared code for CLI tools.

Namespace

Drupal\site_alert

Code

public function enable(string $label) : int;