@frontastic/common 2.48.3 → 2.48.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/composer.json +3 -2
- package/docs/README.md +50 -0
- package/docs/php/AccountApiBundle/Command/CreateAccountCommand.md +1 -1
- package/docs/php/AccountApiBundle/Controller/LegacyAccountAuthController.md +2 -2
- package/docs/php/CoreBundle/Domain/Mailer/SwiftMail.md +2 -2
- package/docs/php/CoreBundle/EventListener/JsonExceptionListener.md +2 -2
- package/docs/php/CoreBundle/EventListener/JsonViewListener.md +2 -2
- package/docs/php/DevelopmentBundle/EventListener/BrowserConsoleDebuggerListener.md +2 -2
- package/docs/php/Mvc/EventDispatcher/EventDispatcher.md +40 -0
- package/docs/php/Mvc/Exception/FormAlreadyHandledException.md +25 -0
- package/docs/php/Mvc/Exception/NoFormHandledException.md +19 -0
- package/docs/php/Mvc/Exception/UnauthenticatedUserException.md +7 -0
- package/docs/php/Mvc/Flash.md +30 -0
- package/docs/php/Mvc/Form/InvalidFormRequest.md +88 -0
- package/docs/php/Mvc/Form/ValidFormRequest.md +103 -0
- package/docs/php/Mvc/FormRequest.md +86 -0
- package/docs/php/Mvc/Headers.md +27 -0
- package/docs/php/Mvc/RedirectRoute.md +63 -0
- package/docs/php/Mvc/TemplateView.md +65 -0
- package/docs/php/Mvc/TokenContext.md +124 -0
- package/docs/php/Mvc/ViewStruct.md +56 -0
- package/docs/php/MvcBundle/Controller/GyroControllerNameParser.md +38 -0
- package/docs/php/MvcBundle/Controller/ResultConverter/ArrayToTemplateResponseConverter.md +64 -0
- package/docs/php/MvcBundle/Controller/ResultConverter/ControllerResultConverter.md +40 -0
- package/docs/php/MvcBundle/Controller/ResultConverter/ControllerYieldApplier.md +42 -0
- package/docs/php/MvcBundle/Controller/ResultConverter/CookieYieldApplier.md +44 -0
- package/docs/php/MvcBundle/Controller/ResultConverter/FlashYieldApplier.md +44 -0
- package/docs/php/MvcBundle/Controller/ResultConverter/HeadersYieldApplier.md +44 -0
- package/docs/php/MvcBundle/Controller/ResultConverter/RedirectConverter.md +57 -0
- package/docs/php/MvcBundle/DependencyInjection/CompatibleTreeBuilder.md +32 -0
- package/docs/php/MvcBundle/DependencyInjection/Configuration.md +22 -0
- package/docs/php/MvcBundle/DependencyInjection/FrontasticCommonMvcExtension.md +32 -0
- package/docs/php/MvcBundle/EventListener/ConvertExceptionListener.md +40 -0
- package/docs/php/MvcBundle/EventListener/ParamConverterListener.md +42 -0
- package/docs/php/MvcBundle/EventListener/ViewListener.md +53 -0
- package/docs/php/MvcBundle/FrontasticCommonMvcBundle.md +7 -0
- package/docs/php/MvcBundle/MockTokenContext.md +137 -0
- package/docs/php/MvcBundle/ParamConverter/ServiceProvider.md +35 -0
- package/docs/php/MvcBundle/ParamConverter/SymfonyServiceProvider.md +56 -0
- package/docs/php/MvcBundle/Request/SymfonyFormRequest.md +105 -0
- package/docs/php/MvcBundle/SymfonyTokenContext.md +143 -0
- package/docs/php/MvcBundle/Versions.md +17 -0
- package/docs/php/MvcBundle/View/BundleLocation.md +38 -0
- package/docs/php/MvcBundle/View/SymfonyConventionsTemplateGuesser.md +48 -0
- package/docs/php/MvcBundle/View/TemplateGuesser.md +31 -0
- package/docs/php/ReplicatorBundle/Domain/Customer.md +0 -1
- package/docs/php/SpecificationBundle/Domain/SchemaFieldTypes.md +5 -0
- package/package.json +1 -1
- package/src/json/library/common.json +2 -1
- package/src/json/masterPageSchemaSchema.json +3 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# FrontasticCommonMvcExtension
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\DependencyInjection\FrontasticCommonMvcExtension`](../../../../src/php/MvcBundle/DependencyInjection/FrontasticCommonMvcExtension.php)
|
|
4
|
+
|
|
5
|
+
**Extends**: `\Symfony\Component\HttpKernel\DependencyInjection\Extension`
|
|
6
|
+
|
|
7
|
+
To learn more see {@link
|
|
8
|
+
http://symfony.com/doc/current/cookbook/bundles/extension.html}
|
|
9
|
+
|
|
10
|
+
## Methods
|
|
11
|
+
|
|
12
|
+
* [load()](#load)
|
|
13
|
+
|
|
14
|
+
### load()
|
|
15
|
+
|
|
16
|
+
```php
|
|
17
|
+
public function load(
|
|
18
|
+
array $configs,
|
|
19
|
+
\Symfony\Component\DependencyInjection\ContainerBuilder $container
|
|
20
|
+
): void
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
*{@inheritDoc}*
|
|
24
|
+
|
|
25
|
+
Argument|Type|Default|Description
|
|
26
|
+
--------|----|-------|-----------
|
|
27
|
+
`$configs`|`array`||
|
|
28
|
+
`$container`|`\Symfony\Component\DependencyInjection\ContainerBuilder`||
|
|
29
|
+
|
|
30
|
+
Return Value: `void`
|
|
31
|
+
|
|
32
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ConvertExceptionListener
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\EventListener\ConvertExceptionListener`](../../../../src/php/MvcBundle/EventListener/ConvertExceptionListener.php)
|
|
4
|
+
|
|
5
|
+
## Methods
|
|
6
|
+
|
|
7
|
+
* [__construct()](#__construct)
|
|
8
|
+
* [onKernelException()](#onkernelexception)
|
|
9
|
+
|
|
10
|
+
### __construct()
|
|
11
|
+
|
|
12
|
+
```php
|
|
13
|
+
public function __construct(
|
|
14
|
+
?\Psr\Log\LoggerInterface $logger = null,
|
|
15
|
+
array $exceptionClassMap = []
|
|
16
|
+
): mixed
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Argument|Type|Default|Description
|
|
20
|
+
--------|----|-------|-----------
|
|
21
|
+
`$logger`|`?\Psr\Log\LoggerInterface`|`null`|
|
|
22
|
+
`$exceptionClassMap`|`array`|`[]`|
|
|
23
|
+
|
|
24
|
+
Return Value: `mixed`
|
|
25
|
+
|
|
26
|
+
### onKernelException()
|
|
27
|
+
|
|
28
|
+
```php
|
|
29
|
+
public function onKernelException(
|
|
30
|
+
mixed $event
|
|
31
|
+
): void
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Argument|Type|Default|Description
|
|
35
|
+
--------|----|-------|-----------
|
|
36
|
+
`$event`|`mixed`||
|
|
37
|
+
|
|
38
|
+
Return Value: `void`
|
|
39
|
+
|
|
40
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# ParamConverterListener
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\EventListener\ParamConverterListener`](../../../../src/php/MvcBundle/EventListener/ParamConverterListener.php)
|
|
4
|
+
|
|
5
|
+
This replicates the SensioFrameworkExtraBundle behavior but keeps it simple
|
|
6
|
+
and without a dependency to allow usage outside Symfony Framework apps (Silex,
|
|
7
|
+
..).
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
* [__construct()](#__construct)
|
|
12
|
+
* [onKernelController()](#onkernelcontroller)
|
|
13
|
+
|
|
14
|
+
### __construct()
|
|
15
|
+
|
|
16
|
+
```php
|
|
17
|
+
public function __construct(
|
|
18
|
+
ServiceProvider $container
|
|
19
|
+
): mixed
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Argument|Type|Default|Description
|
|
23
|
+
--------|----|-------|-----------
|
|
24
|
+
`$container`|[`ServiceProvider`](../ParamConverter/ServiceProvider.md)||
|
|
25
|
+
|
|
26
|
+
Return Value: `mixed`
|
|
27
|
+
|
|
28
|
+
### onKernelController()
|
|
29
|
+
|
|
30
|
+
```php
|
|
31
|
+
public function onKernelController(
|
|
32
|
+
\Symfony\Component\HttpKernel\Event\ControllerEvent $event
|
|
33
|
+
): void
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Argument|Type|Default|Description
|
|
37
|
+
--------|----|-------|-----------
|
|
38
|
+
`$event`|`\Symfony\Component\HttpKernel\Event\ControllerEvent`||
|
|
39
|
+
|
|
40
|
+
Return Value: `void`
|
|
41
|
+
|
|
42
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# ViewListener
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\EventListener\ViewListener`](../../../../src/php/MvcBundle/EventListener/ViewListener.php)
|
|
4
|
+
|
|
5
|
+
## Methods
|
|
6
|
+
|
|
7
|
+
* [addConverter()](#addconverter)
|
|
8
|
+
* [addYieldApplier()](#addyieldapplier)
|
|
9
|
+
* [onKernelView()](#onkernelview)
|
|
10
|
+
|
|
11
|
+
### addConverter()
|
|
12
|
+
|
|
13
|
+
```php
|
|
14
|
+
public function addConverter(
|
|
15
|
+
ControllerResultConverter $converter
|
|
16
|
+
): void
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Argument|Type|Default|Description
|
|
20
|
+
--------|----|-------|-----------
|
|
21
|
+
`$converter`|[`ControllerResultConverter`](../Controller/ResultConverter/ControllerResultConverter.md)||
|
|
22
|
+
|
|
23
|
+
Return Value: `void`
|
|
24
|
+
|
|
25
|
+
### addYieldApplier()
|
|
26
|
+
|
|
27
|
+
```php
|
|
28
|
+
public function addYieldApplier(
|
|
29
|
+
ControllerYieldApplier $applier
|
|
30
|
+
): void
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Argument|Type|Default|Description
|
|
34
|
+
--------|----|-------|-----------
|
|
35
|
+
`$applier`|[`ControllerYieldApplier`](../Controller/ResultConverter/ControllerYieldApplier.md)||
|
|
36
|
+
|
|
37
|
+
Return Value: `void`
|
|
38
|
+
|
|
39
|
+
### onKernelView()
|
|
40
|
+
|
|
41
|
+
```php
|
|
42
|
+
public function onKernelView(
|
|
43
|
+
mixed $event
|
|
44
|
+
): void
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Argument|Type|Default|Description
|
|
48
|
+
--------|----|-------|-----------
|
|
49
|
+
`$event`|`mixed`||
|
|
50
|
+
|
|
51
|
+
Return Value: `void`
|
|
52
|
+
|
|
53
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# FrontasticCommonMvcBundle
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\FrontasticCommonMvcBundle`](../../../src/php/MvcBundle/FrontasticCommonMvcBundle.php)
|
|
4
|
+
|
|
5
|
+
**Extends**: `\Symfony\Component\HttpKernel\Bundle\Bundle`
|
|
6
|
+
|
|
7
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# MockTokenContext
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\MockTokenContext`](../../../src/php/MvcBundle/MockTokenContext.php)
|
|
4
|
+
|
|
5
|
+
**Implements**: [`TokenContext`](../Mvc/TokenContext.md)
|
|
6
|
+
|
|
7
|
+
## Methods
|
|
8
|
+
|
|
9
|
+
* [__construct()](#__construct)
|
|
10
|
+
* [getCurrentUserId()](#getcurrentuserid)
|
|
11
|
+
* [getCurrentUsername()](#getcurrentusername)
|
|
12
|
+
* [getCurrentUser()](#getcurrentuser)
|
|
13
|
+
* [hasToken()](#hastoken)
|
|
14
|
+
* [hasNonAnonymousToken()](#hasnonanonymoustoken)
|
|
15
|
+
* [getToken()](#gettoken)
|
|
16
|
+
* [isGranted()](#isgranted)
|
|
17
|
+
* [assertIsGranted()](#assertisgranted)
|
|
18
|
+
|
|
19
|
+
### __construct()
|
|
20
|
+
|
|
21
|
+
```php
|
|
22
|
+
public function __construct(
|
|
23
|
+
\Symfony\Component\Security\Core\User\UserInterface $user = null
|
|
24
|
+
): mixed
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Argument|Type|Default|Description
|
|
28
|
+
--------|----|-------|-----------
|
|
29
|
+
`$user`|`\Symfony\Component\Security\Core\User\UserInterface`|`null`|
|
|
30
|
+
|
|
31
|
+
Return Value: `mixed`
|
|
32
|
+
|
|
33
|
+
### getCurrentUserId()
|
|
34
|
+
|
|
35
|
+
```php
|
|
36
|
+
public function getCurrentUserId(): mixed
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
*If a security context and token exists, retrieve the user id.*
|
|
40
|
+
|
|
41
|
+
Throws UnauthenticatedUserException when no valid token exists.
|
|
42
|
+
|
|
43
|
+
Return Value: `mixed`
|
|
44
|
+
|
|
45
|
+
### getCurrentUsername()
|
|
46
|
+
|
|
47
|
+
```php
|
|
48
|
+
public function getCurrentUsername(): string
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
*If a security context and token exists, retrieve the username.*
|
|
52
|
+
|
|
53
|
+
Throws UnauthenticatedUserException when no valid token exists.
|
|
54
|
+
|
|
55
|
+
Return Value: `string`
|
|
56
|
+
|
|
57
|
+
### getCurrentUser()
|
|
58
|
+
|
|
59
|
+
```php
|
|
60
|
+
public function getCurrentUser(
|
|
61
|
+
string $expectedClass
|
|
62
|
+
): \Symfony\Component\Security\Core\User\UserInterface
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
*Get the current User object*
|
|
66
|
+
|
|
67
|
+
Throws UnauthenticatedUserException when no valid token exists.
|
|
68
|
+
|
|
69
|
+
Argument|Type|Default|Description
|
|
70
|
+
--------|----|-------|-----------
|
|
71
|
+
`$expectedClass`|`string`||
|
|
72
|
+
|
|
73
|
+
Return Value: `\Symfony\Component\Security\Core\User\UserInterface`
|
|
74
|
+
|
|
75
|
+
### hasToken()
|
|
76
|
+
|
|
77
|
+
```php
|
|
78
|
+
public function hasToken(): bool
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Return Value: `bool`
|
|
82
|
+
|
|
83
|
+
### hasNonAnonymousToken()
|
|
84
|
+
|
|
85
|
+
```php
|
|
86
|
+
public function hasNonAnonymousToken(): bool
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Return Value: `bool`
|
|
90
|
+
|
|
91
|
+
### getToken()
|
|
92
|
+
|
|
93
|
+
```php
|
|
94
|
+
public function getToken(
|
|
95
|
+
string $expectedClass
|
|
96
|
+
): \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Argument|Type|Default|Description
|
|
100
|
+
--------|----|-------|-----------
|
|
101
|
+
`$expectedClass`|`string`||
|
|
102
|
+
|
|
103
|
+
Return Value: `\Symfony\Component\Security\Core\Authentication\Token\TokenInterface`
|
|
104
|
+
|
|
105
|
+
### isGranted()
|
|
106
|
+
|
|
107
|
+
```php
|
|
108
|
+
public function isGranted(
|
|
109
|
+
mixed $attributes,
|
|
110
|
+
?object $object = null
|
|
111
|
+
): bool
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Argument|Type|Default|Description
|
|
115
|
+
--------|----|-------|-----------
|
|
116
|
+
`$attributes`|`mixed`||
|
|
117
|
+
`$object`|`?object`|`null`|
|
|
118
|
+
|
|
119
|
+
Return Value: `bool`
|
|
120
|
+
|
|
121
|
+
### assertIsGranted()
|
|
122
|
+
|
|
123
|
+
```php
|
|
124
|
+
public function assertIsGranted(
|
|
125
|
+
mixed $attributes,
|
|
126
|
+
?object $object = null
|
|
127
|
+
): void
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Argument|Type|Default|Description
|
|
131
|
+
--------|----|-------|-----------
|
|
132
|
+
`$attributes`|`mixed`||
|
|
133
|
+
`$object`|`?object`|`null`|
|
|
134
|
+
|
|
135
|
+
Return Value: `void`
|
|
136
|
+
|
|
137
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# `interface` ServiceProvider
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\ParamConverter\ServiceProvider`](../../../../src/php/MvcBundle/ParamConverter/ServiceProvider.php)
|
|
4
|
+
|
|
5
|
+
## Methods
|
|
6
|
+
|
|
7
|
+
* [getFormFactory()](#getformfactory)
|
|
8
|
+
* [getTokenStorage()](#gettokenstorage)
|
|
9
|
+
* [getAuthorizationChecker()](#getauthorizationchecker)
|
|
10
|
+
|
|
11
|
+
### getFormFactory()
|
|
12
|
+
|
|
13
|
+
```php
|
|
14
|
+
public function getFormFactory(): \Symfony\Component\Form\FormFactoryInterface
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Return Value: `\Symfony\Component\Form\FormFactoryInterface`
|
|
18
|
+
|
|
19
|
+
### getTokenStorage()
|
|
20
|
+
|
|
21
|
+
```php
|
|
22
|
+
public function getTokenStorage(): \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Return Value: `\Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface`
|
|
26
|
+
|
|
27
|
+
### getAuthorizationChecker()
|
|
28
|
+
|
|
29
|
+
```php
|
|
30
|
+
public function getAuthorizationChecker(): \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Return Value: `\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface`
|
|
34
|
+
|
|
35
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# SymfonyServiceProvider
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\ParamConverter\SymfonyServiceProvider`](../../../../src/php/MvcBundle/ParamConverter/SymfonyServiceProvider.php)
|
|
4
|
+
|
|
5
|
+
**Implements**: [`ServiceProvider`](ServiceProvider.md)
|
|
6
|
+
|
|
7
|
+
## Methods
|
|
8
|
+
|
|
9
|
+
* [__construct()](#__construct)
|
|
10
|
+
* [getFormFactory()](#getformfactory)
|
|
11
|
+
* [getTokenStorage()](#gettokenstorage)
|
|
12
|
+
* [getAuthorizationChecker()](#getauthorizationchecker)
|
|
13
|
+
|
|
14
|
+
### __construct()
|
|
15
|
+
|
|
16
|
+
```php
|
|
17
|
+
public function __construct(
|
|
18
|
+
?\Symfony\Component\Form\FormFactoryInterface $formFactory,
|
|
19
|
+
?\Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage,
|
|
20
|
+
?\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker
|
|
21
|
+
): mixed
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Argument|Type|Default|Description
|
|
25
|
+
--------|----|-------|-----------
|
|
26
|
+
`$formFactory`|`?\Symfony\Component\Form\FormFactoryInterface`||
|
|
27
|
+
`$tokenStorage`|`?\Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface`||
|
|
28
|
+
`$authorizationChecker`|`?\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface`||
|
|
29
|
+
|
|
30
|
+
Return Value: `mixed`
|
|
31
|
+
|
|
32
|
+
### getFormFactory()
|
|
33
|
+
|
|
34
|
+
```php
|
|
35
|
+
public function getFormFactory(): \Symfony\Component\Form\FormFactoryInterface
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Return Value: `\Symfony\Component\Form\FormFactoryInterface`
|
|
39
|
+
|
|
40
|
+
### getTokenStorage()
|
|
41
|
+
|
|
42
|
+
```php
|
|
43
|
+
public function getTokenStorage(): \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Return Value: `\Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface`
|
|
47
|
+
|
|
48
|
+
### getAuthorizationChecker()
|
|
49
|
+
|
|
50
|
+
```php
|
|
51
|
+
public function getAuthorizationChecker(): \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Return Value: `\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface`
|
|
55
|
+
|
|
56
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# SymfonyFormRequest
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\Request\SymfonyFormRequest`](../../../../src/php/MvcBundle/Request/SymfonyFormRequest.php)
|
|
4
|
+
|
|
5
|
+
**Implements**: [`FormRequest`](../../Mvc/FormRequest.md)
|
|
6
|
+
|
|
7
|
+
## Methods
|
|
8
|
+
|
|
9
|
+
* [__construct()](#__construct)
|
|
10
|
+
* [handle()](#handle)
|
|
11
|
+
* [getValidData()](#getvaliddata)
|
|
12
|
+
* [isValid()](#isvalid)
|
|
13
|
+
* [isBound()](#isbound)
|
|
14
|
+
* [getForm()](#getform)
|
|
15
|
+
* [createFormView()](#createformview)
|
|
16
|
+
|
|
17
|
+
### __construct()
|
|
18
|
+
|
|
19
|
+
```php
|
|
20
|
+
public function __construct(
|
|
21
|
+
\Symfony\Component\HttpFoundation\Request $request,
|
|
22
|
+
\Symfony\Component\Form\FormFactoryInterface $formFactory
|
|
23
|
+
): mixed
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Argument|Type|Default|Description
|
|
27
|
+
--------|----|-------|-----------
|
|
28
|
+
`$request`|`\Symfony\Component\HttpFoundation\Request`||
|
|
29
|
+
`$formFactory`|`\Symfony\Component\Form\FormFactoryInterface`||
|
|
30
|
+
|
|
31
|
+
Return Value: `mixed`
|
|
32
|
+
|
|
33
|
+
### handle()
|
|
34
|
+
|
|
35
|
+
```php
|
|
36
|
+
public function handle(
|
|
37
|
+
string $formType,
|
|
38
|
+
mixed $bindData = null,
|
|
39
|
+
array $options = []
|
|
40
|
+
): bool
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
*Attempt to handle a form and return true when handled and data is valid.*
|
|
44
|
+
|
|
45
|
+
Argument|Type|Default|Description
|
|
46
|
+
--------|----|-------|-----------
|
|
47
|
+
`$formType`|`string`||
|
|
48
|
+
`$bindData`|`mixed`|`null`|
|
|
49
|
+
`$options`|`array`|`[]`|
|
|
50
|
+
|
|
51
|
+
Return Value: `bool`
|
|
52
|
+
|
|
53
|
+
### getValidData()
|
|
54
|
+
|
|
55
|
+
```php
|
|
56
|
+
public function getValidData(): mixed
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
*Use this to retrieve the validated data from the form even when you attached `$bindData`.*
|
|
60
|
+
|
|
61
|
+
Only by using this method you can mock the form handling by providing a replacement valid value in tests.
|
|
62
|
+
|
|
63
|
+
Return Value: `mixed`
|
|
64
|
+
|
|
65
|
+
### isValid()
|
|
66
|
+
|
|
67
|
+
```php
|
|
68
|
+
public function isValid(): bool
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
*Is the bound form valid?*
|
|
72
|
+
|
|
73
|
+
Return Value: `bool`
|
|
74
|
+
|
|
75
|
+
### isBound()
|
|
76
|
+
|
|
77
|
+
```php
|
|
78
|
+
public function isBound(): bool
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
*Is the request bound to a form?*
|
|
82
|
+
|
|
83
|
+
Return Value: `bool`
|
|
84
|
+
|
|
85
|
+
### getForm()
|
|
86
|
+
|
|
87
|
+
```php
|
|
88
|
+
public function getForm(): \Symfony\Component\Form\FormInterface
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Return Value: `\Symfony\Component\Form\FormInterface`
|
|
92
|
+
|
|
93
|
+
### createFormView()
|
|
94
|
+
|
|
95
|
+
```php
|
|
96
|
+
public function createFormView(): \Symfony\Component\Form\FormView
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
*Create the form view for the handled form.*
|
|
100
|
+
|
|
101
|
+
Throws exception when no form was handled yet.
|
|
102
|
+
|
|
103
|
+
Return Value: `\Symfony\Component\Form\FormView`
|
|
104
|
+
|
|
105
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# SymfonyTokenContext
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\SymfonyTokenContext`](../../../src/php/MvcBundle/SymfonyTokenContext.php)
|
|
4
|
+
|
|
5
|
+
**Implements**: [`TokenContext`](../Mvc/TokenContext.md)
|
|
6
|
+
|
|
7
|
+
## Methods
|
|
8
|
+
|
|
9
|
+
* [__construct()](#__construct)
|
|
10
|
+
* [getCurrentUserId()](#getcurrentuserid)
|
|
11
|
+
* [getCurrentUsername()](#getcurrentusername)
|
|
12
|
+
* [getCurrentUser()](#getcurrentuser)
|
|
13
|
+
* [hasToken()](#hastoken)
|
|
14
|
+
* [hasNonAnonymousToken()](#hasnonanonymoustoken)
|
|
15
|
+
* [getToken()](#gettoken)
|
|
16
|
+
* [isGranted()](#isgranted)
|
|
17
|
+
* [assertIsGranted()](#assertisgranted)
|
|
18
|
+
|
|
19
|
+
### __construct()
|
|
20
|
+
|
|
21
|
+
```php
|
|
22
|
+
public function __construct(
|
|
23
|
+
\Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage,
|
|
24
|
+
\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker
|
|
25
|
+
): mixed
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Argument|Type|Default|Description
|
|
29
|
+
--------|----|-------|-----------
|
|
30
|
+
`$tokenStorage`|`\Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface`||
|
|
31
|
+
`$authorizationChecker`|`\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface`||
|
|
32
|
+
|
|
33
|
+
Return Value: `mixed`
|
|
34
|
+
|
|
35
|
+
### getCurrentUserId()
|
|
36
|
+
|
|
37
|
+
```php
|
|
38
|
+
public function getCurrentUserId(): mixed
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
*If a security context and token exists, retrieve the user id.*
|
|
42
|
+
|
|
43
|
+
Throws UnauthenticatedUserException when no valid token exists.
|
|
44
|
+
|
|
45
|
+
Return Value: `mixed`
|
|
46
|
+
|
|
47
|
+
### getCurrentUsername()
|
|
48
|
+
|
|
49
|
+
```php
|
|
50
|
+
public function getCurrentUsername(): string
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
*If a security context and token exists, retrieve the username.*
|
|
54
|
+
|
|
55
|
+
Throws UnauthenticatedUserException when no valid token exists.
|
|
56
|
+
|
|
57
|
+
Return Value: `string`
|
|
58
|
+
|
|
59
|
+
### getCurrentUser()
|
|
60
|
+
|
|
61
|
+
```php
|
|
62
|
+
public function getCurrentUser(
|
|
63
|
+
string $expectedClass
|
|
64
|
+
): \Symfony\Component\Security\Core\User\UserInterface
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
*Get the current User object*
|
|
68
|
+
|
|
69
|
+
Throws UnauthenticatedUserException when no valid token exists.
|
|
70
|
+
|
|
71
|
+
Argument|Type|Default|Description
|
|
72
|
+
--------|----|-------|-----------
|
|
73
|
+
`$expectedClass`|`string`||
|
|
74
|
+
|
|
75
|
+
Return Value: `\Symfony\Component\Security\Core\User\UserInterface`
|
|
76
|
+
|
|
77
|
+
### hasToken()
|
|
78
|
+
|
|
79
|
+
```php
|
|
80
|
+
public function hasToken(): bool
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Return Value: `bool`
|
|
84
|
+
|
|
85
|
+
### hasNonAnonymousToken()
|
|
86
|
+
|
|
87
|
+
```php
|
|
88
|
+
public function hasNonAnonymousToken(): bool
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Return Value: `bool`
|
|
92
|
+
|
|
93
|
+
### getToken()
|
|
94
|
+
|
|
95
|
+
```php
|
|
96
|
+
public function getToken(
|
|
97
|
+
string $expectedClass
|
|
98
|
+
): \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
*Get the Security Token*
|
|
102
|
+
|
|
103
|
+
Throws UnauthenticatedUserException when no valid token exists.
|
|
104
|
+
|
|
105
|
+
Argument|Type|Default|Description
|
|
106
|
+
--------|----|-------|-----------
|
|
107
|
+
`$expectedClass`|`string`||
|
|
108
|
+
|
|
109
|
+
Return Value: `\Symfony\Component\Security\Core\Authentication\Token\TokenInterface`
|
|
110
|
+
|
|
111
|
+
### isGranted()
|
|
112
|
+
|
|
113
|
+
```php
|
|
114
|
+
public function isGranted(
|
|
115
|
+
mixed $attributes,
|
|
116
|
+
?object $object = null
|
|
117
|
+
): bool
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Argument|Type|Default|Description
|
|
121
|
+
--------|----|-------|-----------
|
|
122
|
+
`$attributes`|`mixed`||
|
|
123
|
+
`$object`|`?object`|`null`|
|
|
124
|
+
|
|
125
|
+
Return Value: `bool`
|
|
126
|
+
|
|
127
|
+
### assertIsGranted()
|
|
128
|
+
|
|
129
|
+
```php
|
|
130
|
+
public function assertIsGranted(
|
|
131
|
+
mixed $attributes,
|
|
132
|
+
?object $object = null
|
|
133
|
+
): void
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Argument|Type|Default|Description
|
|
137
|
+
--------|----|-------|-----------
|
|
138
|
+
`$attributes`|`mixed`||
|
|
139
|
+
`$object`|`?object`|`null`|
|
|
140
|
+
|
|
141
|
+
Return Value: `void`
|
|
142
|
+
|
|
143
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Versions
|
|
2
|
+
|
|
3
|
+
**Fully Qualified**: [`\Frontastic\Common\MvcBundle\Versions`](../../../src/php/MvcBundle/Versions.php)
|
|
4
|
+
|
|
5
|
+
## Methods
|
|
6
|
+
|
|
7
|
+
* [isSecurityVersion6()](#issecurityversion6)
|
|
8
|
+
|
|
9
|
+
### isSecurityVersion6()
|
|
10
|
+
|
|
11
|
+
```php
|
|
12
|
+
static public function isSecurityVersion6(): bool
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Return Value: `bool`
|
|
16
|
+
|
|
17
|
+
Generated with [Frontastic API Docs](https://github.com/FrontasticGmbH/apidocs).
|