public function NodeCounter::fields in Drupal 8
Same name in this branch
- 8 core/modules/statistics/src/Plugin/migrate/source/NodeCounter.php \Drupal\statistics\Plugin\migrate\source\NodeCounter::fields()
- 8 core/modules/statistics/src/Plugin/migrate/destination/NodeCounter.php \Drupal\statistics\Plugin\migrate\destination\NodeCounter::fields()
Same name and namespace in other branches
- 9 core/modules/statistics/src/Plugin/migrate/destination/NodeCounter.php \Drupal\statistics\Plugin\migrate\destination\NodeCounter::fields()
- 10 core/modules/statistics/src/Plugin/migrate/destination/NodeCounter.php \Drupal\statistics\Plugin\migrate\destination\NodeCounter::fields()
Returns an array of destination fields.
Derived classes must implement fields(), returning a list of available destination fields.
Parameters
\Drupal\migrate\Plugin\MigrationInterface $migration: Unused, will be removed before Drupal 9.0.x. Defaults to NULL.
Return value
array
- Keys: machine names of the fields
- Values: Human-friendly descriptions of the fields.
Overrides MigrateDestinationInterface::fields
File
- core/
modules/ statistics/ src/ Plugin/ migrate/ destination/ NodeCounter.php, line 71
Class
- NodeCounter
- Destination for node counter.
Namespace
Drupal\statistics\Plugin\migrate\destinationCode
public function fields(MigrationInterface $migration = NULL) {
return [
'nid' => $this
->t('The ID of the node to which these statistics apply.'),
'totalcount' => $this
->t('The total number of times the node has been viewed.'),
'daycount' => $this
->t('The total number of times the node has been viewed today.'),
'timestamp' => $this
->t('The most recent time the node has been viewed.'),
];
}