$slider->setID($_POST['id']); } $slider->setTitle($_POST['title']); $slider->setDefaultInterval($_POST['opt-interval']); $slider->setDefaultTransitionName(@$_POST['opt-transition']); $slider->setDefaultTransitionDuration(@$_POST['opt-transition-dur']); $slider->setInitializationDelay(@$_POST['opt-init-delay']); $slider->setPauseOnMouseOver(@$_POST['opt-pause-mouseover']); $slider->setShowNextPrev(@$_POST['opt-show-next-prev']); $slider->setShowNavigation(@$_POST['opt-show-nav']); $slider->setShowInterval(@$_POST['opt-show-interval']); $slider->setRestart(@$_POST['opt-restart']); $slider->setMaxWidth(@$_POST['opt-max-width']); $slider->setMaxHeight(@$_POST['opt-max-height']); $slider->setAspectRatio(@$_POST['opt-aspect-ratio']); $slider->setInitialItem(@$_POST['opt-initial-item']); /** * Here we remove from the DB the items that the client removed from the slider. */ if (is_array($_POST['remove'])) { foreach ($_POST['remove'] as $id) { \CEOS\Slider\SliderItem::removeFromDatabase($id); } } /** * Here we insert the slider items provided by the user, if any, into the slider * object. Below we also check if the upload of the slider image has succeed. */ if (is_array($_POST['items'])) { /** * Reorder the items sent by the client so no array boundary violations