Skip to content

Commit 343d1e0

Browse files
committed
Merge branch '5.1' into 5.2
* 5.1: Fixing function name Shortening the text some more Shortening the text and adding link to jQuery Replace link to getConfiguration method Add Firebase notifier to documentation
2 parents 09ab76b + c4f7169 commit 343d1e0

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

bundles/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ As long as your bundle's configuration is located in the standard location
330330
(``YourBundle\DependencyInjection\Configuration``) and does not have
331331
a constructor it will work automatically. If you
332332
have something different, your ``Extension`` class must override the
333-
:method:`Extension::getConfiguration() <Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension::getConfiguration>`
333+
:method:`Extension::getConfiguration() <Symfony\\Component\\DependencyInjection\\Extension\\Extension::getConfiguration>`
334334
method and return an instance of your ``Configuration``.
335335

336336
Supporting XML

form/form_collections.rst

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ the following ``data-prototype`` attribute to the existing ``<ul>`` in your temp
245245

246246
<ul class="tags" data-prototype="{{ form_widget(form.tags.vars.prototype)|e('html_attr') }}"></ul>
247247

248-
Now add a button just next to the ``<ul>`` to dynamically add a new tag
248+
Now add a button just next to the ``<ul>`` to dynamically add a new tag:
249249

250250
.. code-block:: html+twig
251251

@@ -280,13 +280,13 @@ On the rendered page, the result will look something like this:
280280
the ``data-prototype`` attribute is automatically added to the containing ``div``,
281281
and you need to adjust the following JavaScript accordingly.
282282

283-
The goal of this section will be to use JavaScript to read this attribute
284-
and dynamically add new tag forms when the user clicks the "Add a tag" button.
285-
This example uses jQuery and assumes you have it included somewhere on your page.
283+
Now add some JavaScript to read this attribute and dynamically add new tag forms
284+
when the user clicks the "Add a tag" link. This example uses `jQuery`_ and
285+
assumes you have it included somewhere on your page (e.g. using Symfony's
286+
:doc:`Webpack Encore </frontend>`).
286287

287-
Add a ``script`` tag somewhere on your page so you can start writing some
288-
JavaScript. In this script, bind to the "click" event of the "Add a tag"
289-
button so you can add a new tag form (``addFormToCollection()`` will be show next):
288+
Add a ``<script>`` tag somewhere on your page to include the required
289+
functionality with JavaScript:
290290

291291
.. code-block:: javascript
292292
@@ -304,14 +304,11 @@ button so you can add a new tag form (``addFormToCollection()`` will be show nex
304304
})
305305
});
306306
307-
The ``addTagForm()`` function's job will be to use the ``data-prototype`` attribute
308-
to dynamically add a new form when this link is clicked. The ``data-prototype``
309-
HTML contains the tag ``text`` input element with a name of ``task[tags][__name__][name]``
310-
and id of ``task_tags___name___name``. The ``__name__`` is a little "placeholder",
311-
which you'll replace with a unique, incrementing number (e.g. ``task[tags][3][name]``).
312-
313-
The actual code needed to make this all work can vary quite a bit, but here's
314-
one example:
307+
The ``addFormToCollection()`` function's job will be to use the ``data-prototype``
308+
attribute to dynamically add a new form when this link is clicked. The ``data-prototype``
309+
HTML contains the tag's ``text`` input element with a name of ``task[tags][__name__][name]``
310+
and id of ``task_tags___name___name``. The ``__name__`` is a placeholder, which
311+
you'll replace with a unique, incrementing number (e.g. ``task[tags][3][name]``):
315312

316313
.. code-block:: javascript
317314
@@ -344,11 +341,6 @@ one example:
344341
$collectionHolder.append($newFormLi)
345342
}
346343
347-
.. note::
348-
349-
It is better to separate your JavaScript in real JavaScript files than
350-
to write it inside the HTML as is done here.
351-
352344
Now, each time a user clicks the ``Add a tag`` link, a new sub form will
353345
appear on the page. When the form is submitted, any new tag forms will be converted
354346
into new ``Tag`` objects and added to the ``tags`` property of the ``Task`` object.
@@ -572,7 +564,7 @@ First, add a "delete this tag" link to each tag form:
572564
// ... the rest of the block from above
573565
});
574566
575-
function addTagForm() {
567+
function addFormToCollection() {
576568
// ...
577569
578570
// add a delete link to the new form
@@ -684,6 +676,7 @@ the relationship between the removed ``Tag`` and ``Task`` object.
684676
the `symfony-collection`_ package based on jQuery for the rest of browsers.
685677

686678
.. _`Owning Side and Inverse Side`: https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/unitofwork-associations.html
679+
.. _`jQuery`: http://jquery.com/
687680
.. _`JSFiddle`: http://jsfiddle.net/847Kf/4/
688681
.. _`@a2lix/symfony-collection`: https://github.com/a2lix/symfony-collection
689682
.. _`symfony-collection`: https://github.com/ninsuo/symfony-collection

notifier.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ integration with these chat services:
141141
Service Package DSN
142142
========== ================================ ===========================================================================
143143
Discord ``symfony/discord-notifier`` ``discord://TOKEN@default?webhook_id=ID``
144+
Firebase ``symfony/firebase-notifier`` ``firebase://USERNAME:PASSWORD@default``
144145
GoogleChat ``symfony/google-chat-notifier`` ``googlechat://ACCESS_KEY:ACCESS_TOKEN@default/SPACE?threadKey=THREAD_KEY``
145146
LinkedIn ``symfony/linked-in-notifier`` ``linkedin://TOKEN:USER_ID@default``
146147
Mattermost ``symfony/mattermost-notifier`` ``mattermost://ACCESS_TOKEN@HOST/PATH?channel=CHANNEL``
@@ -152,7 +153,9 @@ Zulip ``symfony/zulip-notifier`` ``zulip://EMAIL:TOKEN@HOST?channel
152153

153154
.. versionadded:: 5.1
154155

155-
The Mattermost and RocketChat integrations were introduced in Symfony 5.1.
156+
The Firebase, Mattermost and RocketChat integrations were introduced in Symfony
157+
5.1. The Slack DSN changed in Symfony 5.1 to use Slack Incoming
158+
Webhooks instead of legacy tokens.
156159

157160
.. versionadded:: 5.2
158161

0 commit comments

Comments
 (0)