diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico new file mode 100644 index 00000000..592f7a8e Binary files /dev/null and b/assets/images/favicon.ico differ diff --git a/config/reference.php b/config/reference.php index b0452a24..28286634 100644 --- a/config/reference.php +++ b/config/reference.php @@ -208,29 +208,29 @@ * initial_marking?: list, * events_to_dispatch?: list|null, * places?: list, + * name?: scalar|Param|null, + * metadata?: array, * }>, - * transitions: list, * to?: list, * weight?: int|Param, // Default: 1 - * metadata?: list, + * metadata?: array, * }>, - * metadata?: list, + * metadata?: array, * }>, * }, * 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 @@ -353,10 +353,10 @@ * mapping?: array{ * paths?: list, * }, - * default_context?: list, + * default_context?: array, * named_serializers?: array, + * default_context?: array, * 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 * }>, @@ -420,7 +420,7 @@ * }, * messenger?: bool|array{ // Messenger configuration * enabled?: bool|Param, // Default: false - * routing?: array, * }>, * serializer?: array{ @@ -433,7 +433,7 @@ * transports?: array, + * options?: array, * 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 @@ -455,7 +455,7 @@ * allow_no_senders?: bool|Param, // Default: true * }, * middleware?: list, * }>, * }>, @@ -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, * 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). @@ -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, * }, @@ -776,7 +776,7 @@ * dbal?: array{ * default_connection?: scalar|Param|null, * types?: array, * driver_schemes?: array, * connections?: array, * }, * filters?: array, * }>, @@ -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, @@ -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, @@ -1086,7 +1086,7 @@ * sorting?: array, * limits?: list, * fields?: array, * }>, * filters?: array, * actions?: array, * }, @@ -1190,7 +1190,7 @@ * providers?: list, * }, * 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 * }, @@ -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, @@ -1213,7 +1213,7 @@ * password_attribute?: scalar|Param|null, // Default: null * }, * }>, - * firewalls: array, @@ -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, + * signature_properties?: list, * 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. @@ -1375,13 +1375,13 @@ * failure_handler?: scalar|Param|null, * realm?: scalar|Param|null, // Default: null * token_extractors?: list, - * 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" @@ -1389,25 +1389,25 @@ * }, * oidc?: array{ * discovery?: array{ // Enable the OIDC discovery. - * base_uri: list, + * base_uri?: list, * 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, - * algorithms: list, + * audience?: scalar|Param|null, // Audience set in the token, for validation purpose. + * issuers?: list, + * algorithms?: list, * 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, - * keyset: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). + * algorithms?: list, + * 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 * }, @@ -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; } } diff --git a/config/sylius/twig_hooks/common/base.php b/config/sylius/twig_hooks/common/base.php index 801ae11f..1f2ac439 100644 --- a/config/sylius/twig_hooks/common/base.php +++ b/config/sylius/twig_hooks/common/base.php @@ -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', + ], + ], ], ]); }; diff --git a/docs/cookbook/admin_panel/metatags.md b/docs/cookbook/admin_panel/metatags.md index c5daba1c..efbc85ce 100644 --- a/docs/cookbook/admin_panel/metatags.md +++ b/docs/cookbook/admin_panel/metatags.md @@ -49,3 +49,15 @@ return static function (ContainerConfigurator $containerConfigurator): void { {% endcode %} {% endtab %} {% endtabs %} + +{% code title="templates/favicon.html.twig" %} +```twig + +``` +{% endcode %} + +{% code title="templates/seo_metatags.html.twig" %} +```twig + +``` +{% endcode %} diff --git a/templates/base/favicon.html.twig b/templates/base/favicon.html.twig new file mode 100644 index 00000000..319e9257 --- /dev/null +++ b/templates/base/favicon.html.twig @@ -0,0 +1 @@ + diff --git a/templates/base/seo_metatags.html.twig b/templates/base/seo_metatags.html.twig new file mode 100644 index 00000000..9406ee4e --- /dev/null +++ b/templates/base/seo_metatags.html.twig @@ -0,0 +1 @@ +