/** * * scan and get all sliders post types */ public static function getAllSlidersPostTypes() { $sliders = new ShowBizSlider(); $arrSliders = $sliders->getArrSliders(); $arrAssoc = array(); //the post shoudl be always in $arrAssoc["post"] = "post"; foreach ($arrSliders as $slider) { $postTypes = $slider->getParam("post_types", "post"); $arrPostTypes = explode(",", $postTypes); $assoc = UniteFunctionsBiz::arrayToAssoc($arrPostTypes); $arrAssoc = array_merge($arrAssoc, $assoc); } $arr = UniteFunctionsBiz::assocToArray($arrAssoc); return $arr; }
<?php $slider = new ShowBizSlider(); $arrSliders = $slider->getArrSliders(); $addNewLink = self::getViewUrl(ShowBizAdmin::VIEW_SLIDER); require self::getPathTemplate("sliders"); ?>