DataCollectorTableTestForm.php in Charts 8.4
File
tests/modules/charts_test/src/Form/DataCollectorTableTestForm.php
View source
<?php
namespace Drupal\charts_test\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
class DataCollectorTableTestForm extends FormBase {
const INITIAL_ROWS = 3;
const INITIAL_COLUMNS = 2;
public function getFormId() {
return 'charts_data_collector_table_test_form';
}
public function buildForm(array $form, FormStateInterface $form_state) {
$form['series'] = [
'#type' => 'chart_data_collector_table',
'#initial_rows' => self::INITIAL_ROWS,
'#initial_columns' => self::INITIAL_COLUMNS,
'#table_drag' => FALSE,
];
return $form;
}
public function submitForm(array &$form, FormStateInterface $form_state) {
}
}