You are here

private function LingotekImportForm::get_projects in Lingotek Translation 8

1 call to LingotekImportForm::get_projects()
LingotekImportForm::buildForm in src/Form/LingotekImportForm.php
Form constructor.

File

src/Form/LingotekImportForm.php, line 23
Contains \Drupal\Lingotek\Form\LingotekManagementForm.

Class

LingotekImportForm
@file Contains \Drupal\Lingotek\Form\LingotekManagementForm.

Namespace

Drupal\lingotek\Form

Code

private function get_projects() {
  $communities = $this->lingotek
    ->getCommunities();
  $new_projects = array();
  foreach ($communities as $community_id => $community_name) {

    /**
     * @todo lingotek->getProjects() does not accept a parameter like this and
     * so this is not doing what was expected. It just returns the projects form
     * the defualt community.
     *
     */
    $projects = $this->lingotek
      ->getProjects($community_id);
    foreach ($projects as $project_id => $project_name) {
      $new_projects[$project_id] = $project_name;
    }
  }
  return $new_projects;
}