You are here

protected function Discovery::publicFields in RESTful 7.2

Public fields.

Return value

array The field definition array.

Overrides Resource::publicFields

File

src/Plugin/resource/Discovery.php, line 38
Contains \Drupal\restful\Plugin\resource\Discovery

Class

Discovery
Class Discovery @package Drupal\restful_example\Plugin\Resource

Namespace

Drupal\restful\Plugin\resource

Code

protected function publicFields() {
  return array(
    'label' => array(
      'property' => 'label',
    ),
    'description' => array(
      'property' => 'description',
    ),
    'name' => array(
      'property' => 'name',
    ),
    'resource' => array(
      'property' => 'resource',
    ),
    'majorVersion' => array(
      'property' => 'majorVersion',
    ),
    'minorVersion' => array(
      'property' => 'minorVersion',
    ),
    'self' => array(
      'callback' => array(
        $this,
        'getSelf',
      ),
    ),
  );
}