1 comment.test CommentHelperCase::setCommentSubject($comment_title_option)

Sets the value governing whether the comment title field should be enabled.

Parameters

boolean $enabled: Boolean specifying whether the comment title field should be enabled.

File

core/modules/comment/tests/comment.test, line 198
Tests for the Comment module.

Class

CommentHelperCase

Code

function setCommentSubject($comment_title_option) {

  switch ($comment_title_option) {
    case COMMENT_TITLE_AUTO:
      $title_text = 'automatic';
      break;

    case COMMENT_TITLE_CUSTOM:
      $title_text = 'custom';
      break;

    case COMMENT_TITLE_HIDDEN:
      $title_text = 'hidden';
      break;
  }

  $this->setCommentSettings('comment_title_options', $comment_title_option, 'Comment title ' . $title_text . '.');
}