File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
domain/src/Plugin/migrate/source/d7 Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Drupal \domain \Plugin \migrate \source \d7 ;
4+
5+ use Drupal \migrate_drupal \Plugin \migrate \source \DrupalSqlBase ;
6+
7+ /**
8+ * Drupal 7 Domain source from database.
9+ *
10+ * @MigrateSource(
11+ * id = "d7_domain"
12+ * )
13+ */
14+ class DomainRecord extends DrupalSqlBase {
15+
16+ /**
17+ * {@inheritdoc}
18+ */
19+ public function query () {
20+ $ fields = [
21+ 'domain_id ' ,
22+ 'subdomain ' ,
23+ 'sitename ' ,
24+ 'scheme ' ,
25+ 'valid ' ,
26+ 'weight ' ,
27+ 'is_default ' ,
28+ 'machine_name ' ,
29+ ];
30+ return $ this ->select ('domain ' , 'd ' )->fields ('d ' , $ fields );
31+ }
32+
33+ /**
34+ * {@inheritdoc}
35+ */
36+ public function fields () {
37+ return [
38+ 'domain_id ' => $ this ->t ('Domain ID. ' ),
39+ 'subdomain ' => $ this ->t ('Subdomain. ' ),
40+ 'sitename ' => $ this ->t ('Sitename. ' ),
41+ 'scheme ' => $ this ->t ('Scheme. ' ),
42+ 'valid ' => $ this ->t ('Valid. ' ),
43+ 'weight ' => $ this ->t ('Weight. ' ),
44+ 'is_default ' => $ this ->t ('Is default. ' ),
45+ 'machine_name ' => $ this ->t ('Machine name. ' ),
46+ ];
47+ }
48+
49+ /**
50+ * {@inheritdoc}
51+ */
52+ public function getIds () {
53+ return ['domain_id ' => ['type ' => 'int ' ]];
54+ }
55+
56+ }
You can’t perform that action at this time.
0 commit comments