You are here

public function FrxSection::configForm in Forena Reports 8

Generate configuration.

File

src/FrxPlugin/Template/FrxSection.php, line 38

Class

FrxSection

Namespace

Drupal\forena\Template

Code

public function configForm() {
  $config = $this->configuration;
  $form['sections'] = array(
    '#theme' => 'forena_element_draggable',
    '#draggable_id' => 'FrxContainer-sections',
  );
  if (isset($config['sections'])) {
    foreach ($config['sections'] as $id => $section) {
      $ctl = array();
      $ctl['id'] = array(
        '#type' => 'item',
        '#markup' => $id,
        '#title' => 'id',
      );
      $ctl['markup'] = array(
        '#type' => 'value',
        '#value' => $section['markup'],
      );
      $ctl['class_label'] = array(
        '#type' => 'item',
        '#markup' => @$section['class'],
        '#title' => t('Type'),
      );
      $ctl['class'] = array(
        '#type' => 'value',
        '#value' => @$section['class'],
      );

      // $ctl['display'] = array('#type' => 'item', '#title' => 'html',  '#markup' =>$section['markup']);
      $form['sections'][$id] = $ctl;
    }
  }
  return $form;
}