Skip to content

Commit 1513f1a

Browse files
authored
Merge pull request #268 from adiati98/fix-links
Fix a broken link and build warning
2 parents 5ce90b5 + 9a2e1c4 commit 1513f1a

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

docs/links/mautic_dev_contribution_guide.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
link_name = "Mautic Developer Contribution Guide"
44
link_text = "Mautic Developer Contribution Guide"
5-
link_url = "https://contribute.mautic.org/contributing-to-mautic/developer"
5+
link_url = "https://contribute.mautic.org/en/latest/contributing/developer.html"
66

77
link.xref_links.update({link_name: (link_text, link_url)})

docs/plugins/config.rst

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ Route definitions
129129

130130
Route definitions define the route's method, path, controller, parameters, and others defined below.
131131

132-
133-
134132
.. list-table::
135133
:header-rows: 1
136134
:widths: 28 20 25 60
@@ -288,7 +286,6 @@ Plugins define items for Mautic's varying menus through the ``menu`` config arra
288286
289287
// ...
290288
291-
292289
Available menus
293290
===============
294291

@@ -690,7 +687,6 @@ Use ``categories`` to define Category types available to the Category manager. S
690687
691688
// ...
692689
693-
694690
Parameters config items
695691
***********************
696692

@@ -709,18 +705,16 @@ Configure parameters that are consumable through Mautic's ``CoreParameterHelper`
709705
710706
// ...
711707
712-
713708
.. note:: The default value must match the value's type for Mautic to typecast and transform appropriately. For example, if there isn't a specific default value to declare, define an empty array, ``[]``, for an array type; zero, ``0``, for an integer type; ``TRUE`` or ``FALSE`` for boolean types; and so forth. Services leveraging parameters should accept and handle ``NULL`` for integer and string types, excluding ``0``.
714709

715710
.. note:: Parameters aren't exposed to the UI by default. See :ref:`components/config:Configuration` for more information.
716711

717-
718712
Custom config parameters
719713
************************
720714

721715
You can define custom configuration parameters in your Plugin to support configurable features, such as enabling or disabling functions.
722716

723-
Mautic Plugins allow you to define these parameters for use within your Plugin’s code. Store these parameters in ``config/local.php``, and define their default values in the Plugin’s own config file to ensure stability and avoid errors.
717+
Mautic Plugins allow you to define these parameters for use within your Plugin’s code. Store these parameters in ``config/local.php``, and define their default values in the Plugin’s own config file to ensure stability and avoid errors.
724718

725719
To avoid errors during cache compilation or when accessing parameters directly from the container without checking for their existence, always define custom parameters in the :ref:`plugins/config:Parameters config items`. This guarantees that the parameter exists and has a fallback value.
726720

@@ -734,7 +728,6 @@ To add these configuration options in Mautic's configuration section, you’ll n
734728

735729
To translate the Plugin’s tab label in the configuration form, include a translation key like ``mautic.config.tab.helloworld_config`` in the Plugin’s ``messages.ini`` file. Replace ``helloworld_config`` with the ``formAlias`` used when registering the form in the event subscriber.
736730

737-
738731
Config event subscriber
739732
=======================
740733

@@ -791,7 +784,6 @@ The following code example shows how a Plugin structures its event subscriber.
791784
}
792785
}
793786
794-
795787
Subscribed events
796788
-----------------
797789

@@ -803,9 +795,9 @@ The event subscriber listens to the following events:
803795
- ``ConfigEvents::CONFIG_PRE_SAVE``:
804796
Mautic triggers this event before it renders the form values and saves them to the ``local.php`` file. This allows the Plugin to clean up or modify the data before writing it to ``local.php``.
805797

806-
Generate plugin configuration
798+
Generate Plugin configuration
807799
-----------------------------
808-
.. vale on
800+
809801
To register Plugin’s configuration details during the ``ConfigEvents::CONFIG_ON_GENERATE event``, call the ``addForm()`` method on the ``ConfigBuilderEvent`` object. The method expects an array with the following elements:
810802

811803
.. list-table::
@@ -820,7 +812,6 @@ To register Plugin’s configuration details during the ``ConfigEvents::CONFIG_O
820812
- The view that formats the configuration form elements, for example, ``HelloWorldBundle:FormTheme\Config``.
821813
* - ``parameters``
822814
- An array of custom configuration elements. ``Use $event->getParametersFromConfig('HelloWorldBundle')`` to retrieve them from the plugin’s configuration file.
823-
.. vale off
824815

825816
Modify configuration before saving
826817
----------------------------------
@@ -832,7 +823,6 @@ Register the event subscriber
832823

833824
Register the subscriber through the Plugin’s configuration in the ``services[events]`` in :ref:`plugins/config:Service config items`. This ensures that the plugin listens for the events and reacts accordingly.
834825

835-
836826
Config form
837827
===========
838828

0 commit comments

Comments
 (0)