You are here

public function FacetController::editForm in Facets 8

Returns a form to edit a facet on a Search API index.

Parameters

\Drupal\facets\FacetInterface $facets_facet: Facet currently being edited.

Return value

array The facet edit form.

File

src/Controller/FacetController.php, line 23

Class

FacetController
Provides route responses for facets.

Namespace

Drupal\facets\Controller

Code

public function editForm(FacetInterface $facets_facet) {
  $facet = $this
    ->entityTypeManager()
    ->getStorage('facets_facet')
    ->load($facets_facet
    ->id());
  return $this
    ->entityFormBuilder()
    ->getForm($facet, 'default');
}