1
- # Ray Package for Neos CMS
1
+ # Ray Helper for Neos CMS
2
2
3
3
Debug your Neos site with the Ray app.
4
4
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.
13
13
14
14
## Requirements
15
15
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 .
17
17
18
18
## Configuration
19
19
Create the configuration file ` ray.php ` in your Neos site root directory.
20
20
Configuration options: https://spatie.be/docs/ray/v1/configuration/framework-agnostic-php .
21
21
Configuration options when you use Docker: https://spatie.be/docs/ray/v1/environment-specific-configuration/docker .
22
22
23
23
## 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
+
24
53
** Debug a Fusion expression:**
25
54
``` html
26
55
valueToDebug = 'Show this text in the Ray app.'
27
- valueToDebug.@process.debug = Beromir.Ray:Ray
56
+ valueToDebug.@process.debug = Beromir.Ray:Debug
28
57
```
29
58
30
59
Alternative ways:
31
60
``` html
32
61
// Debug the current node
33
- debug = Beromir.Ray:Ray {
34
- debugValues = ${node}
62
+ debug = Beromir.Ray:Debug {
63
+ value = ${node}
35
64
}
36
65
37
66
renderer = afx`
@@ -41,27 +70,27 @@ renderer = afx`
41
70
42
71
``` html
43
72
renderer = afx`
44
- <Beromir .Ray:Ray debugValues ={node}/ >
73
+ <Beromir .Ray:Debug value ={node}/ >
45
74
`
46
75
```
47
76
48
77
** Debug multiple values:**
49
78
``` html
50
- debug = Beromir.Ray:Ray {
79
+ debug = Beromir.Ray:Debug {
51
80
// Pass the values as an array
52
- debugValues = ${[node, site]}
81
+ value = ${[node, site]}
53
82
}
54
83
55
84
renderer = afx`
56
85
{props.debug}
57
86
`
58
87
```
59
88
60
- ** Use Debug Actions:**
89
+ ** Use Debug Actions to debug NodeTypes :**
61
90
``` html
62
91
// Display the NodeType name of the node
63
- debug = Beromir.Ray:Ray {
64
- debugValues = ${node}
92
+ debug = Beromir.Ray:Debug {
93
+ value = ${node}
65
94
debugAction = 'nodeTypeName'
66
95
}
67
96
@@ -72,8 +101,8 @@ renderer = afx`
72
101
73
102
``` html
74
103
// 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]}
77
106
debugAction = 'properties'
78
107
}
79
108
@@ -82,12 +111,10 @@ renderer = afx`
82
111
`
83
112
```
84
113
85
- You can use the following Debug Actions:
114
+ You can use the following Debug Actions for NodeTypes :
86
115
87
116
| Debug Action| Description |
88
117
| --- | --- |
89
- | ` phpInfo ` | Display PHP info |
90
- | ` backtrace ` | Display entire backtrace |
91
118
| ` nodeTypeName ` | Display the NodeType name of a node |
92
119
| ` context ` | Display the context of a node |
93
120
| ` contextPath ` | Display the context path of a node |
0 commit comments