Skip to content

Commit 96e677c

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 87d363a + df466fd commit 96e677c

File tree

1 file changed

+43
-16
lines changed

1 file changed

+43
-16
lines changed

README.md

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Ray Package for Neos CMS
1+
# Ray Helper for Neos CMS
22

33
Debug your Neos site with the Ray app.
44
Ray is a debugger app from Spatie. You can find more information about Ray on https://myray.app/.
@@ -13,25 +13,54 @@ Then run `composer update` in your project root.
1313

1414
## Requirements
1515
You need to have the Ray app installed and a valid license.
16-
You can download the app here: https://myray.app.
16+
You can download the app here: https://spatie.be/docs/ray/v1/the-ray-desktop-app/download-the-free-demo.
1717

1818
## Configuration
1919
Create the configuration file `ray.php` in your Neos site root directory.
2020
Configuration options: https://spatie.be/docs/ray/v1/configuration/framework-agnostic-php.
2121
Configuration options when you use Docker: https://spatie.be/docs/ray/v1/environment-specific-configuration/docker.
2222

2323
## Usage
24+
You can use all Ray functions from https://spatie.be/docs/ray/v1/usage/framework-agnostic-php-project.
25+
Reference list (just the PHP specific functions): https://spatie.be/docs/ray/v1/usage/reference.
26+
27+
To use the functions, you must add them as key-value pairs in Fusion.
28+
If the function does not require any parameters, you can use `null`, `false` or an empty string as the value.
29+
To pass parameters, add them as a value.
30+
31+
```html
32+
valueToDebug = 'Show this text in the Ray app.'
33+
valueToDebug.@process.debug = Beromir.Ray:Debug {
34+
// Show a label in the Ray app
35+
label = 'Text'
36+
// Colorize the output
37+
red = ''
38+
// Show the output as large text
39+
large = ''
40+
}
41+
```
42+
43+
```html
44+
valueToDebug = 'Show this text in the Ray app.'
45+
valueToDebug.@process.debug = Beromir.Ray:Debug {
46+
// Show a label in the Ray app
47+
label = 'Text'
48+
// Only send a payload once when in a loop
49+
once = ${node}
50+
}
51+
```
52+
2453
**Debug a Fusion expression:**
2554
```html
2655
valueToDebug = 'Show this text in the Ray app.'
27-
valueToDebug.@process.debug = Beromir.Ray:Ray
56+
valueToDebug.@process.debug = Beromir.Ray:Debug
2857
```
2958

3059
Alternative ways:
3160
```html
3261
// Debug the current node
33-
debug = Beromir.Ray:Ray {
34-
debugValues = ${node}
62+
debug = Beromir.Ray:Debug {
63+
value = ${node}
3564
}
3665

3766
renderer = afx`
@@ -41,27 +70,27 @@ renderer = afx`
4170

4271
```html
4372
renderer = afx`
44-
<Beromir.Ray:Ray debugValues={node}/>
73+
<Beromir.Ray:Debug value={node}/>
4574
`
4675
```
4776

4877
**Debug multiple values:**
4978
```html
50-
debug = Beromir.Ray:Ray {
79+
debug = Beromir.Ray:Debug {
5180
// Pass the values as an array
52-
debugValues = ${[node, site]}
81+
value = ${[node, site]}
5382
}
5483

5584
renderer = afx`
5685
{props.debug}
5786
`
5887
```
5988

60-
**Use Debug Actions:**
89+
**Use Debug Actions to debug NodeTypes:**
6190
```html
6291
// Display the NodeType name of the node
63-
debug = Beromir.Ray:Ray {
64-
debugValues = ${node}
92+
debug = Beromir.Ray:Debug {
93+
value = ${node}
6594
debugAction = 'nodeTypeName'
6695
}
6796

@@ -72,8 +101,8 @@ renderer = afx`
72101

73102
```html
74103
// Display the properties of the current node and the site node
75-
debug = Beromir.Ray:Ray {
76-
debugValues = ${[node, site]}
104+
debug = Beromir.Ray:Debug {
105+
value = ${[node, site]}
77106
debugAction = 'properties'
78107
}
79108

@@ -82,12 +111,10 @@ renderer = afx`
82111
`
83112
```
84113

85-
You can use the following Debug Actions:
114+
You can use the following Debug Actions for NodeTypes:
86115

87116
| Debug Action| Description |
88117
| --- | --- |
89-
| `phpInfo` | Display PHP info |
90-
| `backtrace` | Display entire backtrace |
91118
| `nodeTypeName` | Display the NodeType name of a node |
92119
| `context` | Display the context of a node |
93120
| `contextPath` | Display the context path of a node |

0 commit comments

Comments
 (0)