ResourceResponseTrait.php

Same filename in other branches
  1. 9 core/modules/rest/src/ResourceResponseTrait.php
  2. 10 core/modules/rest/src/ResourceResponseTrait.php
  3. 11.x core/modules/rest/src/ResourceResponseTrait.php

Namespace

Drupal\rest

File

core/modules/rest/src/ResourceResponseTrait.php

View source
<?php

namespace Drupal\rest;

trait ResourceResponseTrait {
    
    /**
     * Response data that should be serialized.
     *
     * @var mixed
     */
    protected $responseData;
    
    /**
     * Returns response data that should be serialized.
     *
     * @return mixed
     *   Response data that should be serialized.
     */
    public function getResponseData() {
        return $this->responseData;
    }

}

Traits

Title Deprecated Summary
ResourceResponseTrait

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.