function NodeType::query

Same name in this branch
  1. 11.x core/modules/node/src/Plugin/migrate/source/d7/NodeType.php \Drupal\node\Plugin\migrate\source\d7\NodeType::query()

Prepares query object to retrieve data from the source database.

This method should not be called directly. It is called automatically from SqlBase::prepareQuery().

Return value

\Drupal\Core\Database\Query\SelectInterface A Select query object with the source data.

Overrides SqlBase::query

File

core/modules/node/src/Plugin/migrate/source/d6/NodeType.php, line 47

Class

NodeType
Drupal 6 Node types source from database.

Namespace

Drupal\node\Plugin\migrate\source\d6

Code

public function query() {
  return $this->select('node_type', 't')
    ->fields('t', [
    'type',
    'name',
    'module',
    'description',
    'help',
    'title_label',
    'has_body',
    'body_label',
    'min_word_count',
    'custom',
    'modified',
    'locked',
    'orig_type',
  ])
    ->orderBy('t.type');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.