You are here

ContactMessageResource.php in Drupal 10

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

Namesort descending Description
ContactMessageResource Customizes the entity REST Resource plugin for Contact's Message entities.