Skip to content

Commit

Permalink
Merge pull request #81 from pimcore/custom_report_resolver
Browse files Browse the repository at this point in the history
[Improvement] Added custom report resolver
  • Loading branch information
mcop1 authored Jan 13, 2025
2 parents 944b1ae + ab88d6d commit 7376ce5
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Models/Tool/CustomReportResolver.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - Pimcore Commercial License (PCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GPLv3 and PCL
*/

namespace Pimcore\Bundle\StaticResolverBundle\Models\Tool;

use Pimcore\Bundle\CustomReportsBundle\Tool\Config;

/**
* @internal
*/
final class CustomReportResolver implements CustomReportResolverInterface
{
public function getByName(string $name): ?Config
{
return Config::getByName($name);
}
}
31 changes: 31 additions & 0 deletions src/Models/Tool/CustomReportResolverInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - Pimcore Commercial License (PCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GPLv3 and PCL
*/

namespace Pimcore\Bundle\StaticResolverBundle\Models\Tool;

use Exception;
use Pimcore\Bundle\CustomReportsBundle\Tool\Config;

/**
* @internal
*/
interface CustomReportResolverInterface
{
/**
* @throws Exception
*/
public function getByName(string $name): ?Config;
}

0 comments on commit 7376ce5

Please sign in to comment.