You are here

public function MostReaded::buildSettingsForm in Dashboards with Layout Builder 8

Same name and namespace in other branches
  1. 2.0.x modules/dashboards_statistic/src/Plugin/Dashboard/MostReaded.php \Drupal\dashboards_statistic\Plugin\Dashboard\MostReaded::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

modules/dashboards_statistic/src/Plugin/Dashboard/MostReaded.php, line 77

Class

MostReaded
Show account info.

Namespace

Drupal\dashboards_statistic\Plugin\Dashboard

Code

public function buildSettingsForm(array $form, FormStateInterface $form_state, array $configuration) : array {
  $options = [
    'totalcount' => $this
      ->t('Total count'),
    'daycount' => $this
      ->t('Dayly count'),
  ];
  $form['count'] = [
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => isset($configuration['count']) ? $configuration['count'] : FALSE,
  ];
  return $form;
}