Skip to content

Commit

Permalink
Add docs for cakephp/cakephp#17750
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 25, 2024
1 parent 9556f21 commit c0d6d81
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions en/appendices/5-1-migration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,5 @@ Helpers
* ``stripProtocol``: Strips ``http://`` and ``https://`` from the beginning of the link. Default off.
* ``maxLength``: The maximum length of the link label. Default off.
* ``ellipsis``: The string to append to the end of the link label. Defaults to UTF8 version.
- ``HtmlHelper::meta()`` can now create a meta tag containing the current CSRF
token using ``meta('csrfToken')``.
20 changes: 12 additions & 8 deletions en/views/helpers/html.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,15 @@ key in the $attributes parameter to ``true``, ie - ``['block' => true]``.
If you set the "type" attribute using the $attributes parameter,
CakePHP contains a few shortcuts:

======== ======================
type translated value
======== ======================
html text/html
rss application/rss+xml
atom application/atom+xml
icon image/x-icon
======== ======================
========= ======================
type translated value
========= ======================
html text/html
rss application/rss+xml
atom application/atom+xml
icon image/x-icon
csrfToken The current CSRF token
========= ======================

.. code-block:: php
Expand Down Expand Up @@ -215,6 +216,9 @@ In addition to making predefined meta tags, you can create link elements::
Any attributes provided to meta() when called this way will be added to the
generated link tag.

.. versionchanged:: 5.1.0
The ``csrfToken`` type was added.

Linking to Images
-----------------

Expand Down

0 comments on commit c0d6d81

Please sign in to comment.