/** * @return array */ public static function getReportsList() { $dir = Model\Tool\CustomReport\Config::getWorkingDir(); $reports = array(); $files = scandir($dir); foreach ($files as $file) { if (strpos($file, ".xml")) { $name = str_replace(".xml", "", $file); $reports[] = array("id" => $name, "text" => $name); } } return $reports; }
public function getReportConfigAction() { $dir = CustomReport\Config::getWorkingDir(); $reports = array(); $files = scandir($dir); foreach ($files as $file) { if (strpos($file, ".xml")) { $name = str_replace(".xml", "", $file); $report = CustomReport\Config::getByName($name); $reports[] = array("name" => $report->getName(), "niceName" => $report->getNiceName(), "iconClass" => $report->getIconClass(), "group" => $report->getGroup(), "groupIconClass" => $report->getGroupIconClass(), "menuShortcut" => $report->getMenuShortcut()); } } $this->_helper->json(array("success" => true, "reports" => $reports)); }