You are here

public static function ChartDataCollectorTable::getElementState in Charts 8.4

Same name and namespace in other branches
  1. 5.0.x src/Element/ChartDataCollectorTable.php \Drupal\charts\Element\ChartDataCollectorTable::getElementState()

Gets the element state.

Parameters

array $parents: The element parents.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The element state.

4 calls to ChartDataCollectorTable::getElementState()
BaseSettings::chartPreviewSubmit in src/Element/BaseSettings.php
Submit callback for the preview button.
BaseSettings::processSeriesForm in src/Element/BaseSettings.php
Process series form.
ChartDataCollectorTable::processDataCollectorTable in src/Element/ChartDataCollectorTable.php
Processes the element to render a table to collect a data for the chart.
ChartDataCollectorTable::tableOperationSubmit in src/Element/ChartDataCollectorTable.php
Submit callback for table add and delete operations.

File

src/Element/ChartDataCollectorTable.php, line 484

Class

ChartDataCollectorTable
Provides a chart data collector table form element.

Namespace

Drupal\charts\Element

Code

public static function getElementState(array $parents, FormStateInterface $form_state) {
  $parents = array_merge([
    'element_state',
    '#parents',
  ], $parents);
  return NestedArray::getValue($form_state
    ->getStorage(), $parents);
}