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

Breadcrumb

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

function RelationshipPluginBase::defineOptions

Overrides HandlerBase::defineOptions

4 calls to RelationshipPluginBase::defineOptions()
GroupwiseMax::defineOptions in core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
Information about options for all kinds of purposes will be held here.
GroupwiseMax::defineOptions in core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
Information about options for all kinds of purposes will be held here.
NodeTermData::defineOptions in core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
Information about options for all kinds of purposes will be held here.
NodeTermData::defineOptions in core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
Information about options for all kinds of purposes will be held here.
2 methods override RelationshipPluginBase::defineOptions()
GroupwiseMax::defineOptions in core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
Information about options for all kinds of purposes will be held here.
NodeTermData::defineOptions in core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
Information about options for all kinds of purposes will be held here.

File

core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php, line 89

Class

RelationshipPluginBase
Relationship plugin base.

Namespace

Drupal\views\Plugin\views\relationship

Code

protected function defineOptions() {
    $options = parent::defineOptions();
    // Relationships definitions should define a default label, but if they
    // aren't get another default value.
    if (!empty($this->definition['label'])) {
        // Cast the label to a string since it is an object.
        // @see \Drupal\Core\StringTranslation\TranslatableMarkup
        $label = (string) $this->definition['label'];
    }
    else {
        $label = !empty($this->definition['field']) ? $this->definition['field'] : $this->definition['base field'];
    }
    $options['admin_label']['default'] = $label;
    $options['required'] = [
        '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