You are here

public function BatStateWidget::build in Booking and Availability Management Tools for Drupal 8

Builds the facet widget for rendering.

Parameters

\Drupal\facets\FacetInterface $facet: The facet we need to build.

Return value

array A renderable array.

Overrides LinksWidget::build

File

modules/bat_facets/src/Plugin/facets/widget/BatStateWidget.php, line 34
Contains \Drupal\bat_facets\Plugin\facets\widget\BatStateWidget.

Class

BatStateWidget
Plugin annotation @FacetsWidget( id = "bat_state", label = @Translation("BAT State"), description = @Translation("A configurable widget for BAT"), )

Namespace

Drupal\bat_facets\Plugin\facets\widget

Code

public function build(FacetInterface $facet) {
  $build = $this->formBuilder
    ->getForm('Drupal\\bat_facets\\Form\\FacetsAvailabilityForm');
  return $build;
}