You are here

public function DeveloperAppCreateForm::updateApiProductList in Apigee Edge 8

Ajax command that refreshes the API product list when owner changes.

Parameters

array $form: Form render array.

\Drupal\Core\Form\FormStateInterface $form_state: The form state object.

Return value

\Drupal\Core\Ajax\AjaxResponse The AJAX response.

File

src/Entity/Form/DeveloperAppCreateForm.php, line 141

Class

DeveloperAppCreateForm
General form handler for the developer app create.

Namespace

Drupal\apigee_edge\Entity\Form

Code

public function updateApiProductList(array $form, FormStateInterface $form_state) : AjaxResponse {
  $response = new AjaxResponse();
  $response
    ->addCommand(new ReplaceCommand('#api-products-ajax-wrapper', $this->renderer
    ->render($form['api_products'])));
  return $response;
}