You are here

protected function Users__1_0::publicFields in RESTful 7.2

Public fields.

Return value

array The field definition array.

Overrides ResourceEntity::publicFields

File

src/Plugin/resource/Users__1_0.php, line 36
Contains \Drupal\restful\Plugin\resource\Users__1_0.

Class

Users__1_0
Class Articles @package Drupal\restful\Plugin\resource

Namespace

Drupal\restful\Plugin\resource

Code

protected function publicFields() {
  $public_fields = parent::publicFields();

  // The mail will be shown only to the own user or privileged users.
  $public_fields['mail'] = array(
    'property' => 'mail',
  );
  return $public_fields;
}