public function VarietyList::get in Migrate Plus 8
Same name and namespace in other branches
- 8.5 migrate_example_advanced/migrate_example_advanced_setup/src/Plugin/rest/resource/VarietyList.php \Drupal\migrate_example_advanced_setup\Plugin\rest\resource\VarietyList::get()
- 8.2 migrate_example_advanced/migrate_example_advanced_setup/src/Plugin/rest/resource/VarietyList.php \Drupal\migrate_example_advanced_setup\Plugin\rest\resource\VarietyList::get()
- 8.3 migrate_example_advanced/migrate_example_advanced_setup/src/Plugin/rest/resource/VarietyList.php \Drupal\migrate_example_advanced_setup\Plugin\rest\resource\VarietyList::get()
- 8.4 migrate_example_advanced/migrate_example_advanced_setup/src/Plugin/rest/resource/VarietyList.php \Drupal\migrate_example_advanced_setup\Plugin\rest\resource\VarietyList::get()
Responds to GET requests.
Return value
\Drupal\rest\ResourceResponse The response containing the requested variety data.
File
- migrate_example_advanced/
migrate_example_advanced_setup/ src/ Plugin/ rest/ resource/ VarietyList.php, line 32 - Contains \Drupal\migrate_example_advanced_setup\Plugin\rest\resource\VarietyList.
Class
- VarietyList
- Provides varieties as two endpoints, one for reds and one for whites.
Namespace
Drupal\migrate_example_advanced_setup\Plugin\rest\resourceCode
public function get() {
$data['items'] = [
'retsina',
'trebbiano',
'valpolicella',
'bardolino',
];
$response = new ResourceResponse($data, 200);
return $response;
}