protected function LingotekConfigManagementForm::getMetadataJobId in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 4.0.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 3.0.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 3.1.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 3.2.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 3.3.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 3.4.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 3.5.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 3.7.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
- 3.8.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getMetadataJobId()
1 call to LingotekConfigManagementForm::getMetadataJobId()
- LingotekConfigManagementForm::buildForm in src/
Form/ LingotekConfigManagementForm.php - Form constructor.
File
- src/
Form/ LingotekConfigManagementForm.php, line 1797
Class
- LingotekConfigManagementForm
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
protected function getMetadataJobId($mapper) {
$job_id = NULL;
$metadata = NULL;
if ($mapper instanceof ConfigEntityMapper) {
$entity = $mapper
->getEntity();
$metadata = LingotekConfigMetadata::loadByConfigName($entity
->getEntityTypeId() . '.' . $entity
->id());
}
elseif ($mapper instanceof ConfigMapperInterface) {
$config_names = $mapper
->getConfigNames();
if ($config_names) {
$config_name = reset($config_names);
$metadata = LingotekConfigMetadata::loadByConfigName($config_name);
}
}
if ($metadata !== NULL) {
$job_id = $metadata
->getJobId();
}
return $job_id;
}