CraftVariable

Type
Class
Namespace
Craft
Inherits
Craft\CraftVariable
Since
1.0

Contains all global variables.

See also http://craftcms.com

View source

Public Methods

__get()

View source

Arguments

Returns

mixed

Signature

public mixed __get ( $name )

__isset()

View source

Arguments

Returns

boolean

Signature

public boolean __isset ( $name )

app()

Signature

public Craft\AppVariable app ( )

assets()

Signature

public Craft\ElementCriteriaModel assets ( $criteria = null )

categories()

Signature

public Craft\ElementCriteriaModel categories ( $criteria = null )

categoryGroups()

Signature

public Craft\CategoryGroupsVariable categoryGroups ( )

config()

Signature

public Craft\ConfigVariable config ( )

cp()

Signature

public Craft\CpVariable cp ( )

deprecator()

Signature

public Craft\DeprecatorVariable deprecator ( )

elementIndexes()

Signature

public Craft\ElementIndexesVariable elementIndexes ( )

elements()

Signature

public Craft\ElementsVariable elements ( )

emailMessages()

Signature

public Craft\EmailMessagesVariable emailMessages ( )

entries()

Signature

public Craft\ElementCriteriaModel entries ( $criteria = null )

entryRevisions()

Signature

public Craft\EntryRevisionsVariable entryRevisions ( )

feeds()

Signature

public Craft\FeedsVariable feeds ( )

fields()

Signature

public Craft\FieldsVariable fields ( )

globals()

Signature

public Craft\GlobalsVariable globals ( )

hasPackage()

DEPRECATED

Deprecated Deprecated in 2.0.

Returns whether a package is included in the Craft build.

View source

Arguments

  • $packageName

Returns

boolean

Signature

public boolean hasPackage ( $packageName )

i18n()

Signature

public Craft\LocalizationVariable i18n ( )

isLocalized()

Returns whether this site has multiple locales.

View source

Returns

boolean

Signature

public boolean isLocalized ( )

locale()

Gets the current language in use.

View source

Returns

string

Signature

public string locale ( )

plugins()

Signature

public Craft\PluginsVariable plugins ( )

rebrand()

Signature

public Craft\RebrandVariable rebrand ( )

request()

Signature

public Craft\HttpRequestVariable request ( )

routes()

Signature

public Craft\RoutesVariable routes ( )

sections()

Signature

public Craft\SectionsVariable sections ( )

session()

Signature

public Craft\UserSessionVariable session ( )

systemSettings()

Signature

public Craft\SystemSettingsVariable systemSettings ( )

tags()

Signature

public Craft\ElementCriteriaModel tags ( $criteria = null )

tasks()

Signature

public Craft\TasksVariable tasks ( )

updates()

Signature

public Craft\UpdatesVariable updates ( )

userGroups()

Signature

public Craft\UserGroupsVariable, null userGroups ( )

userPermissions()

Signature

public Craft\UserPermissionsVariable, null userPermissions ( )

users()

Signature

public Craft\ElementCriteriaModel, null users ( $criteria = null )