function HtmxFragmentController::buildDeleteInsertPartial

Attributes

#[Route(path: '/test-htmx/htmx-fragment-missing', name: 'htmx_fragment_missing')]

File

core/modules/system/tests/modules/test_htmx/src/Controller/HtmxFragmentController.php, line 59

Class

HtmxFragmentController
Returns responses for HTMX Test Fixtures routes.

Namespace

Drupal\test_htmx\Controller

Code

public function buildDeleteInsertPartial() : array {
  return [
    'missing' => $this->buildPartial('div.does-not-exist', 'outerHTML'),
    'insert' => $this->buildPartial('[data-drupal-wrapper-selector="edit-partial-replace"]', 'outerHTML'),
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.