Photos.php in Album Photos 8.4
File
src/Plugin/migrate/source/Photos.php
View source
<?php
namespace Drupal\photos\Plugin\migrate\source;
use Drupal\migrate\Plugin\migrate\source\SqlBase;
class Photos extends SqlBase {
public function query() {
$query = $this
->select('photos_album', 'a')
->fields('a', [
'pid',
'fid',
'wid',
'count',
'data',
]);
return $query;
}
public function fields() {
$fields = [
'pid' => $this
->t('Photos Album ID'),
'fid' => $this
->t('Album Cover File ID'),
'wid' => $this
->t('Weight'),
'count' => $this
->t('Image count'),
'data' => $this
->t('Album data'),
];
return $fields;
}
public function getIds() {
return [
'pid' => [
'type' => 'integer',
'alias' => 'a',
],
];
}
}
Classes
Name |
Description |
Photos |
Source plugin for photos album content. |