ForwardLog.php in Forward 4.x
File
src/Plugin/migrate/source/ForwardLog.php
View source
<?php
namespace Drupal\forward\Plugin\migrate\source;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
class ForwardLog extends DrupalSqlBase {
public function query() {
$query = $this
->select('forward_log', 'f');
$query = $query
->fields('f', [
'path',
'type',
'timestamp',
'uid',
'hostname',
])
->condition('path', 'node/%', 'LIKE')
->condition('type', 'SENT')
->orderBy('timestamp');
return $query;
}
public function fields() {
return [
'path' => $this
->t('The internal path of the logged item.'),
'type' => $this
->t('The log type, SENT for a forward or REF for a clickthrough.'),
'timestamp' => $this
->t('The date and time the activity was recorded.'),
'uid' => $this
->t('The user ID of the person who performed the action.'),
'hostname' => $this
->t('The IP address of the person who performed the action.'),
];
}
public function getIds() {
$ids['timestamp']['type'] = 'integer';
return $ids;
}
}