You are here

protected function HttpServiceApiPreviewForm::getParameterType 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::getParameterType()

Get parameter type.

Parameters

\GuzzleHttp\Command\Guzzle\Parameter $param: A Parameter object.

Return value

string A formatted Parameter type.

1 call to HttpServiceApiPreviewForm::getParameterType()
HttpServiceApiPreviewForm::buildForm in src/Form/HttpServiceApiPreviewForm.php
Form constructor.

File

src/Form/HttpServiceApiPreviewForm.php, line 254

Class

HttpServiceApiPreviewForm
Class HttpServiceApiPreviewForm.

Namespace

Drupal\http_client_manager\Form

Code

protected function getParameterType(Parameter $param) {
  $type = $param
    ->getType();
  if ($type != 'array') {
    return ucfirst($type);
  }
  $childType = $param
    ->getItems()
    ->getType();
  return '<List>' . ucfirst($childType);
}