By plopesc on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
Comment constants for comment visibility were located in comment.module. To clean up and get it under the responsible class, they were renamed and moved to Drupal\comment\Plugin\Field\FieldType\CommentItemInterface.
Drupal 7 and 8 before the change:
$options = array(
COMMENT_OPEN => t('Open'),
COMMENT_CLOSED => t('Closed'),
COMMENT_HIDDEN => t('Hidden'),
);
Drupal 8 after:
use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
$options = array(
CommentItemInterface::OPEN => t('Open'),
CommentItemInterface::CLOSED => t('Closed'),
CommentItemInterface::HIDDEN => t('Hidden'),
);
Impacts:
Module developers