You are here

public function FieldablePanelsPane::query in Fieldable Panels Panes (FPP) 1.0.x

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

src/Plugin/migrate/source/d7/FieldablePanelsPane.php, line 61

Class

FieldablePanelsPane
Drupal 7 node source from database.

Namespace

Drupal\fieldable_panels_panes\Plugin\migrate\source\d7

Code

public function query() {

  // Select node in its last revision.
  $query = $this
    ->select('fieldable_panels_panes_revision', 'fppr')
    ->fields('fpp', [
    'fpid',
    'bundle',
    'link',
    'path',
    'admin_title',
    'admin_description',
    'category',
    'reusable',
    'view_access',
    'edit_access',
    'language',
    'created',
    'changed',
  ])
    ->fields('fppr', [
    'vid',
    'title',
    'log',
    'timestamp',
  ]);
  $query
    ->addField('fppr', 'uid', 'entity_uid');
  $query
    ->addField('fppr', 'uid', 'revision_uid');
  $query
    ->innerJoin('fieldable_panels_panes', 'fpp', static::JOIN);
  if (isset($this->configuration['bundle'])) {
    $query
      ->condition('fpp.bundle', $this->configuration['bundle']);
  }
  return $query;
}