subscriptions-2.0.x-dev/src/Plugin/SubscriptionType/Comment.php

src/Plugin/SubscriptionType/Comment.php
<?php

namespace Drupal\subscriptions\Plugin\SubscriptionType;

/**
 * Provides a comment subscription type.
 *
 * @SubscriptionType(
 *   id = "comment",
 *   label = @Translation("Comment"),
 *   type = "comment",
 *   field = "cid",
 *   context_definitions = {
 *     "comment" = @ContextDefinition("entity:comment",
 *       label = @Translation("Comment"),
 *       required = TRUE,
 *     ),
 *   }
 * )
 */
class Comment extends SubscriptionTypePermissionAccessBase {

  /**
   * {@inheritdoc}
   */
  protected function getPermission(): string {
    return 'subscribe to comments';
  }

}

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

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