You are here

interface WebformAnalysisInterface in Webform Analysis 8

Defines an interface for webform analysis classes.

Hierarchy

Expanded class hierarchy of WebformAnalysisInterface

All classes that implement WebformAnalysisInterface

1 file declares its use of WebformAnalysisInterface
WebformAnalysisBlock.php in src/Plugin/Block/WebformAnalysisBlock.php

File

src/WebformAnalysisInterface.php, line 8

Namespace

Drupal\webform_analysis
View source
interface WebformAnalysisInterface {

  /**
   * Get Webform.
   *
   * @return \Drupal\webform\WebformInterface
   *   Webform object.
   */
  public function getWebform();

  /**
   * Set components and save webform.
   *
   * @param array $components
   *   The components name.
   */
  public function setComponents(array $components = []);

  /**
   * Get Components.
   *
   * @return array
   *   Components.
   */
  public function getComponents();

  /**
   * Set Chart Type.
   *
   * @param string $chart_type
   *   Set chart type and save webform.
   */
  public function setChartType($chart_type = '');

  /**
   * Get Chart Type.
   *
   * @return array
   *   Chart type.
   */
  public function getChartType();

  /**
   * Get Elements.
   *
   * @return array
   *   Element.
   */
  public function getElements();

  /**
   * Get Component Values Count.
   *
   * @param string $component
   *   The component name.
   *
   * @return array
   *   Values.
   */
  public function getComponentValuesCount($component);

  /**
   * Get Component Rows.
   *
   * @param string $component
   *   The component name.
   * @param array $header
   *   The first line data.
   * @param bool $value_label_with_count
   *   If true, add count to label.
   *
   * @return array
   *   Rows.
   */
  public function getComponentRows($component, array $header = [], $value_label_with_count = FALSE);

  /**
   * Get Component title.
   *
   * @param string $component
   *   The component name.
   *
   * @return string
   *   Component title.
   */
  public function getComponentTitle($component);

  /**
   * Is Int.
   *
   * @param string $i
   *   String Number.
   *
   * @return bool
   *   Is Int.
   */
  public function isInt($i = '');

  /**
   * Cast Numeric.
   *
   * @param string $i
   *   String Number.
   *
   * @return string
   *   Cast Numeric.
   */
  public function castNumeric($i = '');

  /**
   * Get Chart Type Options.
   *
   * @return array
   *   Chart Type Options.
   */
  public static function getChartTypeOptions();

}

Members

Namesort descending Modifiers Type Description Overrides
WebformAnalysisInterface::castNumeric public function Cast Numeric. 1
WebformAnalysisInterface::getChartType public function Get Chart Type. 1
WebformAnalysisInterface::getChartTypeOptions public static function Get Chart Type Options. 1
WebformAnalysisInterface::getComponentRows public function Get Component Rows. 1
WebformAnalysisInterface::getComponents public function Get Components. 1
WebformAnalysisInterface::getComponentTitle public function Get Component title. 1
WebformAnalysisInterface::getComponentValuesCount public function Get Component Values Count. 1
WebformAnalysisInterface::getElements public function Get Elements. 1
WebformAnalysisInterface::getWebform public function Get Webform. 1
WebformAnalysisInterface::isInt public function Is Int. 1
WebformAnalysisInterface::setChartType public function Set Chart Type. 1
WebformAnalysisInterface::setComponents public function Set components and save webform. 1