You are here

public static function ChartDataCollectorTable::setElementState in Charts 5.0.x

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

Sets the element state.

Parameters

array $parents: The element parents.

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

array $element_state: The element state.

5 calls to ChartDataCollectorTable::setElementState()
BaseSettings::chartPreviewSubmit in src/Element/BaseSettings.php
Submit callback for the preview button.
BaseSettings::processSeriesForm in src/Element/BaseSettings.php
Process series form.
ChartDataCollectorTable::importCsvToTableSubmit in src/Element/ChartDataCollectorTable.php
Submit callback for table csv import operations.
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 499

Class

ChartDataCollectorTable
Provides a chart data collector table form element.

Namespace

Drupal\charts\Element

Code

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