/** * We set checkbox field values here to false if they are not in the post * data array. * * @param SilvercartWidget_Controller $widget Widget to initialize * @param array $data The post data array * * @return void * * @author Sebastian Diel <*****@*****.**> * @since 28.03.2012 */ public static function populateFromPostDataForProductSliderWidget(SilvercartWidget_Controller $widget, $data) { $widget->write(); if (!array_key_exists('isContentView', $data)) { $widget->isContentView = 0; } if (!array_key_exists('GroupView', $data)) { $widget->GroupView = SilvercartGroupViewHandler::getDefaultGroupViewInherited(); } if (!array_key_exists('Autoplay', $data)) { $widget->autoplay = 0; } if (!array_key_exists('buildArrows', $data)) { $widget->buildArrows = 0; } if (!array_key_exists('buildNavigation', $data)) { $widget->buildNavigation = 0; } if (!array_key_exists('buildStartStop', $data)) { $widget->buildStartStop = 0; } if (!array_key_exists('autoPlayDelayed', $data)) { $widget->autoPlayDelayed = 0; } if (!array_key_exists('autoPlayLocked', $data)) { $widget->autoPlayLocked = 0; } if (!array_key_exists('stopAtEnd', $data)) { $widget->stopAtEnd = 0; } if (!array_key_exists('useSlider', $data)) { $widget->useSlider = 0; } }