Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/images/favicon.ico
Binary file not shown.
93 changes: 48 additions & 45 deletions config/reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,29 +208,29 @@
* initial_marking?: list<scalar|Param|null>,
* events_to_dispatch?: list<string|Param>|null,
* places?: list<array{ // Default: []
* name: scalar|Param|null,
* metadata?: list<mixed>,
* name?: scalar|Param|null,
* metadata?: array<string, mixed>,
* }>,
* transitions: list<array{ // Default: []
* name: string|Param,
* transitions?: list<array{ // Default: []
* name?: string|Param,
* guard?: string|Param, // An expression to block the transition.
* from?: list<array{ // Default: []
* place: string|Param,
* place?: string|Param,
* weight?: int|Param, // Default: 1
* }>,
* to?: list<array{ // Default: []
* place: string|Param,
* place?: string|Param,
* weight?: int|Param, // Default: 1
* }>,
* weight?: int|Param, // Default: 1
* metadata?: list<mixed>,
* metadata?: array<string, mixed>,
* }>,
* metadata?: list<mixed>,
* metadata?: array<string, mixed>,
* }>,
* },
* router?: bool|array{ // Router configuration
* enabled?: bool|Param, // Default: false
* resource: scalar|Param|null,
* resource?: scalar|Param|null,
* type?: scalar|Param|null,
* default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null
* http_port?: scalar|Param|null, // Default: 80
Expand Down Expand Up @@ -353,10 +353,10 @@
* mapping?: array{
* paths?: list<scalar|Param|null>,
* },
* default_context?: list<mixed>,
* default_context?: array<string, mixed>,
* named_serializers?: array<string, array{ // Default: []
* name_converter?: scalar|Param|null,
* default_context?: list<mixed>,
* default_context?: array<string, mixed>,
* include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true
* include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true
* }>,
Expand Down Expand Up @@ -420,7 +420,7 @@
* },
* messenger?: bool|array{ // Messenger configuration
* enabled?: bool|Param, // Default: false
* routing?: array<string, array{ // Default: []
* routing?: array<string, string|array{ // Default: []
* senders?: list<scalar|Param|null>,
* }>,
* serializer?: array{
Expand All @@ -433,7 +433,7 @@
* transports?: array<string, string|array{ // Default: []
* dsn?: scalar|Param|null,
* serializer?: scalar|Param|null, // Service id of a custom serializer to use. // Default: null
* options?: list<mixed>,
* options?: array<string, mixed>,
* failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null
* retry_strategy?: string|array{
* service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null
Expand All @@ -455,7 +455,7 @@
* allow_no_senders?: bool|Param, // Default: true
* },
* middleware?: list<string|array{ // Default: []
* id: scalar|Param|null,
* id?: scalar|Param|null,
* arguments?: list<mixed>,
* }>,
* }>,
Expand Down Expand Up @@ -627,7 +627,7 @@
* lock_factory?: scalar|Param|null, // The service ID of the lock factory used by this limiter (or null to disable locking). // Default: "auto"
* cache_pool?: scalar|Param|null, // The cache pool to use for storing the current limiter state. // Default: "cache.rate_limiter"
* storage_service?: scalar|Param|null, // The service ID of a custom storage implementation, this precedes any configured "cache_pool". // Default: null
* policy: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
* policy?: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
* limiters?: list<scalar|Param|null>,
* limit?: int|Param, // The maximum allowed hits in a fixed interval or burst.
* interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
Expand Down Expand Up @@ -672,7 +672,7 @@
* enabled?: bool|Param, // Default: false
* message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus"
* routing?: array<string, array{ // Default: []
* service: scalar|Param|null,
* service?: scalar|Param|null,
* secret?: scalar|Param|null, // Default: ""
* }>,
* },
Expand Down Expand Up @@ -776,7 +776,7 @@
* dbal?: array{
* default_connection?: scalar|Param|null,
* types?: array<string, string|array{ // Default: []
* class: scalar|Param|null,
* class?: scalar|Param|null,
* }>,
* driver_schemes?: array<string, scalar|Param|null>,
* connections?: array<string, array{ // Default: []
Expand Down Expand Up @@ -947,7 +947,7 @@
* datetime_functions?: array<string, scalar|Param|null>,
* },
* filters?: array<string, string|array{ // Default: []
* class: scalar|Param|null,
* class?: scalar|Param|null,
* enabled?: bool|Param, // Default: false
* parameters?: array<string, mixed>,
* }>,
Expand All @@ -970,8 +970,8 @@
* options?: mixed, // Deprecated: The "options" node at "sylius_resource.resources..options" is deprecated and will be removed in 2.0.
* templates?: scalar|Param|null,
* state_machine_component?: scalar|Param|null, // Default: null
* classes: array{
* model: scalar|Param|null,
* classes?: array{
* model?: scalar|Param|null,
* interface?: scalar|Param|null,
* controller?: scalar|Param|null, // Default: "Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController"
* repository?: scalar|Param|null,
Expand All @@ -980,8 +980,8 @@
* },
* translation?: array{
* options?: mixed, // Deprecated: The "options" node at "sylius_resource.resources..translation.options" is deprecated and will be removed in 2.0.
* classes: array{
* model: scalar|Param|null,
* classes?: array{
* model?: scalar|Param|null,
* interface?: scalar|Param|null,
* controller?: scalar|Param|null, // Default: "Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController"
* repository?: scalar|Param|null,
Expand Down Expand Up @@ -1086,7 +1086,7 @@
* sorting?: array<string, "asc"|"desc"|Param>,
* limits?: list<int|Param>,
* fields?: array<string, array{ // Default: []
* type: scalar|Param|null,
* type?: scalar|Param|null,
* label?: scalar|Param|null,
* path?: scalar|Param|null,
* sortable?: scalar|Param|null,
Expand All @@ -1095,7 +1095,7 @@
* options?: list<mixed>,
* }>,
* filters?: array<string, array{ // Default: []
* type: scalar|Param|null,
* type?: scalar|Param|null,
* label?: scalar|Param|null,
* enabled?: scalar|Param|null, // Default: true
* template?: scalar|Param|null,
Expand All @@ -1105,7 +1105,7 @@
* default_value?: mixed,
* }>,
* actions?: array<string, array<string, array{ // Default: []
* type: scalar|Param|null,
* type?: scalar|Param|null,
* label?: scalar|Param|null,
* enabled?: scalar|Param|null, // Default: true
* template?: scalar|Param|null,
Expand All @@ -1118,7 +1118,7 @@
* }
* @psalm-type VichUploaderConfig = array{
* default_filename_attribute_suffix?: scalar|Param|null, // Default: "_name"
* db_driver: scalar|Param|null,
* db_driver?: scalar|Param|null,
* storage?: scalar|Param|null, // Default: "file_system"
* use_flysystem_to_resolve_uri?: bool|Param, // Default: false
* twig?: scalar|Param|null, // twig requires templating // Default: true
Expand All @@ -1131,7 +1131,7 @@
* },
* auto_detection?: bool|Param, // Default: true
* directories?: list<array{ // Default: []
* path: scalar|Param|null,
* path?: scalar|Param|null,
* namespace_prefix?: scalar|Param|null, // Default: ""
* }>,
* },
Expand Down Expand Up @@ -1190,7 +1190,7 @@
* providers?: list<scalar|Param|null>,
* },
* entity?: array{
* class: scalar|Param|null, // The full entity class name of your user class.
* class?: scalar|Param|null, // The full entity class name of your user class.
* property?: scalar|Param|null, // Default: null
* manager_name?: scalar|Param|null, // Default: null
* },
Expand All @@ -1201,8 +1201,8 @@
* }>,
* },
* ldap?: array{
* service: scalar|Param|null,
* base_dn: scalar|Param|null,
* service?: scalar|Param|null,
* base_dn?: scalar|Param|null,
* search_dn?: scalar|Param|null, // Default: null
* search_password?: scalar|Param|null, // Default: null
* extra_fields?: list<scalar|Param|null>,
Expand All @@ -1213,7 +1213,7 @@
* password_attribute?: scalar|Param|null, // Default: null
* },
* }>,
* firewalls: array<string, array{ // Default: []
* firewalls?: array<string, array{ // Default: []
* pattern?: scalar|Param|null,
* host?: scalar|Param|null,
* methods?: list<scalar|Param|null>,
Expand Down Expand Up @@ -1271,9 +1271,9 @@
* user?: scalar|Param|null, // Default: "REMOTE_USER"
* },
* login_link?: array{
* check_route: scalar|Param|null, // Route that will validate the login link - e.g. "app_login_link_verify".
* check_route?: scalar|Param|null, // Route that will validate the login link - e.g. "app_login_link_verify".
* check_post_only?: scalar|Param|null, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false
* signature_properties: list<scalar|Param|null>,
* signature_properties?: list<scalar|Param|null>,
* lifetime?: int|Param, // The lifetime of the login link in seconds. // Default: 600
* max_uses?: int|Param, // Max number of times a login link can be used - null means unlimited within lifetime. // Default: null
* used_link_cache?: scalar|Param|null, // Cache service id used to expired links of max_uses is set.
Expand Down Expand Up @@ -1375,39 +1375,39 @@
* failure_handler?: scalar|Param|null,
* realm?: scalar|Param|null, // Default: null
* token_extractors?: list<scalar|Param|null>,
* token_handler: string|array{
* token_handler?: string|array{
* id?: scalar|Param|null,
* oidc_user_info?: string|array{
* base_uri: scalar|Param|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured).
* base_uri?: scalar|Param|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured).
* discovery?: array{ // Enable the OIDC discovery.
* cache?: array{
* id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
* id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
* },
* },
* claim?: scalar|Param|null, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub"
* client?: scalar|Param|null, // HttpClient service id to use to call the OIDC server.
* },
* oidc?: array{
* discovery?: array{ // Enable the OIDC discovery.
* base_uri: list<scalar|Param|null>,
* base_uri?: list<scalar|Param|null>,
* cache?: array{
* id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
* id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
* },
* },
* claim?: scalar|Param|null, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub"
* audience: scalar|Param|null, // Audience set in the token, for validation purpose.
* issuers: list<scalar|Param|null>,
* algorithms: list<scalar|Param|null>,
* audience?: scalar|Param|null, // Audience set in the token, for validation purpose.
* issuers?: list<scalar|Param|null>,
* algorithms?: list<scalar|Param|null>,
* keyset?: scalar|Param|null, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys).
* encryption?: bool|array{
* enabled?: bool|Param, // Default: false
* enforce?: bool|Param, // When enabled, the token shall be encrypted. // Default: false
* algorithms: list<scalar|Param|null>,
* keyset: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys).
* algorithms?: list<scalar|Param|null>,
* keyset?: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys).
* },
* },
* cas?: array{
* validation_url: scalar|Param|null, // CAS server validation URL
* validation_url?: scalar|Param|null, // CAS server validation URL
* prefix?: scalar|Param|null, // CAS prefix // Default: "cas"
* http_client?: scalar|Param|null, // HTTP Client service // Default: null
* },
Expand Down Expand Up @@ -1597,7 +1597,10 @@ final class App
*/
public static function config(array $config): array
{
return AppReference::config($config);
/** @var ConfigType $config */
$config = AppReference::config($config);

return $config;
}
}

Expand Down
8 changes: 8 additions & 0 deletions config/sylius/twig_hooks/common/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
'template' => 'base/javascripts/app.html.twig',
],
],
'sylius_admin.base#metatags' => [
'favicon' => [
'template' => 'base/favicon.html.twig',
],
'seo_metatags' => [
'template' => 'base/seo_metatags.html.twig',
],
],
],
]);
};
12 changes: 12 additions & 0 deletions docs/cookbook/admin_panel/metatags.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,15 @@ return static function (ContainerConfigurator $containerConfigurator): void {
{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="templates/favicon.html.twig" %}
```twig
<link rel="icon" type="image/x-icon" href="{{ asset('images/your_favicon.svg') }}" />
```
{% endcode %}

{% code title="templates/seo_metatags.html.twig" %}
```twig
<meta name="description" content="Your custom description">
```
{% endcode %}
1 change: 1 addition & 0 deletions templates/base/favicon.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="icon" type="image/x-icon" href="{{ asset('images/favicon.ico') }}" />
1 change: 1 addition & 0 deletions templates/base/seo_metatags.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta name="description" content="The Sylius stack is a set of tools for your Symfony projects. It comes with a bunch of components that work great independently, but when they come together, that's when the stack's magic truly operates! Indeed, the highlight of this project is the ability to configure an admin panel UI within minutes.">