You are here

public function Lingotek::setProjectCallBackUrl in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  2. 4.0.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  3. 3.0.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  4. 3.1.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  5. 3.2.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  6. 3.3.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  7. 3.4.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  8. 3.5.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  9. 3.6.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  10. 3.7.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()
  11. 3.8.x src/Lingotek.php \Drupal\lingotek\Lingotek::setProjectCallBackUrl()

Overrides LingotekInterface::setProjectCallBackUrl

File

src/Lingotek.php, line 130
Contains \Drupal\lingotek\Lingotek.

Class

Lingotek

Namespace

Drupal\lingotek

Code

public function setProjectCallBackUrl($project_id, $callback_url) {
  $args = array(
    'format' => 'JSON',
    'callback_url' => $callback_url,
  );
  $response = $this->api
    ->setProjectCallBackUrl($project_id, $args);
  if ($response
    ->getStatusCode() == Response::HTTP_NO_CONTENT) {
    return TRUE;
  }

  //TODO: Log item
  return FALSE;
}