Skip to content

Commit 5f800a2

Browse files
authored
Add Admin Tool reorderWebsiteLanguages. (#49)
* Add admin tool reorderWebsiteLanguages. * Apply php-cs-fixer changes --------- Co-authored-by: martineiber <martineiber@users.noreply.github.com>
1 parent 2a6e14d commit 5f800a2

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

src/Lib/Tools/AdminResolver.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
/**
5+
* Pimcore
6+
*
7+
* This source file is available under two different licenses:
8+
* - GNU General Public License version 3 (GPLv3)
9+
* - Pimcore Commercial License (PCL)
10+
* Full copyright and license information is available in
11+
* LICENSE.md which is distributed with this source code.
12+
*
13+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
14+
* @license http://www.pimcore.org/license GPLv3 and PCL
15+
*/
16+
17+
namespace Pimcore\Bundle\StaticResolverBundle\Lib\Tools;
18+
19+
use Pimcore\Model\User;
20+
use Pimcore\Tool\Admin;
21+
22+
/**
23+
* @internal
24+
*/
25+
final class AdminResolver implements AdminResolverInterface
26+
{
27+
public function reorderWebsiteLanguages(
28+
User $user,
29+
array|string $languages,
30+
bool $returnLanguageArray = false
31+
): array|string {
32+
return Admin::reorderWebsiteLanguages($user, $languages, $returnLanguageArray);
33+
}
34+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
/**
5+
* Pimcore
6+
*
7+
* This source file is available under two different licenses:
8+
* - GNU General Public License version 3 (GPLv3)
9+
* - Pimcore Commercial License (PCL)
10+
* Full copyright and license information is available in
11+
* LICENSE.md which is distributed with this source code.
12+
*
13+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
14+
* @license http://www.pimcore.org/license GPLv3 and PCL
15+
*/
16+
17+
namespace Pimcore\Bundle\StaticResolverBundle\Lib\Tools;
18+
19+
use Pimcore\Model\User;
20+
21+
interface AdminResolverInterface
22+
{
23+
public function reorderWebsiteLanguages(
24+
User $user,
25+
array|string $languages,
26+
bool $returnLanguageArray = false
27+
): array|string;
28+
}

0 commit comments

Comments
 (0)