public function ProviderService::serviceIsEnabled in Synonyms 2.0.x
Checks if the service is enabled.
Parameters
string $entity_type: Entity type for which to do the check.
string $bundle: Bundle for which to do the check.
string $service_id: ID of the synonyms behavior service for check.
Return value
bool Returns TRUE if this service is enabled for given entity type and bundle and FALSE if it is not.
File
- src/
SynonymsService/ ProviderService.php, line 196
Class
- ProviderService
- A collection of handy provider-related methods.
Namespace
Drupal\synonyms\SynonymsServiceCode
public function serviceIsEnabled($entity_type, $bundle, $service_id) {
$status = \Drupal::config('synonyms_' . $service_id . '.behavior.' . $entity_type . '.' . $bundle)
->get('status');
return !empty($status);
}