You are here

class WebformNumericViews in Webform Views Integration 8.5

Webform views handler for numeric webform elements.

Hierarchy

Expanded class hierarchy of WebformNumericViews

1 file declares its use of WebformNumericViews
webform_views.module in ./webform_views.module
Webform integration with views.

File

src/WebformElementViews/WebformNumericViews.php, line 10

Namespace

Drupal\webform_views\WebformElementViews
View source
class WebformNumericViews extends WebformDefaultViews {

  /**
   * {@inheritdoc}
   */
  public function getElementViewsData(WebformElementInterface $element_plugin, array $element) {
    $views_data = parent::getElementViewsData($element_plugin, $element);
    $views_data['field']['id'] = 'webform_submission_field_numeric';
    $views_data['sort']['id'] = 'webform_submission_field_numeric_sort';
    $views_data['argument']['id'] = 'numeric';
    $views_data['filter'] = [
      'id' => 'webform_submission_numeric_filter',
      'real field' => 'value',
      'explicit_cast' => TRUE,
    ];
    return $views_data;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
WebformElementViewsAbstract::$entityType protected property Webform submission entity type.
WebformElementViewsAbstract::$webformElementManager protected property
WebformElementViewsAbstract::create public static function Instantiates a new instance of this class. Overrides ContainerInjectionInterface::create
WebformElementViewsAbstract::getViewsData public function Generate views data related to a given element of a given webform. Overrides WebformElementViewsInterface::getViewsData 2
WebformElementViewsAbstract::tableName protected function Generate views table name that represents a given element within a webform.
WebformElementViewsAbstract::__construct public function WebformElementViewsAbstract constructor. 2
WebformNumericViews::getElementViewsData public function Generate views data definition that corresponds to given webform element. Overrides WebformDefaultViews::getElementViewsData