Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 814e5bd

Browse filesBrowse files
committed
[#7946] fix PHP parameter config example
1 parent af141a2 commit 814e5bd
Copy full SHA for 814e5bd

File tree

1 file changed

+5
-3
lines changed
Filter options

1 file changed

+5
-3
lines changed

‎form/create_custom_field_type.rst

Copy file name to clipboardExpand all lines: form/create_custom_field_type.rst
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,11 @@ example, suppose that you're storing the shipping parameters in configuration:
313313
.. code-block:: php
314314
315315
// app/config/config.php
316-
$container->setParameter('shipping_options.standard', 'Standard Shipping');
317-
$container->setParameter('shipping_options.expedited', 'Expedited Shipping');
318-
$container->setParameter('shipping_options.priority', 'Priority Shipping');
316+
$container->setParameter('shipping_options', array(
317+
'standard' => 'Standard Shipping',
318+
'expedited' => 'Expedited Shipping',
319+
'priority' => 'Priority Shipping',
320+
));
319321
320322
To use the parameter, define your custom field type as a service, injecting the
321323
``shipping_options`` parameter value as the first argument to its to-be-created

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.