You are here

public function MigrateStatisticsEntityHandler::fields in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 plugins/destinations/statistics.inc \MigrateStatisticsEntityHandler::fields()

Implementation of MigrateDestinationHandler::fields().

File

plugins/destinations/statistics.inc, line 17
Support for node_counter statistics in core Drupal nodes.

Class

MigrateStatisticsEntityHandler
@file Support for node_counter statistics in core Drupal nodes.

Code

public function fields($entity_type, $bundle, $migration = NULL) {
  if (module_exists('statistics')) {
    $fields = array(
      'totalcount' => t('The total number of times the node has been viewed.'),
      'daycount' => t('The total number of times the node has been viewed today.'),
      'timestamp' => t('The most recent time the node has been viewed.'),
    );
  }
  else {
    $fields = array();
  }
  return $fields;
}