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