class Resource in RESTful 7.2
Same name in this branch
- 7.2 src/Annotation/Resource.php \Drupal\restful\Annotation\Resource
- 7.2 src/Plugin/resource/Resource.php \Drupal\restful\Plugin\resource\Resource
Defines a Resource annotation object.
Hierarchy
- class \Drupal\restful\Annotation\Resource extends \Drupal\Component\Annotation\Plugin
Expanded class hierarchy of Resource
39 classes are annotated with Resource
- AccessToken__1_0 in modules/
restful_token_auth/ src/ Plugin/ resource/ AccessToken__1_0.php - Class AccessToken__1_0 @package Drupal\restful_token_auth\Plugin\resource
- Articles__1_0 in modules/
restful_example/ src/ Plugin/ resource/ node/ article/ v1/ Articles__1_0.php - Class Articles @package Drupal\restful\Plugin\resource
- Articles__1_1 in modules/
restful_example/ src/ Plugin/ resource/ node/ article/ v1/ Articles__1_1.php - Class Articles @package Drupal\restful\Plugin\resource
- Articles__1_3 in modules/
restful_token_auth/ modules/ restful_token_auth_test/ src/ Plugin/ resource/ Articles__1_3.php - Class Articles__1_3 @package Drupal\restful\Plugin\resource
- Articles__1_4 in modules/
restful_example/ src/ Plugin/ resource/ node/ article/ v1/ Articles__1_4.php - Class Articles__1_4 @package Drupal\restful\Plugin\resource
File
- src/
Annotation/ Resource.php, line 19 - Contains \Drupal\restful\Annotation\Resource.
Namespace
Drupal\restful\AnnotationView source
class Resource extends Plugin {
/**
* Major version.
*
* @var int
*/
public $majorVersion = 1;
/**
* Minor version.
*
* @var int
*/
public $minorVersion = 0;
/**
* Resource name.
*
* @var string
*/
public $name;
/**
* Resource.
*
* This is used for the resource URL.
*
* @var string
*/
public $resource;
/**
* Formatter.
*
* @var string
*/
public $formatter;
/**
* Description.
*
* @var string
*/
public $description = '';
/**
* Authentication types.
*
* @var array|bool
*/
public $authenticationTypes = array();
/**
* Authentication optional.
*
* @var bool
*/
public $authenticationOptional = FALSE;
/**
* Data provider options.
*
* Contains all the information for the data provider.
*
* @var array
*/
public $dataProvider = array();
/**
* Cache render.
*
* Cache render options.
*
* @var array|bool
*/
public $renderCache = array();
/**
* Hook menu. TRUE if the resource should declare a menu item automatically.
*
* @var bool
*/
public $hookMenu = TRUE;
/**
* The path to be used as the menu item.
*
* Leave it empty to create one automatically.
*
* @var string
*/
public $hookItem;
/**
* Autocomplete options.
*
* 'string' => 'foo',
* 'operator' => 'STARTS_WITH',
*
* @var array
*/
public $autocomplete = array();
/**
* Access control using the HTTP Access-Control-Allow-Origin header.
*
* @var string
*/
public $allowOrigin;
/**
* Determines if a resource should be discoverable, and appear under /api.
*
* @var bool
*/
public $discoverable = TRUE;
/**
* URL parameters.
*
* @var array
*/
public $urlParams = array();
/**
* {@inheritdoc}
*/
public function getId() {
// The ID of the resource plugin is its name.
return $this->definition['name'];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Resource:: |
public | property | Access control using the HTTP Access-Control-Allow-Origin header. | |
Resource:: |
public | property | Authentication optional. | |
Resource:: |
public | property | Authentication types. | |
Resource:: |
public | property | Autocomplete options. | |
Resource:: |
public | property | Data provider options. | |
Resource:: |
public | property | Description. | |
Resource:: |
public | property | Determines if a resource should be discoverable, and appear under /api. | |
Resource:: |
public | property | Formatter. | |
Resource:: |
public | property | The path to be used as the menu item. | |
Resource:: |
public | property | Hook menu. TRUE if the resource should declare a menu item automatically. | |
Resource:: |
public | property | Major version. | |
Resource:: |
public | property | Minor version. | |
Resource:: |
public | property | Resource name. | |
Resource:: |
public | property | Cache render. | |
Resource:: |
public | property | Resource. | |
Resource:: |
public | property | URL parameters. | |
Resource:: |
public | function |