Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Custom.php

function Custom::defineOptions

Overrides FieldPluginBase::defineOptions

File

core/modules/views/src/Plugin/views/field/Custom.php, line 36

Class

Custom
A handler to provide a field that is completely custom by the administrator.

Namespace

Drupal\views\Plugin\views\field

Code

protected function defineOptions() {
    $options = parent::defineOptions();
    // Override the alter text option to always alter the text.
    $options['alter']['contains']['alter_text'] = [
        'default' => TRUE,
    ];
    $options['hide_alter_empty'] = [
        'default' => FALSE,
    ];
    return $options;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal