X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FPlugin%2Fmigrate%2Fsource%2FExtension.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FPlugin%2Fmigrate%2Fsource%2FExtension.php;h=379939110d070dac56e3dfa1d061921b87e4496b;hp=0000000000000000000000000000000000000000;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/system/src/Plugin/migrate/source/Extension.php b/web/core/modules/system/src/Plugin/migrate/source/Extension.php new file mode 100644 index 000000000..379939110 --- /dev/null +++ b/web/core/modules/system/src/Plugin/migrate/source/Extension.php @@ -0,0 +1,66 @@ +select('system', 's') + ->fields('s'); + + if (isset($this->configuration['name'])) { + $query->condition('name', (array) $this->configuration['name'], 'IN'); + } + return $query; + } + + /** + * {@inheritdoc} + */ + public function fields() { + $fields = [ + 'filename' => $this->t('Filename'), + 'name' => $this->t('Name'), + 'type' => $this->t('Type'), + 'owner' => $this->t('Owner'), + 'status' => $this->t('Status'), + 'throttle' => $this->t('Throttle'), + 'bootstrap' => $this->t('Bootstrap'), + 'schema_version' => $this->t('Schema version'), + 'weight' => $this->t('Weight'), + 'info' => $this->t('Information array'), + ]; + return $fields; + } + + /** + * {@inheritdoc} + */ + public function prepareRow(Row $row) { + $row->setSourceProperty('info', unserialize($row->getSourceProperty('info'))); + return parent::prepareRow($row); + } + + /** + * {@inheritdoc} + */ + public function getIds() { + $ids['name']['type'] = 'string'; + return $ids; + } + +}