You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><p><aclass="reference internal" href="#retrieving-the-current-controller-method-names" id="id74">Retrieving the Current Controller/Method Names</a></p></li>
396
396
<li><p><aclass="reference internal" href="#getting-active-filters-for-the-current-route" id="id75">Getting Active Filters for the Current Route</a></p></li>
397
+
<li><p><aclass="reference internal" href="#getting-matched-route-options-for-the-current-route" id="id76">Getting Matched Route Options for the Current Route</a></p></li>
397
398
</ul>
398
399
</li>
399
400
</ul>
@@ -1747,6 +1748,37 @@ <h3><a class="toc-backref" href="#id75" role="doc-backlink">Getting Active Filte
1747
1748
It does not include global filters or those specified in the <strong>app/Config/Filters.php</strong> file.</p>
<h3><aclass="toc-backref" href="#id76" role="doc-backlink">Getting Matched Route Options for the Current Route</a><aclass="headerlink" href="#getting-matched-route-options-for-the-current-route" title="Permalink to this heading"></a></h3>
1753
+
<p>When we’re defining routes, they may have optional parameters: <codeclass="docutils literal notranslate"><spanclass="pre">filter</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">namespace</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">hostname</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">subdomain</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">offset</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">priority</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">as</span></code>. All of them were described earlier above.
1754
+
Additionally, if we use <codeclass="docutils literal notranslate"><spanclass="pre">addRedirect()</span></code> we can also expect the <codeclass="docutils literal notranslate"><spanclass="pre">redirect</span></code> key.
1755
+
To access the values of these parameters, we can call <codeclass="docutils literal notranslate"><spanclass="pre">Router::getMatchedRouteOptions()</span></code>. Here is an example of the returned array:</p>
0 commit comments