ForumLeafConstraint.php 607 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php

/**
 * @file
 * Contains \Drupal\forum\Plugin\Validation\Constraint\ForumLeafConstraint.
 */

namespace Drupal\forum\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Checks that the node is assigned only a "leaf" term in the forum taxonomy.
 *
 * @Plugin(
 *   id = "ForumLeaf",
 *   label = @Translation("Forum leaf", context = "Validation"),
 * )
 */
class ForumLeafConstraint extends Constraint {

  public $selectForum = 'Select a forum.';
  public $noLeafMessage = 'The item %forum is a forum container, not a forum. Select one of the forums below instead.';
}