You are here

public function HttpServiceApiPreviewForm::title in HTTP Client Manager 8.2

Same name and namespace in other branches
  1. 8 src/Form/HttpServiceApiPreviewForm.php \Drupal\http_client_manager\Form\HttpServiceApiPreviewForm::title()

Route title callback.

Parameters

string $serviceApi: The service api name.

Return value

string The service api title.

1 string reference to 'HttpServiceApiPreviewForm::title'
http_client_manager.routing.yml in ./http_client_manager.routing.yml
http_client_manager.routing.yml

File

src/Form/HttpServiceApiPreviewForm.php, line 102

Class

HttpServiceApiPreviewForm
Class HttpServiceApiPreviewForm.

Namespace

Drupal\http_client_manager\Form

Code

public function title($serviceApi) {
  try {
    $api = $this->httpServicesApi
      ->load($serviceApi);
  } catch (\InvalidArgumentException $e) {
    $api['title'] = $this
      ->t('Http Service Api not found');
  }
  return $api['title'];
}