ContactMessageResource.php

Same filename in other branches
  1. 9 core/modules/contact/src/Plugin/rest/resource/ContactMessageResource.php
  2. 8.9.x core/modules/contact/src/Plugin/rest/resource/ContactMessageResource.php
  3. 11.x core/modules/contact/src/Plugin/rest/resource/ContactMessageResource.php

Namespace

Drupal\contact\Plugin\rest\resource

File

core/modules/contact/src/Plugin/rest/resource/ContactMessageResource.php

View source
<?php

namespace Drupal\contact\Plugin\rest\resource;

use Drupal\rest\Plugin\rest\resource\EntityResource;

/**
 * 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).
 */
class ContactMessageResource extends EntityResource {
    
    /**
     * {@inheritdoc}
     */
    public function availableMethods() {
        return [
            'POST',
        ];
    }

}

Classes

Title Deprecated Summary
ContactMessageResource Customizes the entity REST Resource plugin for Contact's Message entities.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.