function Attachment::attachmentPositions

Same name and namespace in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/display/Attachment.php \Drupal\views\Plugin\views\display\Attachment::attachmentPositions()
  2. 10 core/modules/views/src/Plugin/views/display/Attachment.php \Drupal\views\Plugin\views\display\Attachment::attachmentPositions()
  3. 11.x core/modules/views/src/Plugin/views/display/Attachment.php \Drupal\views\Plugin\views\display\Attachment::attachmentPositions()
2 calls to Attachment::attachmentPositions()
Attachment::buildOptionsForm in core/modules/views/src/Plugin/views/display/Attachment.php
Provide the default form for setting options.
Attachment::optionsSummary in core/modules/views/src/Plugin/views/display/Attachment.php
Provide the summary for attachment options in the views UI.

File

core/modules/views/src/Plugin/views/display/Attachment.php, line 51

Class

Attachment
The plugin that handles an attachment display.

Namespace

Drupal\views\Plugin\views\display

Code

public function attachmentPositions($position = NULL) {
    $positions = [
        'before' => $this->t('Before'),
        'after' => $this->t('After'),
        'both' => $this->t('Both'),
    ];
    if ($position) {
        return $positions[$position];
    }
    return $positions;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.