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
Copy file name to clipboardExpand all lines: 16/umbraco-cms/customizing/foundation/context-api/context-api-fundamentals.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The Context API exists to solve common problems in complex user interfaces:
28
28
To understand the Context API, it's important to understand the terminology that is used in the rest of the documentation.
29
29
30
30
### Context
31
-
An object that encapsulates both data and methods to interact with that data. This object can be provided to descending DOM elements. A context represents a specific capability or state that multiple elements might need to access. Examples include workspace context, content data, user permissions, or specialized services. Contexts encapsulate both data and methods, making them more than just data containers. Unlike repositories, a context is always only available within the scope of a certain element and its descendants.
31
+
An object that encapsulates both data and methods to interact with that data. This object can be provided to descending DOM elements. A context represents a specific capability or state that multiple elements might need to access. Examples include workspace context, content data, user permissions, or specialized services. Contexts encapsulate both data and methods, making them more than data containers. Unlike repositories, a context is always only available within the scope of a certain element and its descendants.
32
32
33
33
### Context provider
34
34
An element that creates and makes a context available to its descending elements. The provider is responsible for the context's lifecycle. One element can provide multiple different contexts if needed.
Copy file name to clipboardExpand all lines: 16/umbraco-cms/customizing/foundation/context-api/provide-a-context.md
-9Lines changed: 0 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,9 @@ description: >-
4
4
incorporate central logic.
5
5
---
6
6
7
-
-----
8
-
New structure:
9
-
10
-
Page 3: Creating Contexts
11
-
• How to create contexts
12
-
• How to define your own custom tokens (building on the token knowledge from core concepts)
13
-
-----
14
-
15
7
# Provide a Context
16
8
17
9
## Provide a Context API
18
-
19
10
The recommended approach is to base your Context API on the `UmbContextBase` class, which provides automatic context registration. The following example shows how it's used:
0 commit comments