You are here

public function NodeViewCountRecordsManager::isRecordableForViewMode in Node view count 8

Checks whether node in given view mode should be counted in statistics.

Parameters

string $view_mode: View mode of node.

Return value

bool TRUE if node in given view mode should be counted in statistics.

Overrides NodeViewCountRecordsManagerInterface::isRecordableForViewMode

File

src/NodeViewCountRecordsManager.php, line 105

Class

NodeViewCountRecordsManager
Provides a class for interacting with nodeviewcount records.

Namespace

Drupal\nodeviewcount

Code

public function isRecordableForViewMode($view_mode) {
  $tracked_view_modes = $this->config
    ->get('view_modes');
  return in_array($view_mode, $tracked_view_modes, TRUE);
}