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

Breadcrumb

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

function Serializer::getFormatOptions

Returns an array of format options.

Return value

string[] An array of format options. Both key and value are the same.

1 call to Serializer::getFormatOptions()
Serializer::buildOptionsForm in core/modules/rest/src/Plugin/views/style/Serializer.php
Provide a form to edit options for this plugin.

File

core/modules/rest/src/Plugin/views/style/Serializer.php, line 201

Class

Serializer
The style plugin for serialized output formats.

Namespace

Drupal\rest\Plugin\views\style

Code

protected function getFormatOptions() {
    $formats = array_keys($this->formatProviders);
    return array_combine($formats, $formats);
}

API Navigation

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