You are here

public function LingotekApi::assignProjectManager in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::assignProjectManager()
  2. 7.2 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::assignProjectManager()
  3. 7.4 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::assignProjectManager()
  4. 7.5 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::assignProjectManager()
  5. 7.6 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::assignProjectManager()

Assigns a user to a project. (Must be done by an community admin) Returns TRUE or FALSE This will only return TRUE the first time.

1 call to LingotekApi::assignProjectManager()
LingotekApi::checkUserWorkbenchLinkPermissions in lib/Drupal/lingotek/LingotekApi.php
Configures the Lingotek community to allow the local Drupal user to use the Workbench.

File

lib/Drupal/lingotek/LingotekApi.php, line 675
Defines Drupal\lingotek\LingotekApi

Class

LingotekApi
@file Defines Drupal\lingotek\LingotekApi

Code

public function assignProjectManager($projectId, $userId) {
  $result = FALSE;
  if (isset($projectId) && isset($userId)) {
    $parameters = array(
      'projectId' => $projectId,
      'managerUserId' => $userId,
    );
    $output = $this
      ->request('assignProjectManager', $parameters);
    if ($output) {
      if ($output->results == 'success') {
        $result = TRUE;
      }
    }
  }
  return $result;
}