webhooks-8.x-1.x-dev/modules/webhook/src/Entity/WebhookType.php

modules/webhook/src/Entity/WebhookType.php
<?php

declare(strict_types=1);

namespace Drupal\webhook\Entity;

use Drupal\Core\Config\Entity\ConfigEntityBundleBase;

/**
 * Defines the Webhook type configuration entity.
 *
 * @ConfigEntityType(
 *   id = "webhook_type",
 *   label = @Translation("Webhook type"),
 *   label_collection = @Translation("Webhook types"),
 *   label_singular = @Translation("webhook type"),
 *   label_plural = @Translation("webhooks types"),
 *   label_count = @PluralTranslation(
 *     singular = "@count webhooks type",
 *     plural = "@count webhooks types",
 *   ),
 *   handlers = {
 *     "form" = {
 *       "add" = "Drupal\webhook\Form\WebhookTypeForm",
 *       "edit" = "Drupal\webhook\Form\WebhookTypeForm",
 *       "delete" = "Drupal\Core\Entity\EntityDeleteForm",
 *     },
 *     "list_builder" = "Drupal\webhook\WebhookTypeListBuilder",
 *     "route_provider" = {
 *       "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
 *     },
 *   },
 *   admin_permission = "administer webhook types",
 *   bundle_of = "webhook",
 *   config_prefix = "webhook_type",
 *   entity_keys = {
 *     "id" = "id",
 *     "label" = "label",
 *     "uuid" = "uuid",
 *   },
 *   links = {
 *     "add-form" = "/admin/structure/webhook_types/add",
 *     "edit-form" = "/admin/structure/webhook_types/manage/{webhook_type}",
 *     "delete-form" = "/admin/structure/webhook_types/manage/{webhook_type}/delete",
 *     "collection" = "/admin/structure/webhook_types",
 *   },
 *   config_export = {
 *     "id",
 *     "label",
 *     "uuid",
 *   },
 * )
 */
final class WebhookType extends ConfigEntityBundleBase {

  /**
   * The machine name of this webhook type.
   */
  protected string $id;

  /**
   * The human-readable name of the webhook type.
   */
  protected string $label;

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc