public function MyModuleBookResourceController::propertyInfo in RESTful Web Services 7.2
Same name and namespace in other branches
- 7 restws.api.php \MyModuleBookResourceController::propertyInfo()
Overrides RestWSResourceControllerInterface::propertyInfo
See also
RestWSResourceControllerInterface::propertyInfo()
1 call to MyModuleBookResourceController::propertyInfo()
File
- ./
restws.api.php, line 172 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Class
- MyModuleBookResourceController
- Example controller class for the mymodule_book resource.
Code
public function propertyInfo() {
return array(
'properties' => array(
'title' => array(
'type' => 'text',
'label' => t('Book title'),
'setter callback' => 'entity_property_verbatim_set',
),
'author' => array(
'type' => 'text',
'label' => t('Author'),
'setter callback' => 'entity_property_verbatim_set',
),
'pages' => array(
'type' => 'integer',
'label' => t('Number of pages'),
'setter callback' => 'entity_property_verbatim_set',
),
'price' => array(
'type' => 'decimal',
'label' => t('Price'),
'setter callback' => 'entity_property_verbatim_set',
),
),
);
}