EntityTests__1_0.php in RESTful 7.2
File
tests/modules/restful_test/src/Plugin/resource/entity_test/EntityTests__1_0.php
View source
<?php
namespace Drupal\restful_test\Plugin\resource\entity_test;
use Drupal\restful\Plugin\resource\ResourceEntity;
use Drupal\restful\Plugin\resource\ResourceInterface;
class EntityTests__1_0 extends ResourceEntity implements ResourceInterface {
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;
}
}
Classes
Name |
Description |
EntityTests__1_0 |
Class EntityTests__1_0
@package Drupal\restful_test\Plugin\resource |