deleteCache example


  public function testDeleteCache() {
    $form_build_id = 'the_form_build_id';

    $this->formCacheStore->expects($this->once())
      ->method('delete')
      ->with($form_build_id);
    $this->formStateCacheStore->expects($this->once())
      ->method('delete')
      ->with($form_build_id);
    $this->formCache->deleteCache($form_build_id);
  }

}
/** * {@inheritdoc} */
  public function setCache($form_build_id$form, FormStateInterface $form_state) {
    $this->formCache->setCache($form_build_id$form$form_state);
  }

  /** * {@inheritdoc} */
  public function deleteCache($form_build_id) {
    $this->formCache->deleteCache($form_build_id);
  }

  /** * {@inheritdoc} */
  public function submitForm($form_arg, FormStateInterface &$form_state) {
    $build_info = $form_state->getBuildInfo();
    if (empty($build_info['args'])) {
      $args = func_get_args();
      // Remove $form and $form_state from the arguments.       unset($args[0]$args[1]);
      
Home | Imprint | This part of the site doesn't use cookies.