Skip to content

Commit

Permalink
UHF-9986: Changed documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tuutti committed Apr 23, 2024
1 parent 4184bca commit 179923f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
6 changes: 3 additions & 3 deletions documentation/feature-toggle.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Provides a service to conditionally check if the given feature is enabled.
```php
$service = \Drupal::service(\Drupal\helfi_api_base\Features\FeatureManager::class);

$service->isEnabled(\Drupal\helfi_api_base\Features\FeatureManager::DISABLE_USER_PASSWORD); // Returns true if the logger feature is enabled.
// Disables the logger feature.
$service->isEnabled(\Drupal\helfi_api_base\Features\FeatureManager::DISABLE_USER_PASSWORD);
// Disables the feature.
$service->disableFeature(\Drupal\helfi_api_base\Features\FeatureManager::DISABLE_USER_PASSWORD)
// Enables the logger feature.
// Enables the feature.
$service->enableFeature(\Drupal\helfi_api_base\Features\FeatureManager::DISABLE_USER_PASSWORD);
```

Expand Down
13 changes: 1 addition & 12 deletions documentation/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,4 @@ JSON parsing needs to be enabled manually in order for this to work. See https:/

## Usage

Make sure your `settings.php` includes:

```php
if (file_exists('modules/contrib/helfi_api_base/monolog.services.yml')) {
$conf['container_service_providers'][] = '\Drush\Drupal\DrushLoggerServiceProvider';
$conf['container_service_providers'][] = '\Drupal\monolog\MonologServiceProvider';
$settings['container_yamls'][] = 'modules/contrib/monolog/monolog.services.yml';
$settings['container_yamls'][] = 'modules/contrib/helfi_api_base/monolog.services.yml';
}
```

then enable `monolog` module: `drush en monolog`.
Enable `monolog` module: `drush en monolog`.

0 comments on commit 179923f

Please sign in to comment.