D6SmsNumber.php in SMS Framework 2.1.x
File
src/Plugin/migrate/source/D6SmsNumber.php
View source
<?php
declare (strict_types=1);
namespace Drupal\sms\Plugin\migrate\source;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
class D6SmsNumber extends DrupalSqlBase {
public function fields() {
return [
'uid' => $this
->t('User ID'),
'delta' => $this
->t('Delta'),
'number' => $this
->t('Phone number'),
'status' => $this
->t('Verification Status'),
'code' => $this
->t('Verification code'),
'gateway' => $this
->t('Verification gateway'),
];
}
public function getIds() {
return [
'uid' => [
'type' => 'integer',
'alias' => 'su',
],
'delta' => [
'type' => 'integer',
'alias' => 'su',
],
];
}
public function query() {
return $this
->select('sms_user', 'su')
->fields('su', array_keys($this
->fields()));
}
}