function _rest_server_settings in Services 6.3
Same name and namespace in other branches
- 7.3 servers/rest_server/rest_server.inc \_rest_server_settings()
REST server settings form. Generates the form fragment for configuring the REST server for an endpoint.
Parameters
array $form: The form fragment from services that we should add our fields to.
object $endpoint: The endpoint that we're configuring the REST server for.
array $settings: The current settings.
Return value
void
2 string references to '_rest_server_settings'
- hook_server_info in ./
services.servers.api.php - Identifies a server implementation to Services.
- rest_server_server_info in servers/
rest_server/ rest_server.module - Implements hook_server_info().
File
- servers/
rest_server/ rest_server.inc, line 20 - Autoload classes and server settings.
Code
function _rest_server_settings(&$form, $endpoint, $settings) {
$settings = rest_server_setup_settings($settings);
$form['formatters'] = array(
'#type' => 'checkboxes',
'#title' => t('Response formatters'),
'#required' => TRUE,
'#description' => t('Select the response formats you want to enable for the rest server.'),
) + _rest_server_settings_checkboxes_attributes($settings['formatters']);
$form['parsers'] = array(
'#type' => 'checkboxes',
'#title' => t('Request parsing'),
'#required' => TRUE,
'#description' => t('Select the request parser types you want to enable for the rest server.'),
) + _rest_server_settings_checkboxes_attributes($settings['parsers']);
}