public function MessageTemplateSource::query in Message 8
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- src/
Plugin/ migrate/ source/ MessageTemplateSource.php, line 25 - Contains \Drupal\message\Plugin\migrate\source.
Class
- MessageTemplateSource
- Drupal 7 message types source from database.
Namespace
Drupal\message\Plugin\migrate\sourceCode
public function query() {
$query = $this
->select('message_type', 'mt');
$query
->join('field_data_message_text', 'txt', 'mt.id = txt.entity_id');
$query
->fields('mt', [
'id',
'name',
'category',
'description',
'argument_keys',
'language',
'status',
'arguments',
'data',
]);
$query
->fields('txt', [
'message_text_value',
'message_text_format',
'delta',
]);
$query
->addExpression("concat(mt.id, txt.delta)", 'concat_id');
$query
->orderBy('mt.id');
return $query;
}