You are here

protected function Main__1_2::publicFields in RESTful 7.2

Overrides ResourceEntity::publicFields().

Overrides ResourceEntity::publicFields

File

tests/modules/restful_test/src/Plugin/resource/entity_test/main/v1/Main__1_2.php, line 38
Contains \Drupal\restful_test\Plugin\resource\entity_test\main\v1\Main__1_2.

Class

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

Namespace

Drupal\restful_test\Plugin\resource\entity_test\main\v1

Code

protected function publicFields() {
  $public_fields = parent::publicFields();
  $public_fields['callback'] = array(
    'callback' => array(
      $this,
      'callback',
    ),
  );
  $public_fields['process_callback_from_callback'] = array(
    'callback' => array(
      $this,
      'callback',
    ),
    'process_callbacks' => array(
      array(
        $this,
        'processCallbackFromCallback',
      ),
    ),
  );
  $public_fields['process_callback_from_value'] = array(
    'wrapper_method' => 'getIdentifier',
    'wrapper_method_on_entity' => TRUE,
    'process_callbacks' => array(
      array(
        $this,
        'processCallbackFromValue',
      ),
    ),
  );
  return $public_fields;
}