forked from pimcore/pimcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/10.6' into 11.x
# Conflicts: # bundles/AdminBundle/src/Controller/Admin/SettingsController.php # bundles/CoreBundle/src/DependencyInjection/Configuration.php # bundles/CoreBundle/src/DependencyInjection/PimcoreCoreExtension.php # bundles/CoreBundle/src/Migrations/Version20230307135459.php # bundles/EcommerceFrameworkBundle/src/PriceSystem/CachingPriceSystem.php # bundles/SeoBundle/src/Redirect/RedirectHandler.php # composer.json # doc/18_Tools_and_Features/02_Custom_Icons.md # doc/20_Extending_Pimcore/11_Event_API_and_Event_Manager.md # doc/20_Extending_Pimcore/13_Bundle_Developers_Guide/13_Loading_Admin_UI_Assets.md # doc/26_Best_Practice/60_Modifying_Permissions_based_on_Object_Data.md # doc/Development_Documentation/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md # lib/Config/Config.php # lib/DataObject/ClassBuilder/FieldCollectionClassBuilder.php # lib/DataObject/ClassBuilder/ObjectBrickClassBuilder.php # lib/Event/Admin/ElementAdminStyleEvent.php # lib/Event/Admin/IndexActionSettingsEvent.php # lib/Event/Admin/Login/LoginCredentialsEvent.php # lib/Event/Admin/Login/LoginFailedEvent.php # lib/Event/Admin/Login/LoginRedirectEvent.php # lib/Event/Admin/Login/LogoutEvent.php # lib/Event/Admin/Login/LostPasswordEvent.php # lib/Event/AdminEvents.php # lib/Event/Model/ElementDeleteInfoEventInterface.php # lib/Event/Traits/ElementDeleteInfoEventTrait.php # lib/Extension/Bundle/AbstractPimcoreBundle.php # models/DataObject/ClassDefinition/Dao.php # models/DataObject/ClassDefinition/Data/Block.php # models/DataObject/ClassDefinition/Data/Input.php # models/DataObject/ClassDefinition/Data/Localizedfields.php # models/Document/Service.php # phpstan-baseline.neon
- Loading branch information
Showing
44 changed files
with
1,419 additions
and
876 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<?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\AdminBundle\Event; | ||
|
||
use Pimcore\Model\Element\AdminStyle; | ||
use Pimcore\Model\Element\ElementInterface; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
class ElementAdminStyleEvent extends Event | ||
{ | ||
/** | ||
* Style needed for tree | ||
*/ | ||
const CONTEXT_TREE = 1; | ||
|
||
/** | ||
* Style needed for element editor | ||
*/ | ||
const CONTEXT_EDITOR = 2; | ||
|
||
/** | ||
* Style needed for quicksearch | ||
*/ | ||
const CONTEXT_SEARCH = 3; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
protected $context; | ||
|
||
/** | ||
* @var ElementInterface | ||
*/ | ||
protected $element; | ||
|
||
/** | ||
* @var AdminStyle | ||
*/ | ||
protected $adminStyle; | ||
|
||
/** | ||
* ElementAdminStyleEvent constructor. | ||
* | ||
* @param ElementInterface $element | ||
* @param AdminStyle $adminStyle | ||
* @param null|int $context | ||
*/ | ||
public function __construct(ElementInterface $element, AdminStyle $adminStyle, $context = null) | ||
{ | ||
$this->element = $element; | ||
$this->adminStyle = $adminStyle; | ||
$this->context = $context; | ||
} | ||
|
||
/** | ||
* @return ElementInterface | ||
*/ | ||
public function getElement(): ElementInterface | ||
{ | ||
return $this->element; | ||
} | ||
|
||
/** | ||
* @param ElementInterface $element | ||
*/ | ||
public function setElement(ElementInterface $element): void | ||
{ | ||
$this->element = $element; | ||
} | ||
|
||
/** | ||
* @return AdminStyle | ||
*/ | ||
public function getAdminStyle(): AdminStyle | ||
{ | ||
return $this->adminStyle; | ||
} | ||
|
||
/** | ||
* @param AdminStyle $adminStyle | ||
*/ | ||
public function setAdminStyle(AdminStyle $adminStyle): void | ||
{ | ||
$this->adminStyle = $adminStyle; | ||
} | ||
|
||
/** | ||
* Returns the context. e.g. CONTEXT_TREE or CONTEXT_EDITOR. | ||
* | ||
* @return null|int | ||
*/ | ||
public function getContext() | ||
{ | ||
return $this->context; | ||
} | ||
|
||
/** | ||
* @param null|int $context | ||
*/ | ||
public function setContext($context): void | ||
{ | ||
$this->context = $context; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?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\AdminBundle\Event; | ||
|
||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
class IndexActionSettingsEvent extends Event | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
private $settings; | ||
|
||
public function __construct(array $settings) | ||
{ | ||
$this->settings = $settings; | ||
} | ||
|
||
public function getSettings(): array | ||
{ | ||
return $this->settings; | ||
} | ||
|
||
public function setSettings(array $settings) | ||
{ | ||
$this->settings = $settings; | ||
} | ||
|
||
/** | ||
* @param string $key | ||
* @param mixed $value | ||
*/ | ||
public function addSetting(string $key, $value) | ||
{ | ||
$this->settings[$key] = $value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
/** | ||
* 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\AdminBundle\Event\Login; | ||
|
||
use Pimcore\Event\Traits\RequestAwareTrait; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
class LoginCredentialsEvent extends Event | ||
{ | ||
use RequestAwareTrait; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
protected $credentials; | ||
|
||
/** | ||
* @param Request $request | ||
* @param array $credentials | ||
*/ | ||
public function __construct(Request $request, array $credentials) | ||
{ | ||
$this->request = $request; | ||
$this->credentials = $credentials; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getCredentials() | ||
{ | ||
return $this->credentials; | ||
} | ||
|
||
/** | ||
* @param array $credentials | ||
*/ | ||
public function setCredentials(array $credentials) | ||
{ | ||
$this->credentials = $credentials; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
|
||
/** | ||
* 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\AdminBundle\Event\Login; | ||
|
||
use Pimcore\Model\User; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
class LoginFailedEvent extends Event | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
protected $credentials; | ||
|
||
/** | ||
* @var User | ||
*/ | ||
protected $user; | ||
|
||
/** | ||
* @param array $credentials | ||
*/ | ||
public function __construct(array $credentials) | ||
{ | ||
$this->credentials = $credentials; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getCredentials() | ||
{ | ||
return $this->credentials; | ||
} | ||
|
||
/** | ||
* @param string $name | ||
* @param mixed $default | ||
* | ||
* @return mixed | ||
*/ | ||
public function getCredential($name, $default = null) | ||
{ | ||
if (isset($this->credentials[$name])) { | ||
return $this->credentials[$name]; | ||
} | ||
|
||
return $default; | ||
} | ||
|
||
/** | ||
* @return User | ||
*/ | ||
public function getUser() | ||
{ | ||
return $this->user; | ||
} | ||
|
||
/** | ||
* @param User $user | ||
* | ||
* @return $this | ||
*/ | ||
public function setUser(User $user) | ||
{ | ||
$this->user = $user; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function hasUser() | ||
{ | ||
return null !== $this->user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
|
||
/** | ||
* 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\AdminBundle\Event\Login; | ||
|
||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
class LoginRedirectEvent extends Event | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $routeName; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
protected $routeParams; | ||
|
||
/** | ||
* @param string $routeName | ||
* @param array $routeParams | ||
*/ | ||
public function __construct(string $routeName, array $routeParams = []) | ||
{ | ||
$this->routeName = $routeName; | ||
$this->routeParams = $routeParams; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getRouteName(): string | ||
{ | ||
return $this->routeName; | ||
} | ||
|
||
/** | ||
* @param string $routeName | ||
*/ | ||
public function setRouteName(string $routeName): void | ||
{ | ||
$this->routeName = $routeName; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getRouteParams(): array | ||
{ | ||
return $this->routeParams; | ||
} | ||
|
||
/** | ||
* @param array $routeParams | ||
*/ | ||
public function setRouteParams(array $routeParams): void | ||
{ | ||
$this->routeParams = $routeParams; | ||
} | ||
} |
Oops, something went wrong.