diff --git a/docs/plugin_services/parameters.rst b/docs/plugin_services/parameters.rst index f312d560..4a26d819 100644 --- a/docs/plugin_services/parameters.rst +++ b/docs/plugin_services/parameters.rst @@ -1,14 +1,24 @@ Config parameters ################# -.. vale off +Use ``Mautic\CoreBundle\Helper\CoreParametersHelper`` to read Mautic's configuration parameters, including any your Plugin declares. Inject the helper into your service: -.. note:: +.. code-block:: php - The content for this page requires a major update. The legacy page contains outdated and potentially inaccurate information. You can still access it in the :xref:`legacy repository`. + coreParametersHelper->get('helloworld_api_enabled', false); + } + } + +Call ``get(string $name, $default = null)`` to read a single parameter with a fallback value. ``CoreParametersHelper`` also provides ``has()`` to confirm whether a parameter exists and ``all()`` to return every parameter.