Category.php 1.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
<?php

/**
 * @file
 * Definition of Drupal\contact\Plugin\Core\Entity\Category.
 */

namespace Drupal\contact\Plugin\Core\Entity;

use Drupal\Core\Config\Entity\ConfigEntityBase;
11
use Drupal\Core\Entity\Annotation\EntityType;
12 13 14 15 16
use Drupal\Core\Annotation\Translation;

/**
 * Defines the contact category entity.
 *
17
 * @EntityType(
18
 *   id = "contact_category",
19
 *   label = @Translation("Contact category"),
20
 *   module = "contact",
21 22 23 24 25 26
 *   controllers = {
 *     "storage" = "Drupal\contact\CategoryStorageController",
 *     "list" = "Drupal\contact\CategoryListController",
 *     "form" = {
 *       "default" = "Drupal\contact\CategoryFormController"
 *     }
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
 *   },
 *   uri_callback = "contact_category_uri",
 *   config_prefix = "contact.category",
 *   entity_keys = {
 *     "id" = "id",
 *     "label" = "label",
 *     "uuid" = "uuid"
 *   }
 * )
 */
class Category extends ConfigEntityBase {

  /**
   * The category ID.
   *
   * @var string
   */
  public $id;

  /**
   * The category UUID.
   *
   * @var string
   */
  public $uuid;

  /**
   * The category label.
   *
   * @var string
   */
  public $label;

  /**
   * List of recipient e-mail addresses.
   *
   * @var array
   */
  public $recipients = array();

  /**
   * An auto-reply message to send to the message author.
   *
   * @var string
   */
  public $reply = '';

  /**
   * Weight of this category (used for sorting).
   *
   * @var int
   */
  public $weight = 0;

}