3 namespace Drupal\system\Plugin\migrate\source;
5 use Drupal\migrate\Row;
6 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
9 * Gets system data for a legacy extension.
13 * source_module = "system"
16 class Extension extends DrupalSqlBase {
21 public function query() {
22 $query = $this->select('system', 's')
25 if (isset($this->configuration['name'])) {
26 $query->condition('name', (array) $this->configuration['name'], 'IN');
34 public function fields() {
36 'filename' => $this->t('Filename'),
37 'name' => $this->t('Name'),
38 'type' => $this->t('Type'),
39 'owner' => $this->t('Owner'),
40 'status' => $this->t('Status'),
41 'throttle' => $this->t('Throttle'),
42 'bootstrap' => $this->t('Bootstrap'),
43 'schema_version' => $this->t('Schema version'),
44 'weight' => $this->t('Weight'),
45 'info' => $this->t('Information array'),
53 public function prepareRow(Row $row) {
54 $row->setSourceProperty('info', unserialize($row->getSourceProperty('info')));
55 return parent::prepareRow($row);
61 public function getIds() {
62 $ids['name']['type'] = 'string';