LegalAccepted.php in Legal 2.0.x
File
src/Plugin/migrate/source/d7/LegalAccepted.php
View source
<?php
namespace Drupal\legal\Plugin\migrate\source\d7;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
class LegalAccepted extends DrupalSqlBase {
public function query() {
$query = $this
->select('legal_accepted', 'a')
->fields('a')
->orderBy('a.legal_id');
return $query;
}
public function fields() {
$fields = [
'legal_id' => $this
->t('Legal ID'),
'version' => $this
->t('Version'),
'revision' => $this
->t('Revision'),
'language' => $this
->t('Language'),
'uid' => $this
->t('User ID'),
'accepted' => $this
->t('Accepted Date'),
'tc_id' => $this
->t('T&C ID'),
];
return $fields;
}
public function getIds() {
$ids['legal_id']['type'] = 'integer';
return $ids;
}
}