5561a9a53fd3f19a02f44dfa08d5d0909672bf58
[yaffs-website] / web / core / modules / system / src / Plugin / migrate / source / d7 / ThemeSettings.php
1 <?php
2
3 namespace Drupal\system\Plugin\migrate\source\d7;
4
5 use Drupal\migrate_drupal\Plugin\migrate\source\VariableMultiRow;
6
7 /**
8  * Drupal 7 system source from database.
9  *
10  * @MigrateSource(
11  *   id = "d7_theme_settings",
12  *   source_provider = "system"
13  * )
14  */
15 class ThemeSettings extends VariableMultiRow {
16
17   /**
18    * {@inheritdoc}
19    */
20   public function query() {
21     return $this->select('variable', 'v')
22       ->fields('v', ['name', 'value'])
23       ->condition('name', 'theme_%_settings', 'LIKE');
24   }
25
26   /**
27    * {@inheritdoc}
28    */
29   public function fields() {
30     return [
31       'name' => $this->t('Theme settings variable for a theme.'),
32       'value' => $this->t('The theme settings variable value.'),
33     ];
34   }
35
36   /**
37    * {@inheritdoc}
38    */
39   public function getIds() {
40     $ids['name']['type'] = 'string';
41     return $ids;
42   }
43
44 }