Globals ​
- Type
- Class
- Namespace
- craft\web\twig\variables
- Inherits
- craft\web\twig\variables\Globals
- Since
- 3.0.0
- Deprecated in
- in 3.0.0
Globals functions.
Public Methods ​
| Method | Description |
|---|---|
| getAllSets() | Returns all global sets. |
| getEditableSets() | Returns all global sets that are editable by the current user. |
| getSetByHandle() | Returns a global set by its handle. |
| getSetById() | Returns a global set by its ID. |
| getTotalEditableSets() | Returns the total number of global sets that are editable by the current user. |
| getTotalSets() | Returns the total number of global sets. |
getAllSets() ​
Returns all global sets.
Arguments ​
Returns ​
getEditableSets() ​
Returns all global sets that are editable by the current user.
Arguments ​
Returns ​
getSetByHandle() ​
Returns a global set by its handle.
Arguments ​
Returns ​
craft\elements\GlobalSet, null
Throws ​
- yii\base\Exception
if|null $siteHandle is invalid
getSetById() ​
Returns a global set by its ID.
Arguments ​
Returns ​
craft\elements\GlobalSet, null
Throws ​
- yii\base\Exception
if|null $siteHandle is invlaid
getTotalEditableSets() ​
Returns the total number of global sets that are editable by the current user.
Returns ​
getTotalSets() ​
Returns the total number of global sets.