public function CsrfToken::index in RESTful 7.2
Basic implementation for listing.
Parameters
string $path: The resource path.
Return value
array An array of structured data for the things being viewed.
Overrides Resource::index
File
- src/
Plugin/ resource/ CsrfToken.php, line 58 - Contains \Drupal\restful\Plugin\resource\CsrfToken.
Class
- CsrfToken
- Class CsrfToken @package Drupal\restful\Plugin\resource
Namespace
Drupal\restful\Plugin\resourceCode
public function index($path) {
$values = array();
foreach ($this
->publicFields() as $public_property => $info) {
$value = NULL;
if ($info['callback']) {
$value = ResourceManager::executeCallback($info['callback']);
}
if ($value && !empty($info['process_callbacks'])) {
foreach ($info['process_callbacks'] as $process_callback) {
$value = ResourceManager::executeCallback($process_callback, array(
$value,
));
}
}
$values[$public_property] = $value;
}
return $values;
}