class LingotekManagementForm in Lingotek Translation 3.1.x
Same name and namespace in other branches
- 8 src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 8.2 src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 4.0.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 3.0.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 3.2.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 3.3.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 3.4.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 3.5.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 3.6.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 3.7.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
- 3.8.x src/Form/LingotekManagementForm.php \Drupal\lingotek\Form\LingotekManagementForm
Form for bulk management of content.
Hierarchy
- class \Drupal\Core\Form\FormBase implements ContainerInjectionInterface, FormInterface uses DependencySerializationTrait, LoggerChannelTrait, MessengerTrait, RedirectDestinationTrait, StringTranslationTrait
- class \Drupal\lingotek\Form\LingotekManagementFormBase uses LingotekManagementFormHelperTrait, LingotekSetupTrait
- class \Drupal\lingotek\Form\LingotekManagementForm
- class \Drupal\lingotek\Form\LingotekManagementFormBase uses LingotekManagementFormHelperTrait, LingotekSetupTrait
Expanded class hierarchy of LingotekManagementForm
1 file declares its use of LingotekManagementForm
- LingotekManagementFormTest.php in tests/
src/ Unit/ Form/ LingotekManagementFormTest.php
File
- src/
Form/ LingotekManagementForm.php, line 15
Namespace
Drupal\lingotek\FormView source
class LingotekManagementForm extends LingotekManagementFormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return 'lingotek_management';
}
/**
* {@inheritdoc}
*/
protected function getHeaders() {
$entity_type = $this->entityTypeManager
->getDefinition($this->entityTypeId);
$properties = $this->entityFieldManager
->getBaseFieldDefinitions($this->entityTypeId);
$has_bundles = $entity_type
->get('bundle_entity_type') != 'bundle';
if ($has_bundles) {
$headers['bundle'] = $entity_type
->getBundleLabel();
}
$headers += [
'title' => $has_bundles && $entity_type
->hasKey('label') ? $properties[$entity_type
->getKey('label')]
->getLabel() : $entity_type
->getLabel(),
'source' => $this
->t('Source'),
'translations' => $this
->t('Translations'),
'profile' => $this
->t('Profile'),
'job_id' => $this
->t('Job ID'),
];
return $headers;
}
/**
* {@inheritdoc}
*/
protected function getFilteredEntities() {
$items_per_page = $this
->getItemsPerPage();
/** @var PrivateTempStore $temp_store */
$temp_store = $this->tempStoreFactory
->get($this
->getTempStorageFilterKey());
/** @var \Drupal\Core\Entity\EntityTypeInterface $entity_type */
$entity_type = $this->entityTypeManager
->getDefinition($this->entityTypeId);
/** @var \Drupal\Core\Database\Query\SelectInterface $query */
$query = $this->connection
->select($entity_type
->getBaseTable(), 'entity_table')
->extend('\\Drupal\\Core\\Database\\Query\\PagerSelectExtender');
$query
->fields('entity_table', [
$entity_type
->getKey('id'),
]);
$union = NULL;
$union2 = NULL;
$has_bundles = $entity_type
->get('bundle_entity_type') != 'bundle';
$groupsExists = $this->moduleHandler
->moduleExists('group') && $this->entityTypeId === 'node';
// Filter results
// Default options
$labelFilter = $temp_store
->get('label');
$bundleFilter = $temp_store
->get('bundle');
$groupFilter = $groupsExists ? $temp_store
->get('group') : NULL;
$jobFilter = $temp_store
->get('job');
// Advanced options
$documentIdFilter = $temp_store
->get('document_id');
$entityIdFilter = $temp_store
->get('entity_id');
$sourceLanguageFilter = $temp_store
->get('source_language');
$sourceStatusFilter = $temp_store
->get('source_status');
$targetStatusFilter = $temp_store
->get('target_status');
$profileFilter = $temp_store
->get('profile');
if ($sourceStatusFilter) {
if ($sourceStatusFilter === 'UPLOAD_NEEDED') {
// We consider that "Upload Needed" includes those never uploaded or
// disassociated, edited, or with error on last upload.
$needingUploadStatuses = [
Lingotek::STATUS_EDITED,
Lingotek::STATUS_REQUEST,
Lingotek::STATUS_CANCELLED,
Lingotek::STATUS_ERROR,
];
$metadata_type = $this->entityTypeManager
->getDefinition('lingotek_content_metadata');
$query
->innerJoin($metadata_type
->getBaseTable(), 'metadata_source', 'entity_table.' . $entity_type
->getKey('id') . '= metadata_source.content_entity_id AND metadata_source.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$query
->innerJoin('lingotek_content_metadata__translation_status', 'translation_status', 'metadata_source.id = translation_status.entity_id AND translation_status.translation_status_language = entity_table.' . $entity_type
->getKey('langcode'));
$query
->condition('translation_status.translation_status_value', $needingUploadStatuses, 'IN');
// No metadata.
$no_metadata_query = $this->connection
->select($metadata_type
->getBaseTable(), 'mt');
$no_metadata_query
->fields('mt', [
$metadata_type
->getKey('id'),
]);
$no_metadata_query
->where('entity_table.' . $entity_type
->getKey('id') . ' = mt.content_entity_id');
$no_metadata_query
->condition('mt.content_entity_type_id', $entity_type
->id());
$union = $this->connection
->select($entity_type
->getBaseTable(), 'entity_table');
$union
->fields('entity_table', [
$entity_type
->getKey('id'),
]);
$union
->condition('entity_table.' . $entity_type
->getKey('langcode'), LanguageInterface::LANGCODE_NOT_SPECIFIED, '!=');
$union
->notExists($no_metadata_query);
// No target statuses.
$no_statuses_query = $this->connection
->select('lingotek_content_metadata__translation_status', 'tst');
$no_statuses_query
->fields('tst', [
'entity_id',
]);
$no_statuses_query
->where('mt2.' . $metadata_type
->getKey('id') . ' = tst.entity_id');
$union2 = $this->connection
->select($entity_type
->getBaseTable(), 'entity_table');
$union2
->innerJoin($metadata_type
->getBaseTable(), 'mt2', 'entity_table.' . $entity_type
->getKey('id') . '= mt2.content_entity_id AND mt2.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union2
->fields('entity_table', [
$entity_type
->getKey('id'),
]);
$union2
->condition('entity_table.' . $entity_type
->getKey('langcode'), LanguageInterface::LANGCODE_NOT_SPECIFIED, '!=');
$union2
->notExists($no_statuses_query);
$query
->union($union);
$query
->union($union2);
}
else {
$metadata_type = $this->entityTypeManager
->getDefinition('lingotek_content_metadata');
$query
->innerJoin($metadata_type
->getBaseTable(), 'metadata_source', 'entity_table.' . $entity_type
->getKey('id') . '= metadata_source.content_entity_id AND metadata_source.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$query
->innerJoin('lingotek_content_metadata__translation_status', 'translation_status', 'metadata_source.id = translation_status.entity_id AND translation_status.translation_status_language = entity_table.' . $entity_type
->getKey('langcode'));
$query
->condition('translation_status.translation_status_value', $sourceStatusFilter);
}
}
// Default queries
if ($has_bundles && $bundleFilter) {
if (!in_array("", $bundleFilter, TRUE)) {
$query
->condition('entity_table.' . $entity_type
->getKey('bundle'), $bundleFilter, 'IN');
if ($union !== NULL) {
$union
->condition('entity_table.' . $entity_type
->getKey('bundle'), $bundleFilter, 'IN');
}
if ($union2 !== NULL) {
$union2
->condition('entity_table.' . $entity_type
->getKey('bundle'), $bundleFilter, 'IN');
}
}
}
if ($labelFilter) {
$labelKey = $entity_type
->getKey('label');
if ($labelKey) {
$query
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$query
->condition('entity_data.' . $labelKey, '%' . $labelFilter . '%', 'LIKE');
if ($union !== NULL) {
$union
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$union
->condition('entity_data.' . $labelKey, '%' . $labelFilter . '%', 'LIKE');
}
if ($union2 !== NULL) {
$union2
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$union2
->condition('entity_data.' . $labelKey, '%' . $labelFilter . '%', 'LIKE');
}
}
}
if ($groupFilter) {
/** @var \Drupal\group\Plugin\GroupContentEnablerManagerInterface $groupContentEnablers */
$groupType = Group::load($groupFilter)
->getGroupType();
$groupContentEnablers = \Drupal::service('plugin.manager.group_content_enabler');
$definitions = $groupContentEnablers
->getDefinitions();
$definitions = array_filter($definitions, function ($definition) {
return $definition['entity_type_id'] === 'node';
});
$valid_values = [];
foreach ($definitions as $node_definition) {
$valid_values[] = $groupType
->id() . '-' . $node_definition['id'] . '-' . $node_definition['entity_bundle'];
}
$query
->innerJoin('group_content_field_data', 'group_content', 'entity_table.' . $entity_type
->getKey('id') . '= group_content.entity_id');
$query
->condition('group_content.gid', $groupFilter);
$query
->condition('group_content.type', $valid_values, 'IN');
if ($union !== NULL) {
$union
->innerJoin('group_content_field_data', 'group_content', 'entity_table.' . $entity_type
->getKey('id') . '= group_content.entity_id');
$union
->condition('group_content.gid', $groupFilter);
$union
->condition('group_content.type', $valid_values, 'IN');
}
if ($union2 !== NULL) {
$union2
->innerJoin('group_content_field_data', 'group_content', 'entity_table.' . $entity_type
->getKey('id') . '= group_content.entity_id');
$union2
->condition('group_content.gid', $groupFilter);
$union2
->condition('group_content.type', $valid_values, 'IN');
}
}
if ($jobFilter) {
/** @var \Drupal\Core\Entity\EntityTypeInterface $metadata_type */
$metadata_type = $this->entityTypeManager
->getDefinition('lingotek_content_metadata');
$query
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$query
->condition('metadata.job_id', '%' . $jobFilter . '%', 'LIKE');
if ($union !== NULL) {
$union
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union
->condition('metadata.job_id', '%' . $jobFilter . '%', 'LIKE');
}
if ($union2 !== NULL) {
$union2
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union2
->condition('metadata.job_id', '%' . $jobFilter . '%', 'LIKE');
}
}
// Advanced queries
if ($documentIdFilter) {
$documentIdArray = explode(',', $documentIdFilter);
array_walk($documentIdArray, function (&$value) {
$value = trim($value);
});
$documentIdOperator = count($documentIdArray) > 1 ? 'IN' : 'LIKE';
$documentIdValue = count($documentIdArray) > 1 ? $documentIdArray : '%' . $documentIdFilter . '%';
$metadata_type = $this->entityTypeManager
->getDefinition('lingotek_content_metadata');
$query
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$query
->condition('metadata.document_id', $documentIdValue, $documentIdOperator);
if ($union !== NULL) {
$union
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union
->condition('metadata.document_id', $documentIdValue, $documentIdOperator);
}
if ($union2 !== NULL) {
$union2
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union2
->condition('metadata.document_id', $documentIdValue, $documentIdOperator);
}
}
if ($entityIdFilter) {
$entityIdArray = explode(',', $entityIdFilter);
array_walk($entityIdArray, function (&$value) {
$value = trim($value);
});
$entityIdOperator = count($entityIdArray) > 1 ? 'IN' : '=';
$entityIdValue = count($entityIdArray) > 1 ? $entityIdArray : $entityIdFilter;
$query
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$query
->condition('entity_table.' . $entity_type
->getKey('id'), $entityIdValue, $entityIdOperator);
if ($union !== NULL) {
$union
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$union
->condition('entity_table.' . $entity_type
->getKey('id'), $entityIdValue, $entityIdOperator);
}
if ($union2 !== NULL) {
$union2
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$union2
->condition('entity_table.' . $entity_type
->getKey('id'), $entityIdValue, $entityIdOperator);
}
}
if ($profileFilter) {
$profileOptions = $this->lingotekConfiguration
->getProfileOptions();
if (is_string($profileFilter)) {
$profileFilter = [
$profileFilter,
];
}
if (!in_array("", $profileFilter, TRUE)) {
$metadata_type = $this->entityTypeManager
->getDefinition('lingotek_content_metadata');
$query
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$query
->condition('metadata.profile', $profileFilter, 'IN');
if ($union !== NULL) {
$union
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union
->condition('metadata.profile', $profileFilter, 'IN');
}
if ($union2 !== NULL) {
$union2
->innerJoin($metadata_type
->getBaseTable(), 'metadata', 'entity_table.' . $entity_type
->getKey('id') . '= metadata.content_entity_id AND metadata.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union2
->condition('metadata.profile', $profileFilter, 'IN');
}
}
}
if ($sourceLanguageFilter) {
$query
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$query
->condition('entity_table.' . $entity_type
->getKey('langcode'), $sourceLanguageFilter);
$query
->condition('entity_data.default_langcode', 1);
if ($union !== NULL) {
$union
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$union
->condition('entity_table.' . $entity_type
->getKey('langcode'), $sourceLanguageFilter);
$union
->condition('entity_data.default_langcode', 1);
}
if ($union2 !== NULL) {
$union2
->innerJoin($entity_type
->getDataTable(), 'entity_data', 'entity_table.' . $entity_type
->getKey('id') . '= entity_data.' . $entity_type
->getKey('id'));
$union2
->condition('entity_table.' . $entity_type
->getKey('langcode'), $sourceLanguageFilter);
$union2
->condition('entity_data.default_langcode', 1);
}
}
// We don't want items with language undefined.
$query
->condition('entity_table.' . $entity_type
->getKey('langcode'), LanguageInterface::LANGCODE_NOT_SPECIFIED, '!=');
if ($targetStatusFilter) {
$metadata_type = $this->entityTypeManager
->getDefinition('lingotek_content_metadata');
$query
->innerJoin($metadata_type
->getBaseTable(), 'metadata_target', 'entity_table.' . $entity_type
->getKey('id') . '= metadata_target.content_entity_id AND metadata_target.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$query
->innerJoin('lingotek_content_metadata__translation_status', 'translation_target_status', 'metadata_target.id = translation_target_status.entity_id AND translation_target_status.translation_status_language <> entity_table.' . $entity_type
->getKey('langcode'));
$query
->condition('translation_target_status.translation_status_value', $targetStatusFilter);
if ($union !== NULL) {
$union
->innerJoin($metadata_type
->getBaseTable(), 'metadata_target', 'entity_table.' . $entity_type
->getKey('id') . '= metadata_target.content_entity_id AND metadata_target.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union
->innerJoin('lingotek_content_metadata__translation_status', 'translation_target_status', 'metadata_target.id = translation_target_status.entity_id AND translation_target_status.translation_status_language <> entity_table.' . $entity_type
->getKey('langcode'));
$union
->condition('translation_target_status.translation_status_value', $targetStatusFilter);
}
if ($union2 !== NULL) {
$union2
->innerJoin($metadata_type
->getBaseTable(), 'metadata_target', 'entity_table.' . $entity_type
->getKey('id') . '= metadata_target.content_entity_id AND metadata_target.content_entity_type_id = \'' . $entity_type
->id() . '\'');
$union2
->innerJoin('lingotek_content_metadata__translation_status', 'translation_target_status', 'metadata_target.id = translation_target_status.entity_id AND translation_target_status.translation_status_language <> entity_table.' . $entity_type
->getKey('langcode'));
$union2
->condition('translation_target_status.translation_status_value', $targetStatusFilter);
}
}
$ids = $query
->limit($items_per_page)
->execute()
->fetchCol(0);
$entities = $this->entityTypeManager
->getStorage($this->entityTypeId)
->loadMultiple($ids);
return $entities;
}
/**
* {@inheritdoc}
*/
protected function getSelectedEntities($values) {
return $this->entityTypeManager
->getStorage($this->entityTypeId)
->loadMultiple($values);
}
/**
* {@inheritdoc}
*/
protected function getRows($entity_list) {
$rows = [];
foreach ($entity_list as $entity_id => $entity) {
$rows[$entity_id] = $this
->getRow($entity);
}
return $rows;
}
/**
* {@inheritdoc}
*/
protected function getFilters() {
$filters = [];
$temp_store = $this->tempStoreFactory
->get($this
->getTempStorageFilterKey());
$entity_type = $this->entityTypeManager
->getDefinition($this->entityTypeId);
$properties = $this->entityFieldManager
->getBaseFieldDefinitions($this->entityTypeId);
$has_bundles = $entity_type
->get('bundle_entity_type') != 'bundle';
$groupsExists = $this->moduleHandler
->moduleExists('group') && $this->entityTypeId === 'node';
$labelFilter = $temp_store
->get('label');
$bundleFilter = $temp_store
->get('bundle');
$groupFilter = $groupsExists ? $temp_store
->get('group') : NULL;
$jobFilter = $temp_store
->get('job');
if ($entity_type
->getKey('label')) {
$filters['label'] = [
'#type' => 'textfield',
'#title' => $has_bundles && $entity_type
->hasKey('label') ? $properties[$entity_type
->getKey('label')]
->getLabel() : $entity_type
->getLabel(),
'#placeholder' => $this
->t('Filter by @title', [
'@title' => $entity_type
->getBundleLabel(),
]),
'#default_value' => $labelFilter,
'#attributes' => [
'class' => [
'form-item',
],
],
];
}
if ($has_bundles) {
$filters['bundle'] = [
'#type' => 'select',
'#title' => $entity_type
->getBundleLabel(),
'#options' => [
'' => $this
->t('All'),
] + $this
->getAllBundles(),
'#default_value' => $bundleFilter,
'#attributes' => [
'class' => [
'form-item',
],
],
'#multiple' => TRUE,
];
}
if ($groupsExists) {
$filters['group'] = [
'#type' => 'select',
'#title' => $this
->t('Group'),
'#options' => [
'' => $this
->t('All'),
] + $this
->getAllGroups(),
'#default_value' => $groupFilter,
'#attributes' => [
'class' => [
'form-item',
],
],
];
}
$filters['job'] = [
'#type' => 'lingotek_job_id',
'#title' => $this
->t('Job ID'),
'#default_value' => $jobFilter,
'#attributes' => [
'class' => [
'form-item',
],
],
];
return $filters;
}
/**
* {@inheritdoc}
*/
protected function getPager() {
$items_per_page = $this
->getItemsPerPage();
return [
'#type' => 'select',
'#title' => $this
->t('Results per page:'),
'#options' => [
10 => 10,
25 => 25,
50 => 50,
100 => 100,
250 => 250,
500 => 500,
],
'#default_value' => $items_per_page,
'#weight' => 60,
'#ajax' => [
'callback' => [
$this,
'itemsPerPageCallback',
],
'event' => 'change',
],
];
}
/**
* {@inheritdoc}
*/
public function itemsPerPageCallback(array &$form, FormStateInterface $form_state) {
$ajax_response = new AjaxResponse();
$this
->setItemsPerPage($form_state
->getValue('items_per_page'));
$ajax_response
->addCommand(new InvokeCommand('#lingotek-management', 'submit'));
return $ajax_response;
}
/**
* {@inheritdoc}
*/
protected function getTempStorageFilterKey() {
return 'lingotek.management.filter.' . $this->entityTypeId;
}
/**
* {@inheritdoc}
*/
protected function getFilterKeys() {
$groupsExists = $this->moduleHandler
->moduleExists('group') && $this->entityTypeId === 'node';
// We need specific identifiers for default and advanced filters since the advanced filters bundle is unique.
$filtersKeys = [
[
'wrapper',
'label',
],
[
'wrapper',
'bundle',
],
[
'wrapper',
'job',
],
[
'advanced_options',
'document_id',
],
[
'advanced_options',
'entity_id',
],
[
'advanced_options',
'profile',
],
[
'advanced_options',
'source_language',
],
[
'advanced_options',
'source_status',
],
[
'advanced_options',
'target_status',
],
];
if ($groupsExists) {
$filtersKeys[] = [
'wrapper',
'group',
];
}
return $filtersKeys;
}
public function getEntityTypeId() {
return $this->entityTypeId;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
public | function | 2 | |
DependencySerializationTrait:: |
public | function | 2 | |
FormBase:: |
protected | property | The config factory. | 3 |
FormBase:: |
protected | property | The request stack. | 1 |
FormBase:: |
protected | property | The route match. | |
FormBase:: |
protected | function | Retrieves a configuration object. | |
FormBase:: |
protected | function | Gets the config factory for this form. | 3 |
FormBase:: |
private | function | Returns the service container. | |
FormBase:: |
protected | function | Gets the current user. | |
FormBase:: |
protected | function | Gets the request object. | |
FormBase:: |
protected | function | Gets the route match. | |
FormBase:: |
protected | function | Gets the logger for a specific channel. | |
FormBase:: |
protected | function | Returns a redirect response object for the specified route. | |
FormBase:: |
public | function | Resets the configuration factory. | |
FormBase:: |
public | function | Sets the config factory for this form. | |
FormBase:: |
public | function | Sets the request stack object to use. | |
FormBase:: |
public | function |
Form validation handler. Overrides FormInterface:: |
72 |
LingotekManagementForm:: |
public | function | ||
LingotekManagementForm:: |
protected | function |
Gets the entities that needs to be displayed based on the current filters. Overrides LingotekManagementFormBase:: |
|
LingotekManagementForm:: |
protected | function |
Gets the filter keys so we can persist or clear filtering options. Overrides LingotekManagementFormBase:: |
|
LingotekManagementForm:: |
protected | function |
Gets the filters for rendering. Overrides LingotekManagementFormBase:: |
|
LingotekManagementForm:: |
public | function |
Returns a unique string identifying the form. Overrides FormInterface:: |
|
LingotekManagementForm:: |
protected | function |
Overrides LingotekManagementFormBase:: |
|
LingotekManagementForm:: |
protected | function |
Gets the pager. Overrides LingotekManagementFormBase:: |
|
LingotekManagementForm:: |
protected | function |
Gets the rows for rendering based on the passed entity list. Overrides LingotekManagementFormBase:: |
|
LingotekManagementForm:: |
protected | function |
Load the entities corresponding with the given identifiers. Overrides LingotekManagementFormBase:: |
|
LingotekManagementForm:: |
protected | function |
Gets the key used for persisting filtering options in the temp storage. Overrides LingotekManagementFormBase:: |
|
LingotekManagementForm:: |
public | function | ||
LingotekManagementFormBase:: |
protected | property | The connection object on which to run queries. | |
LingotekManagementFormBase:: |
protected | property | The content translation manager. | |
LingotekManagementFormBase:: |
protected | property | The entity field manager. | |
LingotekManagementFormBase:: |
protected | property | The entity type bundle info. | |
LingotekManagementFormBase:: |
protected | property | The entity type id. | |
LingotekManagementFormBase:: |
protected | property | The entity manager. | |
LingotekManagementFormBase:: |
protected | property | The language-locale mapper. | |
LingotekManagementFormBase:: |
protected | property | The language manager. | |
LingotekManagementFormBase:: |
protected | property | The Lingotek configuration service. | |
LingotekManagementFormBase:: |
protected | property | The module handler. | |
LingotekManagementFormBase:: |
protected | property | The state key value store. | |
LingotekManagementFormBase:: |
protected | property | The Lingotek content translation service. | |
LingotekManagementFormBase:: |
public | function | Batch callback called when the batch finishes. | |
LingotekManagementFormBase:: |
public | function |
Form constructor. Overrides FormInterface:: |
2 |
LingotekManagementFormBase:: |
public | function | Cancel the content from Lingotek. | |
LingotekManagementFormBase:: |
public | function | Cancel the content from Lingotek. | |
LingotekManagementFormBase:: |
protected | function | Check if we can delete content in bulk based on the entity definition. | 2 |
LingotekManagementFormBase:: |
protected | function | Check if we can delete translation in bulk based on the entity definition. | 2 |
LingotekManagementFormBase:: |
public | function | Change Translation Profile. | |
LingotekManagementFormBase:: |
public | function | Check document upload status for a given content. | |
LingotekManagementFormBase:: |
public | function | Checks translation status for a given content in a given language. | |
LingotekManagementFormBase:: |
public | function | Checks all translations statuses for a given content. | |
LingotekManagementFormBase:: |
public static | function |
Instantiates a new instance of this class. Overrides FormBase:: |
2 |
LingotekManagementFormBase:: |
protected | function | Performs an operation to several values in a batch. | |
LingotekManagementFormBase:: |
protected | function | Create and set a cancellation batch. | |
LingotekManagementFormBase:: |
protected | function | Create and set a profile change batch. | |
LingotekManagementFormBase:: |
protected | function | Create and set an export batch. | |
LingotekManagementFormBase:: |
protected | function | Create and set a request target and download batch for all languages. | |
LingotekManagementFormBase:: |
protected | function | Create and set a request target and download batch for a given language. | |
LingotekManagementFormBase:: |
protected | function | Create and set a request translations batch for all languages. | |
LingotekManagementFormBase:: |
protected | function | Create and set a check translation status batch for a given language. | |
LingotekManagementFormBase:: |
protected | function | Create and set a request translations batch for all languages. | |
LingotekManagementFormBase:: |
protected | function | Create and set a target cancellation batch. | |
LingotekManagementFormBase:: |
protected | function | Create and set a check translation status batch for all languages. | |
LingotekManagementFormBase:: |
protected | function | Create and set an upload batch. | |
LingotekManagementFormBase:: |
protected | function | Create and set a check upload status batch. | |
LingotekManagementFormBase:: |
public | function | Export source for debugging purposes. | |
LingotekManagementFormBase:: |
public | function | Batch callback called when the debug export batch finishes. | |
LingotekManagementFormBase:: |
public | function | Download translation for a given content in a given language. | |
LingotekManagementFormBase:: |
public | function | Download translations for a given content in all enabled languages. | |
LingotekManagementFormBase:: |
public | function | Form submission handler for filtering. | |
LingotekManagementFormBase:: |
public | function | Get the bulk operations for the management form. | |
LingotekManagementFormBase:: |
protected | function | Gets all the bundles as options. | |
LingotekManagementFormBase:: |
protected | function | Gets all the groups as options. | |
LingotekManagementFormBase:: |
protected | function | Gets all the languages as options. | |
LingotekManagementFormBase:: |
protected | function | Gets the bulk options form array structure. | 1 |
LingotekManagementFormBase:: |
protected | function | ||
LingotekManagementFormBase:: |
protected | function | Gets a rows fo rendering based on the passed entity. | 2 |
LingotekManagementFormBase:: |
protected | function | Gets the source status of an entity in a format ready to display. | |
LingotekManagementFormBase:: |
protected | function | Gets the translation status of an entity in a format ready to display. | |
LingotekManagementFormBase:: |
protected | function | Redirect to assign Job ID form. | |
LingotekManagementFormBase:: |
protected | function | Redirect to clear Job ID form. | |
LingotekManagementFormBase:: |
protected | function | Redirect to delete content form. | |
LingotekManagementFormBase:: |
protected | function | Redirect to delete translations form. | |
LingotekManagementFormBase:: |
protected | function | Redirect to delete specific translation form. | |
LingotekManagementFormBase:: |
public | function | Request translations for a given content in a given language. | |
LingotekManagementFormBase:: |
public | function | Request all translations for a given content. | |
LingotekManagementFormBase:: |
public | function | Form submission handler for resetting the filters. | |
LingotekManagementFormBase:: |
public | function |
Form submission handler. Overrides FormInterface:: |
|
LingotekManagementFormBase:: |
public | function | Upload source for translation. | |
LingotekManagementFormBase:: |
public | function | Constructs a new LingotekManagementFormBase object. | 2 |
LingotekManagementFormHelperTrait:: |
protected | property | The tempstore factory. | |
LingotekManagementFormHelperTrait:: |
protected | function | ||
LingotekManagementFormHelperTrait:: |
protected | function | ||
LingotekSetupTrait:: |
protected | property | A lingotek connector object | |
LingotekSetupTrait:: |
protected | function | Verify the Lingotek Translation module has been properly initialized. | |
LingotekSetupTrait:: |
public | function | Checks if Lingotek module is completely set up. | |
LoggerChannelTrait:: |
protected | property | The logger channel factory service. | |
LoggerChannelTrait:: |
protected | function | Gets the logger for a specific channel. | |
LoggerChannelTrait:: |
public | function | Injects the logger channel factory. | |
MessengerTrait:: |
protected | property | The messenger. | 27 |
MessengerTrait:: |
public | function | Gets the messenger. | 27 |
MessengerTrait:: |
public | function | Sets the messenger. | |
RedirectDestinationTrait:: |
protected | property | The redirect destination service. | 1 |
RedirectDestinationTrait:: |
protected | function | Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url. | |
RedirectDestinationTrait:: |
protected | function | Returns the redirect destination service. | |
RedirectDestinationTrait:: |
public | function | Sets the redirect destination service. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 4 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |