You are here

protected function HttpServiceApiPreviewForm::isHiddenCommand in HTTP Client Manager 8

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

Is hidden command.

Check if the given command has to be filtered out.

Parameters

string $commandName: The command name.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

bool Whether or not the command has to be hidden.

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

File

src/Form/HttpServiceApiPreviewForm.php, line 230

Class

HttpServiceApiPreviewForm
Class HttpServiceApiPreviewForm.

Namespace

Drupal\http_client_manager\Form

Code

protected function isHiddenCommand($commandName, FormStateInterface $form_state) {
  $search = trim($form_state
    ->getValue('search', FALSE));
  if (empty($search)) {
    return FALSE;
  }
  return $search != $commandName;
}