File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ public function launch()
19
19
$ this ->setType ($ id );
20
20
}
21
21
22
+ // $this->setParent(5, 4);
23
+ //
22
24
// $themesCollections = $this->_objectManager->create('Magento\Theme\Model\Theme\Collection');
23
25
// $themesCollections->addConstraint(Collection::CONSTRAINT_AREA, Area::AREA_FRONTEND);
24
26
// $themes = [];
@@ -84,6 +86,18 @@ public function setType($id)
84
86
}
85
87
}
86
88
89
+ public function setParent ($ id , $ parentId )
90
+ {
91
+ $ theme = $ this ->_objectManager ->create ('Magento\Theme\Model\Theme ' );
92
+ try {
93
+ $ theme ->load ($ id , 'theme_id ' );
94
+ $ theme ->setData ('parent_id ' , $ parentId );
95
+ $ theme ->save ();
96
+ echo 'done ' ;
97
+ } catch (\Exception $ e ) {
98
+ $ this ->messageManager ->addError (__ ('Can \'t create child theme error "%1" ' , $ e ->getMessage ()));
99
+ }
100
+ }
87
101
88
102
}
89
103
You can’t perform that action at this time.
0 commit comments