You are here

public function Block::query in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block/src/Plugin/migrate/source/Block.php \Drupal\block\Plugin\migrate\source\Block::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/block/src/Plugin/migrate/source/Block.php, line 54
Contains \Drupal\block\Plugin\migrate\source\Block.

Class

Block
Drupal block source from database.

Namespace

Drupal\block\Plugin\migrate\source

Code

public function query() {
  if ($this
    ->getModuleSchemaVersion('system') >= 7000) {
    $this->blockTable = 'block';
    $this->blockRoleTable = 'block_role';
  }
  else {
    $this->blockTable = 'blocks';
    $this->blockRoleTable = 'blocks_roles';
  }
  return $this
    ->select($this->blockTable, 'b')
    ->fields('b');
}