You are here

CommentAuthor.php in Display Suite 8.4

File

src/Plugin/DsField/Comment/CommentAuthor.php
View source
<?php

namespace Drupal\ds\Plugin\DsField\Comment;

use Drupal\ds\Plugin\DsField\Field;

/**
 * Plugin that renders the author of a comment.
 *
 * @DsField(
 *   id = "comment_author",
 *   title = @Translation("Author"),
 *   entity_type = "comment",
 *   provider = "comment"
 * )
 */
class CommentAuthor extends Field {

  /**
   * {@inheritdoc}
   */
  protected function entityRenderKey() {
    return 'name';
  }

}

Classes

Namesort descending Description
CommentAuthor Plugin that renders the author of a comment.