You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components/cache.rst
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ All you need to do now is to clear all tagged items:
43
43
.. code-block:: php
44
44
45
45
$cache->invalidateTags(['firstTag']);
46
+
46
47
Pools clearing
47
48
==============
48
49
@@ -54,6 +55,7 @@ Cache Pools include methods to delete a cache item, some of them, or all of them
54
55
.. code-block:: php
55
56
56
57
$isDeleted = $cache->deleteItem('user_'.$userId);
58
+
57
59
Use the ``Psr\\Cache\\CacheItemPoolInterface::deleteItems`` method to delete several cache items simultaneously - it returns true only if all the items have been deleted, even when any or some of them don't exist.
Copy file name to clipboardExpand all lines: docs/design/retrieving_system_information.rst
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
Retrieving Mautic settings in Twig
2
-
=============================================
2
+
##################################
3
3
4
4
Mautic allows you to access configuration settings directly in Twig templates using the ``configGetParameter`` function. This feature is particularly useful for creating display conditions or showing existing data in your templates.
5
5
6
6
Basic usage
7
-
-----------
7
+
***********
8
8
9
9
To retrieve a setting, use the ``configGetParameter`` function with the parameter name as its argument:
10
10
@@ -13,7 +13,7 @@ To retrieve a setting, use the ``configGetParameter`` function with the paramete
13
13
{{ configGetParameter('parameter_name') }}
14
14
15
15
Display conditions
16
-
------------------
16
+
==================
17
17
18
18
Use ``configGetParameter`` in conditional statements to control the display of content based on configuration settings:
19
19
@@ -24,7 +24,7 @@ Use ``configGetParameter`` in conditional statements to control the display of c
24
24
{% endif %}
25
25
26
26
Displaying configuration values
27
-
-------------------------------
27
+
===============================
28
28
29
29
To directly display a configuration value in your template, use the following syntax:
30
30
@@ -45,12 +45,12 @@ For example, to display the API OAuth2 access token lifetime:
45
45
API OAuth2 Access Token Lifetime: {{ configGetParameter('api_oauth2_access_token_lifetime') }}
46
46
47
47
Finding available parameters
48
-
----------------------------
48
+
============================
49
49
50
50
The ``/config/local.php`` file contains available configuration parameters, once you save the global configuration form for the first time. This file contains the complete list of settings that are accessible using ``configGetParameter``.
51
51
52
52
Identifying parameter names
53
-
---------------------------
53
+
===========================
54
54
55
55
To find the correct parameter name for a specific setting:
56
56
@@ -67,7 +67,7 @@ For example, if you see:
67
67
The corresponding parameter name would be ``api_oauth2_access_token_lifetime``.
68
68
69
69
Additional information
70
-
----------------------
70
+
**********************
71
71
72
72
- Be cautious when displaying sensitive configuration data in templates.
73
73
- Always consider providing default values when using configuration parameters to handle cases where the setting aren't defined.
0 commit comments