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