class ContactMessageResource
Same name and namespace in other branches
- 11.x core/modules/contact/src/Plugin/rest/resource/ContactMessageResource.php \Drupal\contact\Plugin\rest\resource\ContactMessageResource
- 10 core/modules/contact/src/Plugin/rest/resource/ContactMessageResource.php \Drupal\contact\Plugin\rest\resource\ContactMessageResource
- 8.9.x core/modules/contact/src/Plugin/rest/resource/ContactMessageResource.php \Drupal\contact\Plugin\rest\resource\ContactMessageResource
Customizes the entity REST Resource plugin for Contact's Message entities.
Message entities are not stored, so they cannot be:
- retrieved (GET)
- modified (PATCH)
- deleted (DELETE)
Messages can only be sent/created (POST).
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait extends \Drupal\Component\Plugin\PluginBase
- class \Drupal\rest\Plugin\ResourceBase implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\rest\Plugin\ResourceInterface extends \Drupal\Core\Plugin\PluginBase
- class \Drupal\rest\Plugin\rest\resource\EntityResource implements \Drupal\Component\Plugin\DependentPluginInterface uses \Drupal\rest\Plugin\rest\resource\EntityResourceValidationTrait, \Drupal\rest\Plugin\rest\resource\EntityResourceAccessTrait extends \Drupal\rest\Plugin\ResourceBase
- class \Drupal\contact\Plugin\rest\resource\ContactMessageResource extends \Drupal\rest\Plugin\rest\resource\EntityResource
- class \Drupal\rest\Plugin\rest\resource\EntityResource implements \Drupal\Component\Plugin\DependentPluginInterface uses \Drupal\rest\Plugin\rest\resource\EntityResourceValidationTrait, \Drupal\rest\Plugin\rest\resource\EntityResourceAccessTrait extends \Drupal\rest\Plugin\ResourceBase
- class \Drupal\rest\Plugin\ResourceBase implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\rest\Plugin\ResourceInterface extends \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait extends \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of ContactMessageResource
1 file declares its use of ContactMessageResource
- contact.module in core/
modules/ contact/ contact.module - Enables the use of personal and site-wide contact forms.
File
-
core/
modules/ contact/ src/ Plugin/ rest/ resource/ ContactMessageResource.php, line 16
Namespace
Drupal\contact\Plugin\rest\resourceView source
class ContactMessageResource extends EntityResource {
/**
* {@inheritdoc}
*/
public function availableMethods() {
return [
'POST',
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.