From 481d587aedf4ac4a46cd8ed94cdf3893071d2eef Mon Sep 17 00:00:00 2001 From: Ayu Adiati Date: Fri, 12 Sep 2025 10:31:04 +0200 Subject: [PATCH 1/4] fix broken link to mautic community handbook --- docs/links/mautic_dev_contribution_guide.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/links/mautic_dev_contribution_guide.py b/docs/links/mautic_dev_contribution_guide.py index f73de15a..f887b84a 100644 --- a/docs/links/mautic_dev_contribution_guide.py +++ b/docs/links/mautic_dev_contribution_guide.py @@ -2,6 +2,6 @@ link_name = "Mautic Developer Contribution Guide" link_text = "Mautic Developer Contribution Guide" -link_url = "https://contribute.mautic.org/contributing-to-mautic/developer" +link_url = "https://contribute.mautic.org/en/latest/contributing/developer.html" link.xref_links.update({link_name: (link_text, link_url)}) From 3b15290a87ff0792b3e81c530cd956048bcf2984 Mon Sep 17 00:00:00 2001 From: Ayu Adiati Date: Fri, 12 Sep 2025 10:53:20 +0200 Subject: [PATCH 2/4] fix build warning * apply vale statements in config.rst --- docs/plugins/config.rst | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/docs/plugins/config.rst b/docs/plugins/config.rst index 63d475fc..14a201a1 100644 --- a/docs/plugins/config.rst +++ b/docs/plugins/config.rst @@ -43,8 +43,12 @@ Mautic recognizes the Plugin through the general config options. Routing config items ******************** +.. vale off + Routes define the URL paths that execute the specified controller action. Register routes with Mautic through the ``routes`` key in the Plugin's config. Define each route under one of Mautic's :ref:`supported firewalls` with a uniquely identifying key and the :ref:`route's definition`. +.. vale on + .. code-block:: php ` for the given route collection. :returntype: string +.. vale on + .. php:method:: getCollection() :returns: Returns a RouteCollection object that can be used to manually define custom routes. @@ -288,7 +294,6 @@ Plugins define items for Mautic's varying menus through the ``menu`` config arra // ... - Available menus =============== @@ -324,6 +329,8 @@ Menu item definitions Define items in an ``items`` array along with ``priority`` or at the root of the menu's array. +.. vale off + Key each item with its respective :ref:`language string key`. .. list-table:: @@ -367,6 +374,8 @@ Key each item with its respective :ref:`language string key` that defines the fields. - A specific view for rendering the form. +.. vale on + .. note:: 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. +.. vale off Config event subscriber ======================= +.. vale on + This allows Plugins to interact with Mautic's configuration events. It listens to two important events: ``ConfigEvents::CONFIG_ON_GENERATE`` and ``ConfigEvents::CONFIG_PRE_SAVE``. The following code example shows how a Plugin structures its event subscriber. @@ -791,7 +819,6 @@ The following code example shows how a Plugin structures its event subscriber. } } - Subscribed events ----------------- @@ -803,9 +830,9 @@ The event subscriber listens to the following events: - ``ConfigEvents::CONFIG_PRE_SAVE``: 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``. -Generate plugin configuration +Generate Plugin configuration ----------------------------- -.. vale on + 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: .. list-table:: From 3ac58c7b516c9565ebb4b8b7566a0076dcea4d34 Mon Sep 17 00:00:00 2001 From: Ayu Adiati Date: Fri, 12 Sep 2025 13:39:21 +0200 Subject: [PATCH 3/4] remove vale off/on in the middle of code block --- docs/plugins/config.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/plugins/config.rst b/docs/plugins/config.rst index 14a201a1..1e379c4c 100644 --- a/docs/plugins/config.rst +++ b/docs/plugins/config.rst @@ -201,13 +201,9 @@ Configure custom routes through writing a listener to the ``\Mautic\CoreBundle\C .. php:method:: getType() -.. vale off - :returns: The :ref:`route firewall` for the given route collection. :returntype: string -.. vale on - .. php:method:: getCollection() :returns: Returns a RouteCollection object that can be used to manually define custom routes. From 9a2e1c4879dc72b31a32c1de6e46666b97b0311f Mon Sep 17 00:00:00 2001 From: Ayu Adiati Date: Fri, 19 Sep 2025 08:08:56 +0200 Subject: [PATCH 4/4] remove all vale statements and excess empty lines --- docs/plugins/config.rst | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/docs/plugins/config.rst b/docs/plugins/config.rst index a0030428..92a74823 100644 --- a/docs/plugins/config.rst +++ b/docs/plugins/config.rst @@ -43,12 +43,8 @@ Mautic recognizes the Plugin through the general config options. Routing config items ******************** -.. vale off - Routes define the URL paths that execute the specified controller action. Register routes with Mautic through the ``routes`` key in the Plugin's config. Define each route under one of Mautic's :ref:`supported firewalls` with a uniquely identifying key and the :ref:`route's definition`. -.. vale on - .. code-block:: php `. .. list-table:: @@ -370,8 +364,6 @@ Key each item with its respective :ref:`language string key` that defines the fields. - A specific view for rendering the form. -.. vale on - .. note:: 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. -.. vale off - Config event subscriber ======================= -.. vale on - This allows Plugins to interact with Mautic's configuration events. It listens to two important events: ``ConfigEvents::CONFIG_ON_GENERATE`` and ``ConfigEvents::CONFIG_PRE_SAVE``. The following code example shows how a Plugin structures its event subscriber. @@ -843,7 +812,6 @@ To register Plugin’s configuration details during the ``ConfigEvents::CONFIG_O - The view that formats the configuration form elements, for example, ``HelloWorldBundle:FormTheme\Config``. * - ``parameters`` - An array of custom configuration elements. ``Use $event->getParametersFromConfig('HelloWorldBundle')`` to retrieve them from the plugin’s configuration file. -.. vale off Modify configuration before saving ---------------------------------- @@ -855,7 +823,6 @@ Register the event subscriber 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. - Config form ===========