You are here

protected function EntityTests__1_0::publicFields in RESTful 7.2

Public fields.

Return value

array The field definition array.

Overrides ResourceEntity::publicFields

File

tests/modules/restful_test/src/Plugin/resource/entity_test/EntityTests__1_0.php, line 39
Contains \Drupal\restful_test\Plugin\resource\entity_test\EntityTests__1_0.

Class

EntityTests__1_0
Class EntityTests__1_0 @package Drupal\restful_test\Plugin\resource

Namespace

Drupal\restful_test\Plugin\resource\entity_test

Code

protected function publicFields() {
  $public_fields = parent::publicFields();
  $public_fields['main_bundle'] = array(
    'property' => 'pid',
    'class' => '\\Drupal\\restful\\Plugin\\resource\\Field\\ResourceFieldEntityReference',
    'resource' => array(
      'name' => 'main',
      'majorVersion' => 1,
      'minorVersion' => 0,
    ),
  );
  $public_fields['tests_bundle'] = array(
    'property' => 'pid',
    'class' => '\\Drupal\\restful\\Plugin\\resource\\Field\\ResourceFieldEntityReference',
    'resource' => array(
      'name' => 'tests',
      'majorVersion' => 1,
      'minorVersion' => 0,
    ),
  );
  return $public_fields;
}