/**
   * Overrides RestfulTestEntityTestsResource::publicFieldsInfo().
   */
  public function publicFieldsInfo() {
    $public_fields = parent::publicFieldsInfo();

    $public_fields['callback'] = array(
      'callback' => array($this, 'invalidCallback'),
    );

    return $public_fields;
  }
  /**
   * Overrides RestfulTestEntityTestsResource::publicFieldsInfo().
   */
  public function publicFieldsInfo() {
    $public_fields = parent::publicFieldsInfo();

    $public_fields['process_callbacks'] = array(
      'wrapper_method' => 'label',
      'wrapper_method_on_entity' => TRUE,
      'process_callbacks' => array(
        array($this, 'invalidProcessCallback'),
      ),
    );

    return $public_fields;
  }
  /**
   * Overrides RestfulTestEntityTestsResource::publicFieldsInfo().
   */
  public function publicFieldsInfo() {
    $public_fields = parent::publicFieldsInfo();

    $public_fields['text_single'] = array(
      'property' => 'text_single',
    );

    $public_fields['text_multiple'] = array(
      'property' => 'text_multiple',
    );

    return $public_fields;
  }
  /**
   * Overrides RestfulTestEntityTestsResource::publicFieldsInfo().
   */
  public function publicFieldsInfo() {
    $public_fields = parent::publicFieldsInfo();

    $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;
  }
  /**
   * Overrides RestfulTestEntityTestsResource::publicFieldsInfo().
   */
  public function publicFieldsInfo() {
    $public_fields = parent::publicFieldsInfo();

    $public_fields['text_single'] = array(
      'property' => 'text_single',
    );

    $public_fields['text_multiple'] = array(
      'property' => 'text_multiple',
      'discovery' => array(
        'info' => array(
          'label' => t('Text multiple'),
          'description' => t('This field holds different text inputs.'),
        ),
        'data' => array(
          'type' => 'string',
          'cardinality' => FIELD_CARDINALITY_UNLIMITED,
        ),
        'form_element' => array(
          'type' => 'textfield',
          'size' => 255,
          'placeholder' => t('This is helpful.'),
        ),
      ),
    );

    $public_fields['text_single_processing'] = array(
      'property' => 'text_single_processing',
      'sub_property' => 'value',
    );

    $public_fields['text_multiple_processing'] = array(
      'property' => 'text_multiple_processing',
      'sub_property' => 'value',
    );

    $public_fields['entity_reference_single'] = array(
      'property' => 'entity_reference_single',
      'wrapper_method' => 'getIdentifier',
    );

    $public_fields['entity_reference_multiple'] = array(
      'property' => 'entity_reference_multiple',
      'wrapper_method' => 'getIdentifier',
    );

    // Single entity reference field with "resource".
    $public_fields['entity_reference_single_resource'] = array(
      'property' => 'entity_reference_single',
      'resource' => array(
        'main' => array(
          'name' => 'main',
          'major_version' => 1,
          'minor_version' => 1,
        ),
      ),
    );

    // Multiple entity reference field with "resource".
    $public_fields['entity_reference_multiple_resource'] = array(
      'property' => 'entity_reference_multiple',
      'resource' => array(
        'main' => array(
          'name' => 'main',
          'major_version' => 1,
          'minor_version' => 1,
        ),
      ),
    );

    $public_fields['term_single'] = array(
      'property' => 'term_single',
      'sub_property' => 'tid',
    );

    $public_fields['term_multiple'] = array(
      'property' => 'term_multiple',
      'sub_property' => 'tid',
    );

    $public_fields['file_single'] = array(
      'property' => 'file_single',
      'process_callbacks' =>
        array(
          array($this, 'getFileId'),
        )
    );

    $public_fields['file_multiple'] = array(
      'property' => 'file_multiple',
      'process_callbacks' => array(
        array($this, 'getFilesId'),
      ),
    );

    $public_fields['image_single'] = array(
      'property' => 'image_single',
      'process_callbacks' => array(
        array($this, 'getFileId'),
      ),
    );

    $public_fields['image_multiple'] = array(
      'property' => 'image_multiple',
      'process_callbacks' => array(
        array($this, 'getFilesId'),
      ),
    );


    return $public_fields;
  }