public function NodeStatistics::buildSettingsForm in Dashboards with Layout Builder 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Dashboard/NodeStatistics.php \Drupal\dashboards\Plugin\Dashboard\NodeStatistics::buildSettingsForm()
Build render array.
Parameters
array $form: Default form.
\Drupal\Core\Form\FormStateInterface $form_state: Default form.
array $configuration: Configuration.
Return value
array Return form array.
Overrides DashboardBase::buildSettingsForm
File
- src/
Plugin/ Dashboard/ NodeStatistics.php, line 65
Class
- NodeStatistics
- Show account info.
Namespace
Drupal\dashboards\Plugin\DashboardCode
public function buildSettingsForm(array $form, FormStateInterface $form_state, array $configuration) : array {
$form['chart_type'] = [
'#type' => 'select',
'#options' => $this
->getAllowedStyles(),
'#default_value' => isset($configuration['chart_type']) ? $configuration['chart_type'] : 'pie',
];
return $form;
}