Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $node->panelizer->view_mode = 'press_release';
- $node->save();
- string(4) "news"
- array(2) {
- [0]=>
- array(3) {
- ["view_mode"]=>
- string(4) "news"
- ["default"]=>
- string(4) "news"
- ["panels_display"]=>
- array(0) {
- }
- }
- [1]=>
- array(3) {
- ["view_mode"]=>
- string(4) "full"
- ["default"]=>
- string(13) "press_release"
- ["panels_display"]=>
- array(0) {
- }
- }
- }
- $panelizer_arr = $node->panelizer->getValue();
- $panelizer_arr[1]['default'] = 'test_display';
- $node->panelizer = $panelizer_arr;
- $node->save();
Add Comment
Please, Sign In to add comment