You are here

public function FieldSettingsHelper::isEnabled in AJAX Comments 8

Determine if ajax comments is enabled for a comment field in a view mode.

Parameters

\Drupal\Core\Field\FormatterInterface $comment_formatter: The field formatter for the comment field in the provided entity view mode.

Return value

bool Whether or not ajax comments is enabled on the comment field's display settings.

File

src/FieldSettingsHelper.php, line 160

Class

FieldSettingsHelper
Class FieldSettingsHelper.

Namespace

Drupal\ajax_comments

Code

public function isEnabled(FormatterInterface $comment_formatter) {
  return $comment_formatter
    ->getThirdPartySetting('ajax_comments', 'enable_ajax_comments', '1');
}