protected function LingotekImportForm::downloadDocuments in Lingotek Translation 8
1 call to LingotekImportForm::downloadDocuments()
- LingotekImportForm::buildForm in src/
Form/ LingotekImportForm.php - Form constructor.
File
- src/
Form/ LingotekImportForm.php, line 200 - Contains \Drupal\Lingotek\Form\LingotekManagementForm.
Class
- LingotekImportForm
- @file Contains \Drupal\Lingotek\Form\LingotekManagementForm.
Namespace
Drupal\lingotek\FormCode
protected function downloadDocuments($args = array()) {
$translation_service = \Drupal::service('lingotek.content_translation');
$response = $this->lingotek
->downloadDocuments($args);
$data = json_decode($response);
$count = 0;
foreach ($data->entities as $entity) {
$this->docs[] = $entity;
$count++;
}
return $count;
}