Skip to content

Commit 9a2e1c4

Browse files
committed
remove all vale statements and excess empty lines
1 parent 3cab1ae commit 9a2e1c4

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

docs/plugins/config.rst

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@ Mautic recognizes the Plugin through the general config options.
4343
Routing config items
4444
********************
4545

46-
.. vale off
47-
4846
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<plugins/config:Routing firewalls>` with a uniquely identifying key and the :ref:`route's definition<plugins/config:Route definitions>`.
4947

50-
.. vale on
51-
5248
.. code-block:: php
5349
5450
<?php
@@ -325,8 +321,6 @@ Menu item definitions
325321

326322
Define items in an ``items`` array along with ``priority`` or at the root of the menu's array.
327323

328-
.. vale off
329-
330324
Key each item with its respective :ref:`language string key<plugins/translations:Translating plugins>`.
331325

332326
.. list-table::
@@ -370,8 +364,6 @@ Key each item with its respective :ref:`language string key<plugins/translations
370364
- string
371365
- Font Awesome class to set the icon for the menu item.
372366

373-
.. vale on
374-
375367
Menu item checks
376368
----------------
377369

@@ -427,12 +419,8 @@ Supported checks are ``parameters``, ``request``, and ``integration``.
427419
428420
// ...
429421
430-
.. vale off
431-
432422
Of course, you can also combine multiple checks. All must evaluate to TRUE to display the item.
433423

434-
.. vale on
435-
436424
.. code-block:: php
437425
438426
<?php
@@ -504,8 +492,6 @@ Service types
504492

505493
For convenience, Mautic auto-tags services defined within specific keys.
506494

507-
.. vale off
508-
509495
.. list-table::
510496
:header-rows: 1
511497
:widths: 15 15 50
@@ -535,15 +521,11 @@ For convenience, Mautic auto-tags services defined within specific keys.
535521
- n/a
536522
- You can use any other key you want to organize services in the config array. Note that this could risk incompatibility with a future version of Mautic if using something generic that Mautic starts to use as well.
537523

538-
.. vale on
539-
540524
Service definitions
541525
===================
542526

543527
Key each service with a unique name to all of Mautic, including other Plugins.
544528

545-
.. vale off
546-
547529
.. list-table::
548530
:header-rows: 1
549531
:widths: 25 17 15 50
@@ -621,8 +603,6 @@ Key each service with a unique name to all of Mautic, including other Plugins.
621603
- boolean
622604
- Define the service with lazy loading. Symfony ignores this until Mautic addresses https://forum.mautic.org/t/supporty-symfony-lazy-services/21923.
623605

624-
.. vale on
625-
626606
Mautic service tags
627607
-------------------
628608

@@ -707,7 +687,6 @@ Use ``categories`` to define Category types available to the Category manager. S
707687
708688
// ...
709689
710-
711690
Parameters config items
712691
***********************
713692

@@ -726,21 +705,17 @@ Configure parameters that are consumable through Mautic's ``CoreParameterHelper`
726705
727706
// ...
728707
729-
730708
.. 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``.
731709

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

734-
735712
Custom config parameters
736713
************************
737714

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

740717
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.
741718

742-
.. vale off
743-
744719
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.
745720

746721
To add these configuration options in Mautic's configuration section, you’ll need:
@@ -749,19 +724,13 @@ To add these configuration options in Mautic's configuration section, you’ll n
749724
- A :doc:`Form type </components/forms>` that defines the fields.
750725
- A specific view for rendering the form.
751726

752-
.. vale on
753-
754727
.. note::
755728

756729
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.
757730

758-
.. vale off
759-
760731
Config event subscriber
761732
=======================
762733

763-
.. vale on
764-
765734
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``.
766735

767736
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
843812
- The view that formats the configuration form elements, for example, ``HelloWorldBundle:FormTheme\Config``.
844813
* - ``parameters``
845814
- An array of custom configuration elements. ``Use $event->getParametersFromConfig('HelloWorldBundle')`` to retrieve them from the plugin’s configuration file.
846-
.. vale off
847815

848816
Modify configuration before saving
849817
----------------------------------
@@ -855,7 +823,6 @@ Register the event subscriber
855823

856824
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.
857825

858-
859826
Config form
860827
===========
861828

0 commit comments

Comments
 (0)