GlobalsVariable
- Type
- Class
- Namespace
- Craft
- Inherits
- Craft\GlobalsVariable
- Since
- 1.0
Globals functions.
See also http://craftcms.com
View source (opens new window)
# 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.
View source (opens new window)
Arguments
$indexBy
(string (opens new window), null (opens new window))
Returns
Signature
public array getAllSets ( $indexBy = null )
# getEditableSets()
Returns all global sets that are editable by the current user.
View source (opens new window)
Arguments
$indexBy
(string (opens new window), null (opens new window))$localeId
(string (opens new window), null (opens new window))
Returns
Signature
public array getEditableSets ( $indexBy = null, $localeId = null )
# getSetByHandle()
Returns a global set by its handle.
View source (opens new window)
Arguments
$globalSetHandle
(string (opens new window))$localeId
(string (opens new window), null (opens new window))
Returns
Signature
public Craft\GlobalSetModel, null getSetByHandle ( $globalSetHandle, $localeId = null )
# getSetById()
Returns a global set by its ID.
View source (opens new window)
Arguments
$globalSetId
(integer (opens new window))$localeId
(string (opens new window), null (opens new window))
Returns
Signature
public Craft\GlobalSetModel, null getSetById ( $globalSetId, $localeId = null )
# getTotalEditableSets()
Returns the total number of global sets that are editable by the current user.
View source (opens new window)
Returns
Signature
public integer getTotalEditableSets ( )
# getTotalSets()
Signature
public integer getTotalSets ( )