allowAdvancedRender example

'#default_value' => $this->options['element_default_classes'],
      '#description' => $this->t('Use default Views classes to identify the field, field label and field content.'),
      '#fieldset' => 'style_settings',
    ];

    $form['alter'] = [
      '#title' => $this->t('Rewrite results'),
      '#type' => 'details',
      '#weight' => 100,
    ];

    if ($this->allowAdvancedRender()) {
      $form['alter']['#tree'] = TRUE;
      $form['alter']['alter_text'] = [
        '#type' => 'checkbox',
        '#title' => $this->t('Override the output of this field with custom text'),
        '#default_value' => $this->options['alter']['alter_text'],
      ];

      $form['alter']['text'] = [
        '#title' => $this->t('Text'),
        '#type' => 'textarea',
        '#default_value' => $this->options['alter']['text'],
        
Home | Imprint | This part of the site doesn't use cookies.