PhotosAccessUser.php in Album Photos 8.4
File
photos_access/src/Plugin/migrate/source/PhotosAccessUser.php
View source
<?php
namespace Drupal\photos_access\Plugin\migrate\source;
use Drupal\migrate\Plugin\migrate\source\SqlBase;
class PhotosAccessUser extends SqlBase {
public function query() {
$query = $this
->select('photos_access_user', 'u')
->fields('u', [
'id',
'uid',
'collaborate',
]);
return $query;
}
public function fields() {
$fields = [
'id' => $this
->t('ID'),
'uid' => $this
->t('User ID'),
'collaborate' => $this
->t('User is Collaborator'),
];
return $fields;
}
public function getIds() {
return [
'id' => [
'type' => 'integer',
'alias' => 'u',
],
'uid' => [
'type' => 'integer',
'alias' => 'u',
],
];
}
}