Skip to content

Commit 7bf481a

Browse files
committed
Add docs for helper method
1 parent 07f895e commit 7bf481a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

user_guide_src/source/general/context.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The Context class is particularly useful for:
2727
Accessing Context Class
2828
***********************
2929

30-
You can access the Context service anywhere in your application using the ``service()`` function:
30+
You can access the Context service anywhere in your application using the ``service()`` function or ``context()`` helper:
3131

3232
.. literalinclude:: context/001.php
3333

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
<?php
22

33
$context = service('context');
4+
5+
// Or
6+
$context = context();

0 commit comments

Comments
 (0)