public function LingotekConfigurationService::getConfigDefaultProfileId in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 4.0.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.0.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.1.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.2.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.3.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.4.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.5.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.6.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.7.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
- 3.8.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getConfigDefaultProfileId()
Determines the default Lingotek profile for the given config object.
@returns string The profile id.
Parameters
string $plugin_id: The type of the config.
bool $provide_default: If TRUE, and the entity does not have a profile, will retrieve the default for this entity type and bundle. Defaults to TRUE.
Overrides LingotekConfigurationServiceInterface::getConfigDefaultProfileId
1 call to LingotekConfigurationService::getConfigDefaultProfileId()
- LingotekConfigurationService::getConfigProfile in src/
LingotekConfigurationService.php - Determines the default Lingotek profile for the given entity.
File
- src/
LingotekConfigurationService.php, line 71 - Contains \Drupal\lingotek\LingotekConfigurationService.
Class
- LingotekConfigurationService
- Service for managing lingotek configuration.
Namespace
Drupal\lingotekCode
public function getConfigDefaultProfileId($plugin_id, $provide_default = TRUE) {
$config = \Drupal::config('lingotek.settings');
$profile_id = $config
->get('translate.config.' . $plugin_id . '.profile');
if ($provide_default && $profile_id === NULL) {
$profile_id = Lingotek::PROFILE_AUTOMATIC;
}
return $profile_id;
}