CraftVariable

Type
Class
Namespace
Craft
Inherits
Craft\CraftVariable
Since
1.0

Contains all global variables.

See also http://craftcms.com

View source (opens new window)

# Public Methods

# __get()

Signature

public mixed __get ( $name )

# __isset()

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 (opens new window)

Arguments

  • $packageName

Returns

boolean (opens new window)

Signature

public boolean hasPackage ( $packageName )

# i18n()

Signature

public Craft\LocalizationVariable i18n ( )

# isLocalized()

Returns whether this site has multiple locales.

View source (opens new window)

Returns

boolean (opens new window)

Signature

public boolean isLocalized ( )

# locale()

Gets the current language in use.

View source (opens new window)

Returns

string (opens new window)

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 )