Skip to content
Grav Documentation

Grav API

Table of contents

Iterates individual words of DOM text and CDATA nodes while keeping track of their position in the document. Example: $doc = new DOMDocument(); $doc->load('example.xml'); foreach(new DOMWordsIterator($doc) as $word) echo $word;

Visibility Function
public __construct(\DOMNode $el) : void
expects DOMElement or DOMDocument (see DOMDocument::load and DOMDocument::loadHTML)
public current() : string/null
Return the current element
public currentElement() : \DOMElement/null
Returns DOMElement that is currently being iterated or NULL if iterator has finished.
public currentWordPosition() : array
Returns position in text as DOMText node and character offset. (it's NOT a byte offset, you must use mb_substr() or similar to use this offset properly). node may be NULL if iterator has finished.
public key() : int/null
Return the key of the current element
public next() : void
public rewind() : void
public valid() : bool
Checks if current position is valid

This class implements \Iterator, \Traversable


Class: DOMLettersIterator

Iterates individual characters (Unicode codepoints) of DOM text and CDATA nodes while keeping track of their position in the document. Example: $doc = new DOMDocument(); $doc->load('example.xml'); foreach(new DOMLettersIterator($doc) as $letter) echo $letter; NB: If you only need characters without their position in the document, use DOMNode->textContent instead.

Visibility Function
public __construct(\DOMNode $el) : void
expects DOMElement or DOMDocument (see DOMDocument::load and DOMDocument::loadHTML)
public current() : string/null
Return the current element
public currentElement() : \DOMElement/null
Returns DOMElement that is currently being iterated or NULL if iterator has finished.
public currentTextPosition() : array
Returns position in text as DOMText node and character offset. (it's NOT a byte offset, you must use mb_substr() or similar to use this offset properly). node may be NULL if iterator has finished.
public key() : int/null
public next() : void
public rewind() : void
public valid() : bool
Checks if current position is valid

This class implements \Iterator, \Traversable


Class: \Doctrine\Common\Cache\FilesystemCache

Filesystem cache driver (backwards compatibility).

Visibility Function
public __construct(string $directory, string $extension='.doctrinecache.data', int $umask=2) : void

This class extends \Grav\Common\Cache\SymfonyCacheProvider

This class implements \Doctrine\Common\Cache\Cache, \Doctrine\Common\Cache\FlushableCache, \Doctrine\Common\Cache\ClearableCache, \Doctrine\Common\Cache\MultiOperationCache, \Doctrine\Common\Cache\MultiPutCache, \Doctrine\Common\Cache\MultiDeleteCache, \Doctrine\Common\Cache\MultiGetCache


Interface: \Doctrine\Common\Cache\MultiPutCache

Interface for cache drivers that allows to put many items at once.

Visibility Function
public saveMultiple(mixed[] $keysAndValues, int $lifetime) : bool TRUE if the operation was successful, FALSE if it wasn't.
Returns a boolean value indicating if the operation succeeded. cache entries (0 => infinite lifeTime).


Interface: \Doctrine\Common\Cache\ClearableCache

Interface for cache that can be flushed. Intended to be used for partial clearing of a cache namespace. For a more global "flushing", see {@see FlushableCache}.

Visibility Function
public deleteAll() : bool TRUE if the cache entries were successfully deleted, FALSE otherwise.
Deletes all cache entries in the current cache namespace.


Interface: \Doctrine\Common\Cache\FlushableCache

Interface for cache that can be flushed.

Visibility Function
public flushAll() : bool TRUE if the cache entries were successfully flushed, FALSE otherwise.
Flushes all cache entries, globally.


Class: \Doctrine\Common\Cache\CacheProvider (abstract)

Base class for cache provider implementations.

Visibility Function
public contains(mixed $id) : void
public delete(mixed $id) : void
public deleteAll() : void
public deleteMultiple(array $keys) : void
public fetch(mixed $id) : mixed
public fetchMultiple(array $keys) : mixed
public flushAll() : void
public getNamespace() : string
Retrieves the namespace that prefixes all cache ids.
public getStats() : mixed
public save(mixed $id, mixed $data, mixed $lifeTime) : void
public saveMultiple(array $keysAndValues, mixed $lifetime) : void
public setNamespace(string $namespace) : void
Sets the namespace to prefix all cache ids with.
protected abstract doContains(string $id) : bool TRUE if a cache entry exists for the given cache id, FALSE otherwise.
Tests if an entry exists in the cache.
protected abstract doDelete(string $id) : bool TRUE if the cache entry was successfully deleted, FALSE otherwise.
Deletes a cache entry.
protected doDeleteMultiple(string[] $keys) : bool TRUE if the operation was successful, FALSE if it wasn't
Default implementation of doDeleteMultiple. Each driver that supports multi-delete should override it.
protected abstract doFetch(string $id) : mixed/false The cached data or FALSE, if no cache entry exists for the given id.
Fetches an entry from the cache.
protected doFetchMultiple(string[] $keys) : mixed[] Array of values retrieved for the given keys.
Default implementation of doFetchMultiple. Each driver that supports multi-get should overwrite it.
protected abstract doFlush() : bool TRUE if the cache entries were successfully flushed, FALSE otherwise.
Flushes all cache entries.
protected abstract doGetStats() : mixed[]/null An associative array with server's statistics if available, NULL otherwise.
Retrieves cached information from the data store.
protected abstract doSave(string $id, string $data, int $lifeTime) : bool TRUE if the entry was successfully stored in the cache, FALSE otherwise.
Puts data into the cache. cache entry (0 => infinite lifeTime).
protected doSaveMultiple(mixed[] $keysAndValues, int $lifetime) : bool TRUE if the operation was successful, FALSE if it wasn't.
Default implementation of doSaveMultiple. Each driver that supports multi-put should override it. cache entries (0 => infinite lifeTime).

This class implements \Doctrine\Common\Cache\Cache, \Doctrine\Common\Cache\FlushableCache, \Doctrine\Common\Cache\ClearableCache, \Doctrine\Common\Cache\MultiOperationCache, \Doctrine\Common\Cache\MultiPutCache, \Doctrine\Common\Cache\MultiDeleteCache, \Doctrine\Common\Cache\MultiGetCache


Interface: \Doctrine\Common\Cache\Cache

Interface for cache drivers.

Visibility Function
public contains(string $id) : bool TRUE if a cache entry exists for the given cache id, FALSE otherwise.
Tests if an entry exists in the cache.
public delete(string $id) : bool TRUE if the cache entry was successfully deleted, FALSE otherwise. Deleting a non-existing entry is considered successful.
Deletes a cache entry.
public fetch(string $id) : mixed The cached data or FALSE, if no cache entry exists for the given id.
Fetches an entry from the cache.
public getStats() : mixed[]/null An associative array with server's statistics if available, NULL otherwise.
Retrieves cached information from the data store.
public save(string $id, mixed $data, int $lifeTime) : bool TRUE if the entry was successfully stored in the cache, FALSE otherwise.
Puts data into the cache. If a cache entry with the given id already exists, its data will be replaced. If zero (the default), the entry never expires (although it may be deleted from the cache to make place for other entries).


Interface: \Doctrine\Common\Cache\MultiGetCache

Interface for cache drivers that allows to get many items at once.

Visibility Function
public fetchMultiple(string[] $keys) : mixed[] Array of retrieved values, indexed by the specified keys. Values that couldn't be retrieved are not contained in this array.
Returns an associative array of values for keys is found in cache.


Interface: \Doctrine\Common\Cache\MultiOperationCache

Interface for cache drivers that supports multiple items manipulation.

Visibility Function

This class implements \Doctrine\Common\Cache\MultiGetCache, \Doctrine\Common\Cache\MultiDeleteCache, \Doctrine\Common\Cache\MultiPutCache


Interface: \Doctrine\Common\Cache\MultiDeleteCache

Interface for cache drivers that allows to delete many items at once.

Visibility Function
public deleteMultiple(string[] $keys) : bool TRUE if the operation was successful, FALSE if it wasn't.
Deletes several cache entries.


Class: \Grav\Common\Taxonomy

The Taxonomy object is a singleton that holds a reference to a 'taxonomy map'. This map is constructed as a multidimensional array. uses the taxonomy defined in the site.yaml file and is built when the page objects are recursed. Basically every time a page is found that has taxonomy references, an entry to the page is stored in the taxonomy map. The map has the following format: [taxonomy_type][taxonomy_value][page_path] For example: [category][blog][path/to/item1] [tag][grav][path/to/item1] [tag][grav][path/to/item2] [tag][dog][path/to/item3]

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Constructor that resets the map
public addTaxonomy(\Grav\Common\Page\Interfaces\PageInterface $page, array/null $page_taxonomy=null) : void
Takes an individual page and processes the taxonomies configured in its header. It then adds those taxonomies to the map
public findTaxonomy(array $taxonomies, string $operator='and') : Collection Collection object set to contain matches found in the taxonomy map
Returns a new Page object with the sub-pages containing all the values set for a particular taxonomy.
public getTaxonomyItemKeys(string $taxonomy) : array keys of this taxonomy
Gets item keys per taxonomy
public iterateTaxonomy(\Grav\Common\Page\Interfaces\PageInterface $page, string $taxonomy, string $key, \Grav\Common\iterable/string $value) : void
Iterate through taxonomy fields Reduces [taxonomy_type] to dot-notation where necessary
public taxonomy(array/null $var=null) : array the taxonomy map
Gets and Sets the taxonomy map


Class: \Grav\Common\Themes

Class Themes

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Themes constructor.
public all() : array
Return list of all theme data with their blueprints.
public configure() : void
Configure and prepare streams for current template.
public current() : string
Return name of the current theme.
public get(string $name) : \Grav\Common\Data/null
Get theme configuration or throw exception if it cannot be found.
public init() : void
public initTheme() : void
public load() : \Grav\Common\Theme
Load current theme.
protected autoloadTheme(string $class) : mixed/false FALSE if unable to load $class; Class name if $class is successfully loaded
Autoload theme classes for inheritance
protected loadConfiguration(string $name, \Grav\Common\Config\Config $config) : void
Load theme configuration.
protected loadLanguages(\Grav\Common\Config\Config $config) : void
Load theme languages. Reads ALL language files from theme stream and merges them.

This class extends \Grav\Common\Iterator

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\Cache

The GravCache object is used throughout Grav to store and retrieve cached data. It uses Symfony cache pools (while exposing the historic Doctrine cache API for backward compatibility) and supports a variety of caching mechanisms. Those include: APCu RedisCache MemCached FileSystem

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Constructor
public static clearCache(string $remove='standard') : array
Helper method to clear all Grav caches
public static clearJob(string $type) : void
Static function to call as a scheduled Job to clear Grav cache
public contains(string $id) : bool true if the cached items exists
Returns a boolean state of whether or not the item exists in the cache based on id key
public delete(string $id) : bool true if the item was deleted successfully
Deletes an item in the cache based on the id
public deleteAll() : bool
Deletes all cache
public fetch(string $id) : mixed/bool returns the cached entry, can be any type, or false if doesn't exist
Gets a cached entry if it exists based on an id. If it does not exist, it returns false
public getCacheAdapter(string/null/string $namespace=null, int/null/int $defaultLifetime=null) : AdapterInterface The cache driver to use
Automatically picks the cache mechanism to use. If you pick one manually it will use that If there is no config option for $driver in the config, or it's set to 'auto', it will pick the best option based on which cache extensions are installed.
public getCacheDriver(\Symfony\Component\Cache\Adapter\AdapterInterface $adapter=null) : CacheProvider The cache driver to use
Automatically picks the cache mechanism to use. If you pick one manually it will use that If there is no config option for $driver in the config, or it's set to 'auto', it will pick the best option based on which cache extensions are installed.
public getCacheStatus() : string
Get cache state
public getDriverName() : string
Returns the current driver name
public getDriverSetting() : string
Returns the current driver setting
public getEnabled() : bool
Returns the current enabled state
public getKey() : string
Getter method to get the cache key
public getLifetime() : int
Retrieve the cache lifetime (in seconds)
public getSimpleCache() : \Psr\SimpleCache\CacheInterface
public init(\Grav\Common\Grav $grav) : void
Initialization that sets a base key and the driver based on configuration settings
public static invalidateCache() : void
public isVolatileDriver(string $setting) : bool
is this driver a volatile driver in that it resides in PHP process memory
public onSchedulerInitialized(\RocketTheme\Toolbox\Event\Event $event) : void
public static purgeJob(bool $echo=false) : string/void
Static function to call as a scheduled Job to purge old Doctrine files
public purgeOldCache() : int
Deletes old cache files based on age
public save(string $id, array/object/int $data, int/null $lifetime=null) : void
Stores a new cached entry.
public setEnabled(bool/int $enabled) : void
Public accessor to set the enabled state of the cache
public setKey(string $key) : void
Setter method to set key (Advanced)
public setLifetime(int $future) : void
Set the cache lifetime programmatically
protected createFilesystemAdapter(string $namespace, int $defaultLifetime) : mixed
protected logCacheFallback(string $from, string $to, string $reason) : void

This class extends \Grav\Common\Getters

This class implements \Countable, \ArrayAccess


Class: \Grav\Common\Session

Class Session

Visibility Function
public __get(string $name) : mixed
Returns session variable.
public __isset(string $name) : bool
Checks if session variable is defined.
public __set(string $name, mixed $value) : void
Sets session variable.
public __unset(string $name) : void
Removes session variable.
public all() : array Attributes
DEPRECATED - 1.5 Use ->getAll() method instead.
public clear() : \Grav\Framework\Session\$this
Free all session variables.
public close() : \Grav\Framework\Session\$this
Force the session to be saved and closed
public getAll() : array
Returns all session variables.
public getFlashCookieObject(string $name) : mixed/null
Return object and remove it from the cookie.
public getFlashObject(string $name) : mixed
Return object and remove it from session.
public getId() : string/null Session ID
Get session ID
public static getInstance() : \Grav\Framework\Session\Session
Get current session instance.
public getIterator() : ArrayIterator Return an ArrayIterator of $_SESSION
Retrieve an external iterator
public getName() : string/null
Get session name
public init() : void
Initialize session. Code in this function has been moved into SessionServiceProvider class.
public static instance() : \Grav\Framework\Session\Session
DEPRECATED - 1.5 Use ->getInstance() method instead.
public invalidate() : \Grav\Framework\Session\$this
Invalidates the current session.
public isStarted() : bool
Checks if the session was started.
public setAutoStart(bool $auto) : \Grav\Common\$this
public setFlashCookieObject(string $name, mixed $object, int $time=60) : \Grav\Common\$this
Store something in cookie temporarily.
public setFlashObject(string $name, mixed $object) : \Grav\Common\$this
Store something in session temporarily.
public setId(string $id) : \Grav\Framework\Session\$this
Set session ID
public setName(string $name) : \Grav\Framework\Session\$this
Set session name
public setOptions(array $options) : void
Sets session.* ini variables.
public start(bool $readonly=false) : \Grav\Framework\Session\$this
Starts the session storage
public started() : bool
DEPRECATED - 1.5 Use ->isStarted() method instead.
protected onBeforeSessionStart() : void
protected onSessionStart() : void

This class extends \Grav\Framework\Session\Session

This class implements \IteratorAggregate, \Traversable, \Grav\Framework\Session\SessionInterface


Class: \Grav\Common\Plugin

Class Plugin

Visibility Function
public __construct(string $name, \Grav\Common\Grav $grav, \Grav\Common\Config/null/\Grav\Common\Config\Config $config=null) : void
Constructor.
public __debugInfo() : array
public config() : array
Get configuration of the plugin.
public getAutoloader() : \Grav\Common\ClassLoader/null
public getBlueprint() : \Grav\Common\Data\Blueprint
Simpler getter for the plugin blueprint
public static getSubscribedEvents() : array
By default assign all methods as listeners using the default priority.
public static inheritedConfigOption(string $plugin, string $var, \Grav\Common\Page\Interfaces\PageInterface $page=null, mixed $default=null) : void
public isAdmin() : bool
Determine if plugin is running under the admin
public isCli() : bool
Determine if plugin is running under the CLI
public offsetExists(string $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(string $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(string $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(string $offset) : void
Unsets an offset.
public static saveConfig(string $name) : bool
Persists to disk the plugin parameters currently stored in the Grav Config object
public setAutoloader(\Grav\Common\ClassLoader/null/\Composer\Autoload\ClassLoader $loader) : void
public setConfig(\Grav\Common\Config\Config $config) : \Grav\Common\$this
protected disable(array $events) : void
protected enable(array $events) : void
protected isPluginActiveAdmin(string $plugin_route) : bool
Determine if this route is in Admin and active for the plugin
protected loadBlueprint() : void
Load blueprints.
protected mergeConfig(\Grav\Common\Page\Interfaces\PageInterface $page, mixed $deep=false, array $params=array(), string $type='plugins') : \Grav\Common\Data\Data
Merge global and page configurations. WARNING: This method modifies page header! plugin settings. merge with the plugin settings.
protected parseLinks(string $content, callable $function, string $internal_regex='(.*)') : string
This function will search a string for markdown links in a specific format. The link value can be optionally compared against via the $internal_regex and operated on by the callback $function provided. format: plugin:myplugin_name

This class implements \Symfony\Component\EventDispatcher\EventSubscriberInterface, \ArrayAccess


Class: \Grav\Common\Theme

Class Theme

Visibility Function
public __construct(\Grav\Common\Grav $grav, \Grav\Common\Config\Config $config, string $name) : void
Constructor.
public config() : array
Get configuration of the plugin.
public static saveConfig(string $name) : bool
Persists to disk the theme parameters currently stored in the Grav Config object
protected loadBlueprint() : void
Load blueprints.

This class extends \Grav\Common\Plugin

This class implements \ArrayAccess, \Symfony\Component\EventDispatcher\EventSubscriberInterface


Class: \Grav\Common\Composer

Class Composer

Visibility Function
public static getComposerExecutor() : string
Return the composer executable file path
public static getComposerLocation() : string
Returns the location of composer.


Class: \Grav\Common\Uri

Class Uri

Visibility Function
public __construct(string/array/null $env=null) : void
Uri constructor.
public __toString() : string
public static addNonce(string $url, string $action, string $nonceParamName='nonce') : string the url with the nonce
Adds the nonce to a URL for a specific action
public base() : string The base of the URI
Return the base of the URI
public baseIncludingLanguage() : string The base of the URI
Return the base relative URL including the language prefix or the base relative url if multi-language is not enabled
public basename() : string The basename of the URI
Return the basename of the URI
public static buildParams(array $params) : string
public static buildUrl(array $parsed_url) : string
The opposite of built-in PHP method parse_url()
public static cleanPath(string $path) : string
Removes extra double slashes and fixes back-slashes
public static convertUrl(\Grav\Common\Page\Interfaces\PageInterface $page, string/array $url, string $type='link', bool $absolute=false, bool $route_only=false) : string/array the more friendly formatted url
Converts links from absolute '/' or relative (../..) to a Grav friendly format
public static convertUrlOld(\Grav\Common\Page\Interfaces\PageInterface $page, string $markdown_url, string $type='link', bool/null $relative=null) : string the more friendly formatted url
Converts links from absolute '/' or relative (../..) to a Grav friendly format
public currentPage() : int
Return current page number.
public environment() : string
Gets the environment name
public extension(string/null $default=null) : string/null The extension of the URI
Return the Extension of the URI
public static extractParams(string $uri, string $delimiter) : array
public static filterPath(string/null $path) : string The RFC 3986 percent-encoded uri path.
Filter Uri path. This method percent-encodes all reserved characters in the provided path string. This method will NOT double-encode characters that are already percent-encoded.
public static filterQuery(string/null $query) : string The percent-encoded query string.
Filters the query string or fragment of a URI.
public static filterUserInfo(string/null $info) : string The percent-encoded user or password string.
Filters the user info string.
public fragment(string/null $fragment=null) : string/null
Gets the Fragment portion of a URI (eg #target)
public static getAllHeaders() : mixed
Compatibility in case getallheaders() is not available on platform
public getContentType(bool $short=true) : null/string
Get content type from request
public static getCurrentRoute() : \Grav\Framework\Route\Route
Returns current route.
public static getCurrentUri() : \Grav\Framework\Uri\Uri
Returns current Uri.
public host() : string/null The host of the URI
Return the host of the URI
public init() : void
Initializes the URI object based on the url set on the object
public initializeWithUrl(string $url='') : \Grav\Common\$this
Initialize the URI class with a url passed via parameter. Used for testing purposes.
public initializeWithUrlAndRootPath(string $url, string $root_path) : \Grav\Common\$this
Initialize the URI class by providing url and root_path arguments
public static ip() : string ip address
Return the IP address of the current user
public static isExternal(string $url) : bool is eternal state
Is this an external URL? if it starts with http then yes, else false
public isValidExtension(string/null $extension) : bool
Check if this is a valid Grav extension
public static isValidUrl(string $url) : bool
Is the passed in URL a valid URL?
public method() : string
public param(string $id, bool/string/false/null $default=false) : string/false/null
Get URI parameter.
public params(string/null $id=null, bool/boolean $array=false) : null/string/array
Return all or a single query parameter as a URI compatible string.
public static paramsRegex() : string
Calculate the parameter regex based on the param_sep setting
public static parseUrl(string $url) : array/false
public password() : string/null
Return password
public path() : string The path of the URI
Return the Path
public paths(int/null $id=null) : string/string[]
Return URI path.
public port(bool $raw=false) : int/null
Return the port number if it can be figured out
public post(string/null $element=null, string/null $filter_type=null) : array/null
Get post from either $_POST or JSON response object By default returns all data, or can return a single item
public query(string/null $id=null, bool $raw=false) : string/array Returns an array if $id = null and $raw = true
Return full query string or a single query attribute.
public referrer(string/null $default=null, string/null $attributes=null, bool $withoutBaseRoute=false) : string
Return relative path to the referrer defaulting to current or given page. You should set the third parameter to true for redirects as long as you came from the same sub-site and language.
public rootUrl(bool $include_host=false) : string
Return root URL to the site.
public route(bool $absolute=false, bool $domain=false) : string
Return route to the current URI. By default route doesn't include base path.
public scheme(bool/bool/null $raw=false) : string The scheme of the URI
Return the scheme of the URI
public setUriProperties(array $data) : \Grav\Common\Uri
Allow overriding of any element (be careful!)
public toArray(bool $full=false) : array
public toOriginalString() : string
public uri(bool $include_root=true) : string
Return the full uri
public url(bool $include_host=false) : string
Return URL.
public user() : string/null
Return user
public validateHostname(string $hostname) : bool
Validate a hostname
protected createFromEnvironment(array $env) : void
protected createFromString(string $url) : mixed
protected hasStandardPort() : bool
Does this Uri use a standard port?
protected reset() : void

This class implements \Stringable


Class: \Grav\Common\Yaml (abstract)

Class Yaml

Visibility Function
public static dump(array $data, int/null $inline=null, int/null $indent=null) : string
public static parse(string $data) : array
protected static init() : void


Class: \Grav\Common\Utils (abstract)

Class Utils

Visibility Function
public static arrayCombine(array $arr1, array $arr2) : array/false
Array combine but supports different array lengths
public static arrayDiffMultidimensional(array $array1, array $array2) : array
Returns an array with the differences between $array1 and $array2
public static arrayFilterRecursive(array $source, callable $fn) : array
Recursively filter an array, filtering values by processing them through the $fn function argument
public static arrayFlatten(array $array) : array
Flatten an array
public static arrayFlattenDotNotation(array $array, string $prepend='') : array
Flatten a multi-dimensional associative array into dot notation
public static arrayIsAssociative(array $arr) : bool
Array is associative or not
public static arrayLower(array $a) : array/false
Lowercase an entire array. Useful when combined with in_array()
public static arrayMergeRecursiveUnique(array $array1, array $array2) : array
Recursive Merge with uniqueness
public static arrayRemoveValue(array $search, string/array $value) : array
Simple function to remove item/s in an array by value
public static arrayToQueryParams(array $array, string $prepend='') : array
Flatten a multi-dimensional associative array into query params.
public static arrayUnflattenDotNotation(array $array, string $separator='.') : array
Opposite of flatten, convert flat dot notation array to multi dimensional array. If any of the parent has a scalar value, all children get ignored: admin.pages=true admin.pages.read=true becomes admin: pages: true
public static basename(string $path, string $suffix='') : string
Unicode-safe version of the PHP basename() function.
public static checkFilename(string $filename) : bool
Returns true if filename is considered safe.
public static contains(string $haystack, string/string[] $needle, bool $case_sensitive=true) : bool
Check if the $haystack string contains the substring $needle
public static convertSize(int $bytes, string $to, int $decimal_places=1) : int Returns only the number of units, not the type letter. Returns if the $to unit type is out of scope.
Convert bytes to the unit specified by the $to parameter.
public static date2timestamp(string $date, string/null $format=null) : int the timestamp
Get the timestamp of a date strtotime argument
public static dateFormats() : array
Return the Grav date formats allowed
public static dateNow(string/null $default_format=null) : string
Get current date/time
public static download(string $file, bool $force_download=true, int $sec, int $bytes=1024, array $options=array()) : void
Provides the ability to download a file to the browser
public static endsWith(string $haystack, string/string[] $needle, bool $case_sensitive=true) : bool
Check if the $haystack string ends with the substring $needle
public static fullPath(string $path) : string
Helper method to find the full path to a file, be it a stream, a relative path, or already a full path
public static functionExists(string $function) : bool
Check whether a function exists. Disabled functions count as non-existing functions, just like in PHP 8+.
public static generateRandomString(int $length=5) : string
Generate a random string of a given length
public static getDotNotation(array $array, string/int/null $key, null $default=null) : mixed
Get a portion of an array (passed by reference) with dot-notation key
public static getExtensionByMime(string $mime, string $default='html') : string
Return the mimetype based on filename extension
public static getExtensions(array $mimetypes) : array
Get all the extensions for an array of mimetypes
public static getExtensionsByMime(string $mime) : string[] List of extensions eg. ['jpg', 'jpe', 'jpeg']
Return all extensions for given mimetype. The first extension is the default one.
public static getMimeByExtension(string $extension, string $default='application/octet-stream') : string
Return the mimetype based on filename extension
public static getMimeByFilename(string $filename, string $default='application/octet-stream') : string
Return the mimetype based on filename
public static getMimeByLocalFile(string $filename, string $default='application/octet-stream') : string/bool
Return the mimetype based on existing local file
public static getMimeTypes(array $extensions) : array
Get all the mimetypes for an array of extensions
public static getNonce(string $action, bool $previousTick=false) : string the nonce
Creates a hashed nonce tied to the passed action. Tied to the current user and time. The nonce for a given action is the same for 12 hours.
public static getPageFormat() : string
Returns the output render format, usually the extension provided in the URL. (e.g. html, json, xml, etc).
public static getPagePathFromToken(string $path, \Grav\Common\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $page=null) : string
Get relative page path based on a token.
public static getPathFromToken(string $path, \Grav\Common\FlexObjectInterface/\Grav\Common\PageInterface/null $object=null) : string
Get relative path based on a token. Path supports following syntaxes:
public static getSubnet(string $ip, int $prefix=64) : string
Find the subnet of an ip with CIDR prefix size
public static getSupportPageTypes(array/null/array $defaults=null) : array
Wrapper to ensure html, htm in the front of the supported page types
public static getUploadLimit() : int
public static isAdminPlugin() : bool
Simple helper method to get whether or not the admin plugin is active
public static isApache() : bool
Utility to determine if the server running PHP is Apache
public static isAssoc(array $array) : bool
public static isDangerousFunction(string/array/\Grav\Common\Closure $name) : bool
public static isFilesystemFunction(string $name) : bool
public static isFunctionDisabled(string $function) : bool
Check whether a function is disabled in the PHP settings
public static isNegative(string $value) : bool
Checks if a value is negative (false)
public static isPositive(string $value) : bool
Checks if a value is positive (true)
public static isWindows() : bool
Utility method to determine if the current OS is Windows
public static matchWildcard(string $wildcard_pattern, string $haystack) : false/int
Function that can match wildcards match_wildcard('foo', $test), // TRUE match_wildcard('bar', $test), // FALSE match_wildcard('bar', $test), // TRUE match_wildcard('blob', $test), // TRUE match_wildcard('a?d', $test), // TRUE match_wildcard('*etc**', $test) // TRUE
public static mb_substr_replace(string $original, string $replacement, int $position, int $length) : string
Multibyte compatible substr_replace
public static mergeObjects(object $obj1, object $obj2) : object
Merge two objects into one.
public static multibyteParseUrl(string $url) : array
Multibyte-safe Parse URL function
public static normalizePath(string $path) : string
Normalize path by processing relative . and .. syntax and merging path
public static parseSize(string/int/float $size) : int
Parse a readable file size and return a value in bytes
public static pathPrefixedByLangCode(string $string) : bool/string Either false or the language
Checks if the passed path contains the language code prefix
public static pathinfo(string $path, int/null/int $flags=null) : array/string
Unicode-safe version of PHP’s pathinfo() function.
public static prettySize(int $bytes, int $precision=2) : string
Return a pretty size based on bytes
public static processMarkdown(string $string, bool $block=true, \Grav\Common\PageInterface/null $page=null) : string
Process a string as markdown
public static replaceFirstOccurrence(string $search, string $replace, string $subject) : string
Utility method to replace only the first occurrence in a string
public static replaceLastOccurrence(string $search, string $replace, string $subject) : string
Utility method to replace only the last occurrence in a string
public static resolve(array $array, string $path, null $default=null) : mixed
DEPRECATED - 1.5 Use ->getDotNotation() method instead.
public static safeTruncate(string $string, int $limit=150) : string
Truncate text by number of characters in a "word-safe" manor.
public static safeTruncateHtml(string $text, int $length=25, string $ellipsis='...') : string
Truncate HTML by number of characters in a "word-safe" manor.
public static setDotNotation(array $array, string/int/null $key, mixed $value, bool $merge=false) : mixed
Set portion of array (passed by reference) for a dot-notation key and set the value
public static simpleTemplate(string $template, array $variables, array $brackets=array()) : string Final string filled with values
Render simple template filling up the variables in it. If value is not defined, leave it as it was.
public static sortArrayByArray(array $array, array $orderArray) : array
Sort a multidimensional array by another array of ordered keys
public static sortArrayByKey(mixed $array, string/int $array_key, int $direction=3, int $sort_flags) : array
Sort an array by a key value in the array
public static startsWith(string $haystack, string/string[] $needle, bool $case_sensitive=true) : bool
Check if the $haystack string starts with the substring $needle
public static substrToString(string $haystack, string $needle, bool $case_sensitive=true) : string
Returns the substring of a string up to a specified needle. if not found, return the whole haystack
public static timezones() : array
Get the formatted timezones list
public static toAscii(string $string) : void
public static truncate(string $string, int $limit=150, bool $up_to_break=false, string $break=' ', string $pad='…') : string
Truncate text by number of characters but can cut off words.
public static truncateHtml(string $text, int $length=100, string $ellipsis='...') : string
Truncate HTML by number of characters. not "word-safe"!
public static uniqueId(int $length=13, array $options=array()) : string
Generates a random string with configurable length, prefix and suffix. Unlike the built-in uniqid(), this string is non-conflicting and safe
public static url(string/object $input, bool $domain=false, bool $fail_gracefully=false) : string/false
Simple helper method to make getting a Grav URL easier
public static verifyNonce(string/string[] $nonce, string $action) : boolean verified or not
Verify the passed nonce for the give action
protected static resolveTokenPath(string $path) : string[]/null
Returns [token, route, path] from '@token/route:/path'. Route and path are optional. If pattern does not match, return null.


Class: \Grav\Common\Browser

Internally uses the PhpUserAgent package https://github.com/donatj/PhpUserAgent

Visibility Function
public __construct() : void
Browser constructor.
public getBrowser() : string the lowercase browser name
Get the current browser identifier Currently detected browsers: Android Browser BlackBerry Browser Camino Kindle / Silk Firefox / Iceweasel Safari Internet Explorer IEMobile Chrome Opera Midori Vivaldi TizenBrowser Lynx Wget Curl
public getLongVersion() : string the browser full version identifier
Get the current full version identifier
public getPlatform() : string the lowercase platform name
Get the current platform identifier Currently detected platforms: Desktop -> Windows -> Linux -> Macintosh -> Chrome OS Mobile -> Android -> iPhone -> iPad / iPod Touch -> Windows Phone OS -> Kindle -> Kindle Fire -> BlackBerry -> Playbook -> Tizen Console -> Nintendo 3DS -> New Nintendo 3DS -> Nintendo Wii -> Nintendo WiiU -> PlayStation 3 -> PlayStation 4 -> PlayStation Vita -> Xbox 360 -> Xbox One
public getVersion() : int the browser major version identifier
Get the current major version identifier
public isHuman() : bool
Determine if the request comes from a human, or from a bot/crawler
public isTrackable() : bool
Determine if “Do Not Track” is set by browser


Class: \Grav\Common\Security

Class Security

Visibility Function
public static cleanDangerousTwig(string $string) : void
public static detectXss(string/null $string, array/null/array $options=null) : string/null Type of XSS vector if the given $string may contain XSS, false otherwise. Copies the code from: https://github.com/symphonycms/xssfilter/blob/master/extension.driver.php#L138
Determine if string potentially has a XSS attack. This simple function does not catch all XSS and it is likely to return false positives because of it tags all potentially dangerous HTML tags and attributes without looking into their content.
public static detectXssFromArray(array $array, string $prefix='', array/null/array $options=null) : array Returns flatten list of potentially dangerous input values, such as 'data.content'.
Detect XSS in an array or strings such as $_POST or $_GET
public static detectXssFromPages(\Grav\Common\Page\Pages $pages, bool $route=true, callable/null/callable $status=null) : array
Detect XSS code in Grav pages
public static detectXssFromSvgFile(string $filepath, array/null/array $options=null) : string/null
public static getXssDefaults() : mixed
public static sanitizeSVG(string $file) : void
Sanitize SVG for XSS code
public static sanitizeSvgString(string $svg) : string
Sanitize SVG string for XSS code


Class: \Grav\Common\Inflector

This file was originally part of the Akelos Framework

Visibility Function
public static camelize(string $word) : string UpperCamelCasedWord
Returns given word as CamelCased Converts a word like "send_email" to "SendEmail". It will remove non alphanumeric character from the word, so "who's online" will be converted to "WhoSOnline"
public static classify(string $table_name) : string SingularClassName
Converts a table name to its class name according to rails naming conventions. Converts "people" to "Person"
public static humanize(string $word, string $uppercase='') : string Human-readable word
Returns a human-readable string from $word Returns a human-readable string from $word, by replacing underscores with a space, and by upper-casing the initial character by default. If you need to uppercase all the words you just have to pass 'all' as a second parameter. instead of just the first one.
public static hyphenize(string $word) : string hyphenized word
Converts a word "into-it-s-hyphenated-version" Convert any "CamelCased" or "ordinary Word" into an "hyphenated-word". This can be really useful for creating friendly URLs.
public static init() : void
public static monthize(int $days) : int
Converts a number of days to a number of months
public static ordinalize(int $number) : string Ordinal representation of given string.
Converts number to its ordinal English form. This method converts 13 to 13th, 2 to 2nd ...
public static pluralize(string $word, int $count=2) : string/false Plural noun
Pluralizes English nouns.
public static singularize(string $word, int $count=1) : string Singular noun.
Singularizes English nouns.
public static tableize(string $class_name) : string plural_table_name
Converts a class name to its table name according to rails naming conventions. Converts "Person" to "people"
public static titleize(string $word, string $uppercase='') : string Text formatted as title
Converts an underscored or CamelCase word into a English sentence. The titleize public function converts text like "WelcomePage", "welcome_page" or "welcome page" to this "Welcome Page". If second parameter is set to 'first' it will only capitalize the first character of the title. first character. Otherwise it will uppercase all the words in the title.
public static underscorize(string $word) : string Underscored word
Converts a word "into_it_s_underscored_version" Convert any "CamelCased" or "ordinary Word" into an "underscored_word". This can be really useful for creating friendly URLs.
public static variablize(string $word) : string Returns a lowerCamelCasedWord
Same as camelize but first char is underscored Converts a word like "send_email" to "sendEmail". It will remove non alphanumeric character from the word, so "who's online" will be converted to "whoSOnline"


Class: \Grav\Common\Iterator

Class Iterator

Visibility Function
public __call(string $key, mixed $args) : mixed
Convert function calls for the existing keys into their values.
public __clone() : void
Clone the iterator.
public __construct(array $items=array()) : void
Constructor to initialize array.
public __get(string $offset) : mixed Asset value
Magic getter method
public __isset(string $offset) : bool True if the value is set
Magic method to determine if the attribute is set
public __serialize() : array
public __set(string/int $offset, mixed $value) : void
Magic setter method
public __toString() : string
Convents iterator to a comma separated list.
public __unserialize(array $data) : void
public __unset(string $offset) : void
Magic method to unset the attribute
public append(array/\Grav\Common\Iterator $items) : \Grav\Common\$this
Append new elements to the list.
public count() : int
Implements Countable interface.
public current() : mixed Can return any type.
Returns the current element.
public filter(callable/null/callable $callback=null) : \Grav\Common\$this
Filter elements from the list filter status
public first() : mixed
Get the first item
public indexOf(mixed $needle) : string/int/false Key if found, otherwise false.
public key() : string/null Returns key on success, or NULL on failure.
Returns the key of the current element.
public last() : mixed
Get the last item
public next() : void
Moves the current position to the next element.
public nth(int $key) : mixed/bool
Return nth item.
public offsetExists(string/int $offset) : bool Returns TRUE on success or FALSE on failure.
Tests if an offset exists.
public offsetGet(string/int $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(string/int/null $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(string/int $offset) : void
Unsets an offset.
public prev() : mixed
Return previous item.
public random(int $num=1) : \Grav\Common\$this
Pick one or more random entries.
public remove(string $key) : void
Remove item from the list.
public reverse() : \Grav\Common\$this
Reverse the Iterator
public rewind() : void
Rewinds back to the first element of the Iterator.
public serialize() : string Returns the string representation of the object.
DEPRECATED - Override __serialize() instead.
public shuffle() : \Grav\Common\$this
Shuffle items.
public slice(int $offset, int/null $length=null) : \Grav\Common\$this
Slice the list.
public sort(callable/null/callable $callback=null, bool $desc=false) : \Grav\Common\$this/array
Sorts elements from the list and returns a copy of the list in the proper order
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public unserialize(string $serialized) : void
DEPRECATED - Override __unserialize() instead.
public valid() : bool Returns TRUE on success or FALSE on failure.
This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid.

This class implements \ArrayAccess, \Iterator, \Countable, \Serializable, \Stringable, \Traversable


Class: \Grav\Common\Getters (abstract)

Class Getters

Visibility Function
public __get(int/string $offset) : mixed Medium value
Magic getter method
public __isset(int/string $offset) : boolean True if the value is set
Magic method to determine if the attribute is set
public __set(int/string $offset, mixed $value) : void
Magic setter method
public __unset(int/string $offset) : void
Magic method to unset the attribute
public count() : int
public offsetExists(int/string $offset) : bool
public offsetGet(int/string $offset) : mixed
public offsetSet(int/string $offset, mixed $value) : void
public offsetUnset(int/string $offset) : void
public toArray() : array
Returns an associative array of object properties.

This class implements \ArrayAccess, \Countable


Class: \Grav\Common\Assets

Class Assets

Visibility Function
public add(string/string[] $asset) : \Grav\Common\$this
Add an asset or a collection of assets. It automatically detects the asset type (JavaScript, CSS or collection). You may add more than one asset passing an array as argument.
public addAsyncJs(string/array $asset, int $priority=10, bool $pipeline=true, string $group='head') : \Grav\Common\Assets
DEPRECATED - Please use dynamic method with ['loading' => 'async'].
public addCss(mixed $asset) : \Grav\Common\$this
Add a CSS asset or a collection of assets.
public addDeferJs(string/array $asset, int $priority=10, bool $pipeline=true, string $group='head') : \Grav\Common\Assets
DEPRECATED - Please use dynamic method with ['loading' => 'defer'].
public addDir(string $directory, string $pattern='/.\.(css|js)$/i') : \Grav\Common\$this
Add all assets matching $pattern within $directory.
public addDirCss(string $directory) : \Grav\Common\$this
Add all CSS assets within $directory
public addDirJs(string $directory) : \Grav\Common\$this
Add all JavaScript assets within $directory
public addInlineCss(mixed $asset) : \Grav\Common\$this
Add an Inline CSS asset or a collection of assets.
public addInlineJs(mixed $asset) : \Grav\Common\$this
Add an Inline JS asset or a collection of assets.
public addInlineJsModule(mixed $asset) : \Grav\Common\$this
Add an Inline JS asset or a collection of assets.
public addJs(mixed $asset) : \Grav\Common\$this
Add a JS asset or a collection of assets.
public addJsModule(mixed $asset) : \Grav\Common\$this
Add a JS asset or a collection of assets.
public addLink(mixed $asset) : \Grav\Common\$this
Add a CSS asset or a collection of assets.
public all(string $group='head', array $attributes=array()) : string
public config(array $config) : \Grav\Common\$this
Set up configuration options. All the class properties except 'js' and 'css' are accepted here. Also, an extra option 'autoload' may be passed containing an array of assets and/or collections that will be automatically added on startup.
public css(string $group='head', array $attributes=array(), bool $include_link=true) : string
Build the CSS link tags.
public exists(string $asset) : bool
Determines if an asset exists as a collection, CSS or JS reference
public getCollections() : array
Return the array of all the registered collections
public getCss(string/null $key=null) : array
Return the array of all the registered CSS assets If a $key is provided, it will try to return only that asset else it will return null
public getJs(string/null $key=null) : array
Return the array of all the registered JS assets If a $key is provided, it will try to return only that asset else it will return null
public getTimestamp(bool $include_join=true) : string/null
Get the timestamp for assets
public init() : void
Initialization called in the Grav lifecycle to initialize the Assets with appropriate configuration
public js(string $group='head', array $attributes=array(), bool $include_js_module=true) : string
Build the JavaScript script tags.
public jsModule(string $group='head', array $attributes=array()) : string
Build the Javascript Modules tags
public link(string $group='head', array $attributes=array()) : string
Build the CSS link tags.
public registerCollection(string $collectionName, array $assets, bool $overwrite=false) : \Grav\Common\$this
Add/replace collection.
public removeCss(string $key) : \Grav\Common\$this
Removes an item from the CSS array if set
public removeJs(string $key) : \Grav\Common\$this
Removes an item from the JS array if set
public render(string $type, string $group='head', array $attributes=array()) : string
public reset() : \Grav\Common\$this
Reset all assets.
public resetCss() : \Grav\Common\$this
Reset CSS assets.
public resetJs() : \Grav\Common\$this
Reset JavaScript assets.
public setCollection(array $collections) : \Grav\Common\$this
Set the array of collections explicitly
public setCss(array $css) : \Grav\Common\$this
Set the whole array of CSS assets
public setCssPipeline(bool $value) : \Grav\Common\$this
Sets the state of CSS Pipeline
public setJs(array $js) : \Grav\Common\$this
Set the whole array of JS assets
public setJsPipeline(bool $value) : \Grav\Common\$this
Sets the state of JS Pipeline
public setTimestamp(string/int $value) : void
Explicitly set's a timestamp for assets
protected addType(string $collection, string $type, string/string[] $asset, array $options) : \Grav\Common\$this
protected createArgumentsFromLegacy(array $args, array $defaults) : array
protected filterAssets(array $assets, string $key, string $value, bool $sort=false) : array/false
protected getBaseType(\Grav\Common\class-string $type) : string
protected isValidType(\Grav\Common\class-string $type) : bool
protected rglob(string $directory, string $pattern, string/null $ltrim=null) : array
Recursively get files matching $pattern within $directory.
protected sortAssets(array $assets) : array
protected splitPipelineAssetsByAttribute(array $assets, string $attribute) : array<int, array{assets: array, attributes: array}>
Split pipeline assets into ordered groups based on the value of a given attribute. This preserves the original order of the assets while ensuring assets that require special handling (such as different loading strategies) are rendered separately.
protected unifyLegacyArguments(array $args, string $type='Grav\Common\Assets\Css') : array

This class extends \Grav\Framework\Object\PropertyObject

This class implements \Stringable, \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable, \ArrayAccess, \Grav\Framework\Object\Interfaces\NestedObjectInterface


Class: \Grav\Common\Assets\BlockAssets

Register block assets into Grav.

Visibility Function
public static registerAssets(\Grav\Framework\ContentBlock\HtmlBlock $block) : void
protected static getRelativeUrl(string $url, bool $pipeline) : string
protected static registerFrameworks(\Grav\Common\Assets $assets, array $list) : void
protected static registerHtml(\Grav\Common\Assets $assets, array $groups) : void
protected static registerLinks(\Grav\Common\Assets $assets, array $groups) : void
protected static registerScripts(\Grav\Common\Assets $assets, array $groups) : void
protected static registerStyles(\Grav\Common\Assets $assets, array $groups) : void


Class Link

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
Css constructor.
public render() : string

This class extends \Grav\Common\Assets\BaseAsset

This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


Class: \Grav\Common\Assets\InlineCss

Class InlineCss

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
InlineCss constructor.
public render() : string

This class extends \Grav\Common\Assets\BaseAsset

This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


Class: \Grav\Common\Assets\Js

Class Js

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
Js constructor.
public render() : string

This class extends \Grav\Common\Assets\BaseAsset

This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


Class: \Grav\Common\Assets\BaseAsset (abstract)

Class BaseAsset

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
BaseAsset constructor.
public getAsset() : string/false
public getRemote() : bool
public init(string/false $asset, array $options) : \Grav\Common\Assets\$this/false
public static integrityHash(string $input) : string
Receive asset location and return the SRI integrity hash
public static isRemoteLink(string $link) : bool
Determine whether a link is local or remote. Understands both "http://" and "https://" as well as protocol agnostic links "//"
public jsonSerialize() : array
Implements JsonSerializable interface.
public abstract render() : string
public setPosition(string $position) : \Grav\Common\Assets\$this
protected buildLocalLink(string $asset) : string/false the final link url to the asset
Build local links including grav asset shortcodes
protected cssRewrite(string $file, string $dir, bool $local) : string
Placeholder for AssetUtilsTrait method
protected gatherLinks(array $assets, int $type=1) : string
Download and concatenate the content of several links.
protected jsRewrite(string $file, string $dir, bool $local) : string
Finds relative JS urls() and rewrites the URL with an absolute one
protected moveImports(string $file) : string the modified file with any @imports at the top of the file
Moves @import statements to the top of the file per the CSS specification
protected renderAttributes() : string
Build an HTML attribute string from an array.
protected renderQueryString(string/null $asset=null) : string
Render Querystring

This class extends \Grav\Framework\Object\PropertyObject

This class implements \Stringable, \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable, \ArrayAccess, \Grav\Framework\Object\Interfaces\NestedObjectInterface


Class: \Grav\Common\Assets\InlineJs

Class InlineJs

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
InlineJs constructor.
public render() : string

This class extends \Grav\Common\Assets\BaseAsset

This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


Class: \Grav\Common\Assets\JsModule

Class Js

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
Js constructor.
public render() : string

This class extends \Grav\Common\Assets\BaseAsset

This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


Class: \Grav\Common\Assets\Pipeline

Class Pipeline

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
Pipeline constructor.
public static isRemoteLink(string $link) : bool
Determine whether a link is local or remote. Understands both "http://" and "https://" as well as protocol agnostic links "//"
public renderCss(array $assets, string $group, array $attributes=array()) : bool/string URL or generated content if available, else false
Minify and concatenate CSS
public renderJs(array $assets, string $group, array $attributes=array(), int $type=2) : array{output: string, failed: array}/string/false Returns array with output and failed assets when minifying, string when not minifying, or false if no assets
Minify and concatenate JS files.
public renderJs_Module(array $assets, string $group, array $attributes=array()) : bool/string URL or generated content if available, else false
Minify and concatenate JS files.
protected cssRewrite(string $file, string $dir, bool $local) : string
Finds relative CSS urls() and rewrites the URL with an absolute one
protected gatherLinks(array $assets, int $type=1) : string
Download and concatenate the content of several links.
protected jsRewrite(string $file, string $dir, bool $local) : string
Finds relative JS urls() and rewrites the URL with an absolute one
protected moveImports(string $file) : string the modified file with any @imports at the top of the file
Moves @import statements to the top of the file per the CSS specification
protected renderAttributes() : string
Build an HTML attribute string from an array.
protected renderQueryString(string/null $asset=null) : string
Render Querystring

This class extends \Grav\Framework\Object\PropertyObject

This class implements \Stringable, \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable, \ArrayAccess, \Grav\Framework\Object\Interfaces\NestedObjectInterface


Class: \Grav\Common\Assets\InlineJsModule

Class InlineJs

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
InlineJs constructor.
public render() : string

This class extends \Grav\Common\Assets\BaseAsset

This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


Class: \Grav\Common\Assets\Css

Class Css

Visibility Function
public __construct(array $elements=array(), string/null/string $key=null) : void
Css constructor.
public render() : string

This class extends \Grav\Common\Assets\BaseAsset

This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


Class: \Grav\Common\Backup\Backups

Class Backups

Visibility Function
public static backup(int $id, callable/null/callable $status=null, string/null/string $environment=null) : string/null
Backup
public static getAvailableBackups(bool $force=false) : array
public getBackupDownloadUrl(string $backup, string $base_url) : string
public getBackupNames() : array
public static getBackupProfiles() : array
public static getPurgeConfig() : array
public static getTotalBackupsSize() : float/int
public init() : void
public onSchedulerInitialized(\RocketTheme\Toolbox\Event\Event $event) : void
public static purge() : void
public setup() : void
protected static convertExclude(string $exclude) : array


Class: \Grav\Common\Cache\SymfonyCacheProvider

Visibility Function
public __construct(\Symfony\Component\Cache\Adapter\AdapterInterface $adapter) : void
public getAdapter() : mixed
Expose the underlying Symfony cache pool for callers needing direct access.
protected doContains(mixed $id) : void
protected doDelete(mixed $id) : void
protected doDeleteMultiple(array $keys) : void
protected doFetch(mixed $id) : void
protected doFetchMultiple(array $keys) : void
protected doFlush() : void
protected doGetStats() : void
protected doSave(mixed $id, mixed $data, mixed $lifeTime) : void
protected doSaveMultiple(array $keysAndValues, mixed $lifetime) : void

This class extends \Doctrine\Common\Cache\CacheProvider

This class implements \Doctrine\Common\Cache\MultiGetCache, \Doctrine\Common\Cache\MultiDeleteCache, \Doctrine\Common\Cache\MultiPutCache, \Doctrine\Common\Cache\MultiOperationCache, \Doctrine\Common\Cache\ClearableCache, \Doctrine\Common\Cache\FlushableCache, \Doctrine\Common\Cache\Cache


Class: \Grav\Common\Config\CompiledLanguages

Class CompiledLanguages

Visibility Function
public __construct(string $cacheFolder, array $files, string $path) : void
CompiledLanguages constructor.
public modified() : void
Function gets called when cached configuration is saved.
protected createObject(array $data=array()) : void
Create configuration object.
protected finalizeObject() : void
Finalize configuration object.
protected loadFile(string $name, string $filename) : void
Load single configuration file and append it to the correct position.

This class extends \Grav\Common\Config\CompiledBase


Class: \Grav\Common\Config\CompiledConfig

Class CompiledConfig

Visibility Function
public __construct(string $cacheFolder, array $files, string $path) : void
CompiledConfig constructor.
public load(bool $withDefaults=false) : mixed
public modified() : void
Function gets called when cached configuration is saved.
public setBlueprints(callable $blueprints) : \Grav\Common\Config\$this
Set blueprints for the configuration.
protected createObject(array $data=array()) : void
Create configuration object.
protected finalizeObject() : void
Finalize configuration object.
protected loadFile(string $name, string $filename) : void
Load single configuration file and append it to the correct position.

This class extends \Grav\Common\Config\CompiledBase


Class: \Grav\Common\Config\Languages

Class Languages

Visibility Function
public checksum(string/null $checksum=null) : string/null
public flattenByLang(string $lang) : array
public mergeRecursive(array $data) : void
public modified(bool/null $modified=null) : bool
public reformat() : void
public timestamp(int/null $timestamp=null) : int
public unflatten(array $array) : array

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


Class: \Grav\Common\Config\Config

Class Config

Visibility Function
public checksum(string/null $checksum=null) : string/null
public debug() : void
public getLanguages() : mixed
DEPRECATED - 1.5 Use Grav::instance()['languages'] instead.
public init() : void
public key() : string
public modified(bool/null $modified=null) : bool
public reload() : \Grav\Common\Config\$this
public timestamp(int/null $timestamp=null) : int

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


Class: \Grav\Common\Config\Setup

Class Setup

Visibility Function
public __construct(\Grav\Common\Config\Container/array $container) : void
public getStreams() : array
Get available streams and their types from the configuration.
public init() : \Grav\Common\Config\$this
public initializeLocator(\RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator $locator) : void
Initialize resource locator by using the configuration.
protected check(\RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator $locator) : void

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


Class: \Grav\Common\Config\ConfigFileFinder

Class ConfigFileFinder

Visibility Function
public getFiles(array $paths, string $pattern='|\.yaml$|', int $levels=-1) : array
Return all locations for all the files with a timestamp.
public listFiles(array $paths, string $pattern='|\.yaml$|', int $levels=-1) : array
Return all paths for all the files with a timestamp.
public locateFile(array $paths, string $name, string $ext='.yaml') : array
Return all existing locations for a single file with a timestamp.
public locateFileInFolder(string $filename, array $folders) : array
Find filename from a list of folders. Note: Only finds the last override.
public locateFiles(array $paths, string $pattern='|\.yaml$|', int $levels=-1) : array
Return all locations for all the files with a timestamp.
public locateInFolders(array $folders, string/null $filename=null) : array
Find filename from a list of folders.
public setBase(string $base) : \Grav\Common\Config\$this
protected detectAll(string $folder, string $pattern, int $levels) : array
Detects all plugins with a configuration file and returns them with last modification time.
protected detectInFolder(string $folder, string/null $lookup=null) : array
Detects all directories with the lookup file and returns them with last modification time.
protected detectRecursive(string $folder, string $pattern, int $levels) : array
Detects all directories with a configuration file and returns them with last modification time.


Class: \Grav\Common\Config\CompiledBlueprints

Class CompiledBlueprints

Visibility Function
public __construct(string $cacheFolder, array $files, string $path) : void
CompiledBlueprints constructor.
public checksum() : bool/string
Returns checksum from the configuration files. You can set $this->checksum = false to disable this check.
protected createObject(array $data=array()) : mixed
Create configuration object.
protected finalizeObject() : void
Finalize configuration object.
protected getState() : array
protected getTypes() : array
Get list of form field types.
protected loadFile(string $name, array $files) : void
Load single configuration file and append it to the correct position.
protected loadFiles() : bool
Load and join all configuration files.

This class extends \Grav\Common\Config\CompiledBase


Class: \Grav\Common\Data\Blueprint

Class Blueprint

Visibility Function
public __clone() : void
Clone blueprint.
public addDynamicHandler(string $name, callable $callable) : void
public static addPropertyRecursive(array $field, string $property, mixed $value) : void
public embed(string $name, mixed $value, string $separator='/', bool $append=false) : \Grav\Common\Data\$this
public extend(\Grav\Common\Data\BlueprintForm/array $extends, bool $append=false) : \Grav\Common\Data\$this
Extend blueprint with another blueprint.
public extra(array $data, string $prefix='') : array
Return data fields that do not exist in blueprints.
public filter(array $data, bool $missingValuesAsNull=false, bool $keepEmptyValues=false) : array
Filter data by using blueprints.
public flattenData(array $data, bool $includeAll=false, string $name='') : array
Flatten data by using blueprints.
public getDefaultValue(string $name) : array/mixed/null
public getDefaults() : array
Get nested structure containing default values defined in the blueprints. Fields without default value are ignored in the list.
public init() : \Grav\Common\Data\$this
Initialize blueprints with its dynamic fields.
public mergeData(array $data1, array $data2, string/null $name=null, string $separator='.') : array
Merge two arrays by using blueprints.
public processForm(array $data, array $toggles=array()) : array
Process data coming from a form.
public schema() : \Grav\Common\Data\BlueprintSchema
Return blueprint data schema.
public setObject(object $object) : void
public setScope(string $scope) : void
public setTypes(array $types) : \Grav\Common\Data\$this
Set default values for field types.
public validate(array $data, array $options=array()) : void
Validate data against blueprints.
protected dynamicConfig(array $field, string $property, array $call) : void
protected dynamicData(array $field, string $property, array $call) : void
protected dynamicScope(array $field, string $property, array $call) : void
protected dynamicSecurity(array $field, string $property, array $call) : void
protected getFiles(string/array $path, string/null $context=null) : array
protected initInternals() : void
Initialize validator.
protected loadFile(string $filename) : array
protected resolveActions(\Grav\Common\Data\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user, array $actions, string $op='and') : bool

This class extends \RocketTheme\Toolbox\Blueprints\BlueprintForm

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \ArrayAccess


Class: \Grav\Common\Data\Blueprints

Class Blueprints

Visibility Function
public __construct(string/string/array $search='blueprints://') : void
public get(string $type) : \Grav\Common\Data\Blueprint
Get blueprint.
public types() : array List of type=>name
Get all available blueprint types.
protected loadFile(string $name) : \Grav\Common\Data\Blueprint
Load blueprint file.


Interface: \Grav\Common\Data\DataInterface

Interface DataInterface

Visibility Function
public blueprints() : \Grav\Common\Data\Blueprint
Return blueprints.
public extra() : array
Get extra items which haven't been defined in blueprints.
public file(\Grav\Common\Data\FileInterface/null/\RocketTheme\Toolbox\File\FileInterface $storage=null) : \RocketTheme\Toolbox\File\FileInterface
Set or get the data storage.
public filter() : \Grav\Common\Data\$this
Filter all items by using blueprints.
public merge(array $data) : mixed
Merge external data.
public save() : void
Save data into the file.
public validate() : \Grav\Common\Data\$this
Validate by blueprints.
public value(string $name, mixed $default=null, string $separator='.') : mixed Value.
Get value by using dot notation for nested arrays/objects.
Examples of DataInterface::value()
TXT
$value = $data->value('this.is.my.nested.variable');


Class: \Grav\Common\Data\ValidationException

Class ValidationException

Visibility Function
public getMessages() : array
public jsonSerialize() : void
public setMessages(array $messages=array()) : \Grav\Common\Data\$this
public setSimpleMessage(bool $escape=true) : void

This class extends \RuntimeException

This class implements \Throwable, \Stringable, \JsonSerializable


Class: \Grav\Common\Data\Data

Class Data

Visibility Function
public __construct(array $items=array(), \Grav\Common\Data\Blueprint/callable/null $blueprints=null) : void
public __get(string $offset) : mixed Asset value
Magic getter method
public __isset(string $offset) : bool True if the value is set
Magic method to determine if the attribute is set
public __set(string $offset, mixed $value) : void
Magic setter method
public __unset(string $offset) : void
Magic method to unset the attribute
public blueprints() : \Grav\Common\Data\Blueprint
Return blueprints.
public count() : int
Implements Countable interface.
public def(string $name, mixed $default=null, string/null $separator=null) : \Grav\Common\Data\$this
Set default value by using dot notation for nested arrays/objects.
public exists() : bool
Returns whether the data already exists in the storage. NOTE: This method does not check if the data is current.
public extra() : array
Get extra items which haven't been defined in blueprints.
public file(\Grav\Common\Data\FileInterface/null/\RocketTheme\Toolbox\File\FileInterface $storage=null) : \Grav\Common\Data\FileInterface/null
Set or get the data storage.
public filter() : \Grav\Common\Data\$this
public get(string $name, mixed $default=null, string/null $separator=null) : mixed Value.
Get value by using dot notation for nested arrays/objects.
public getDefaults() : array
Get nested structure containing default values defined in the blueprints. Fields without default value are ignored in the list.
public getJoined(string $name, array/object $value, string $separator='.') : array
Get value from the configuration and join it with given data.
public join(string $name, mixed $value, string $separator='.') : \Grav\Common\Data\$this
Join nested values together by using blueprints.
public joinDefaults(string $name, mixed $value, string $separator='.') : \Grav\Common\Data\$this
Set default values by using blueprints.
public jsonSerialize() : array
public merge(array $data) : \Grav\Common\Data\$this
Merge two configurations together.
public offsetExists(string $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(string $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(string/null $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(string/null $offset) : void
Unsets variable at specified offset.
public raw() : string
Return unmodified data as raw string. NOTE: This function only returns data which has been saved to the storage.
public save() : void
Save data if storage has been defined.
public set(string $name, mixed $value, string/null $separator=null) : \Grav\Common\Data\$this
Set value by using dot notation for nested arrays/objects.
public setDefaults(array $data) : \Grav\Common\Data\$this
Set default values to the configuration if variables were not set.
public setKeepEmptyValues(bool $value) : \Grav\Common\Data\$this
public setMissingValuesAsNull(bool $value) : \Grav\Common\Data\$this
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public undef(string $name, string/null $separator=null) : \Grav\Common\Data\$this
Unset value by using dot notation for nested arrays/objects.
public validate() : \Grav\Common\Data\$this
Validate by blueprints.
public value(string $name, mixed $default=null, string $separator='.') : mixed Value.
Get value by using dot notation for nested arrays/objects.
Examples of Data::def()
TXT
$data->def('this.is.my.nested.variable', 'default');
Examples of Data::get()
TXT
$value = $this->get('this.is.my.nested.variable');
Examples of Data::set()
TXT
$data->set('this.is.my.nested.variable', $value);
Examples of Data::undef()
TXT
$data->undef('this.is.my.nested.variable');
Examples of Data::value()
TXT
$value = $data->value('this.is.my.nested.variable');

This class implements \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Data\Validation

Class Validation

Visibility Function
public static authorize(string/string[] $action, \Grav\Common\Data\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : bool
Checks user authorisation to the action.
public static checkSafety(mixed $value, array $field) : array
public static filter(mixed $value, array $field) : mixed Filtered value.
Filter value against a blueprint field definition.
public static filterIgnore(mixed $value, array $params, array $field) : mixed
public static filterItem_List(mixed $value, mixed $params) : array
public static filterUnset(mixed $value, array $params, array $field) : null
public static filterYaml(mixed $value, array $params) : array
public static typeArray(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: array
public static typeBool(mixed $value, mixed $params) : bool
public static typeCheckbox(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: checkbox
public static typeCheckboxes(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: checkbox list
public static typeColor(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: color
public static typeCommaList(mixed $value, array $params, array $field) : bool
public static typeDate(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: date
public static typeDatetime(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: datetime
public static typeDatetimeLocal(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: datetime-local
public static typeEmail(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: email
public static typeFile(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: file
public static typeHidden(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: hidden
public static typeIgnore(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: ignore (will not validate)
public static typeInt(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: int
public static typeList(mixed $value, array $params, array $field) : bool
public static typeMonth(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: month
public static typeNumber(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: number
public static typePassword(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: password
public static typeRadio(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: radio
public static typeRange(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: range
public static typeSelect(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: select
public static typeText(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: text
public static typeTextarea(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: textarea
public static typeTime(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: time
public static typeToggle(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: toggle
public static typeUnset(mixed $value, array $params, array $field) : bool True if validation succeeded.
Input value which can be ignored.
public static typeUrl(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: url
public static typeWeek(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: week
public static validate(mixed $value, array $field) : array
Validate value against a blueprint field definition.
public static validateAlnum(mixed $value, mixed $params) : bool
public static validateAlpha(mixed $value, mixed $params) : bool
public static validateArray(mixed $value, mixed $params) : bool
public static validateBool(mixed $value, mixed $params) : bool
public static validateDigit(mixed $value, mixed $params) : bool
public static validateFloat(mixed $value, mixed $params) : bool
public static validateHex(mixed $value, mixed $params) : bool
public static validateInt(mixed $value, mixed $params) : bool
public static validateJson(mixed $value, mixed $params) : bool
public static validatePattern(mixed $value, string $params) : bool
public static validateRequired(mixed $value, bool $params) : bool
protected static arrayFilterRecurse(array $values, array $params) : array
protected static filterArray(mixed $value, array $params, array $field) : array/null
protected static filterBool(mixed $value, mixed $params) : bool
protected static filterCheckbox(mixed $value, array $params, array $field) : string/null
protected static filterCheckboxes(mixed $value, array $params, array $field) : array/null
protected static filterCommaList(mixed $value, array $params, array $field) : array/array[]/false/string[]
protected static filterDateTime(mixed $value, array $params, array $field) : string
protected static filterFile(mixed $value, array $params, array $field) : array
protected static filterFlatten_array(mixed $value, array $params, array $field) : array/null
protected static filterFloat(mixed $value, mixed $params) : float
protected static filterInt(mixed $value, mixed $params) : int
protected static filterLines(mixed $value, array $params, array $field) : array/array[]/false/string[]
protected static filterList(mixed $value, array $params, array $field) : array
protected static filterLower(mixed $value, array $params) : string
protected static filterNumber(mixed $value, array $params, array $field) : float/int
protected static filterRange(mixed $value, array $params, array $field) : float/int
protected static filterText(mixed $value, array $params, array $field) : string
protected static filterUpper(mixed $value, array $params) : string


Class: \Grav\Common\Data\BlueprintSchema

Class BlueprintSchema

Visibility Function
public filter(array $data, bool $missingValuesAsNull=false, bool $keepEmptyValues=false) : array
Filter data by using blueprints.
public flattenData(array $data, bool $includeAll=false, string $name='') : array
Flatten data by using blueprints.
public getNestedRules(string $name) : array/null
public getType(string $name) : array
public getTypes() : array
public processForm(array $data, array $toggles=array()) : array
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public validate(array $data, array $options=array()) : void
Validate data against blueprints.
protected buildIgnoreNested(array $nested, string $parent='') : bool
protected checkRequired(array $data, array $fields) : array
protected dynamicConfig(array $field, string $property, array $call) : void
protected filterArray(array $data, array $rules, string $parent, bool $missingValuesAsNull, bool $keepEmptyValues) : array/null
protected flattenArray(array $data, array $rules, string $prefix) : array
protected processFormRecursive(array/null/array $data, array $toggles, array $nested) : array/null
protected validateArray(array $data, array $rules, bool $strict, bool $xss=true) : array

This class extends \RocketTheme\Toolbox\Blueprints\BlueprintSchema

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Errors\BareHandler

Class BareHandler

Visibility Function
public handle() : int

This class extends \Whoops\Handler\Handler

This class implements \Whoops\Handler\HandlerInterface


Class: \Grav\Common\Errors\Errors

Class Errors

Visibility Function
public resetHandlers() : void


Class: \Grav\Common\Errors\SystemFacade

Class SystemFacade

Visibility Function
public handleShutdown() : void
Special case to deal with Fatal errors and the like.
public registerShutdownFunction(callable $function) : void
public setHttpResponseCode(int $httpCode) : int

This class extends \Whoops\Util\SystemFacade


Class: \Grav\Common\Errors\SimplePageHandler

Class SimplePageHandler

Visibility Function
public __construct() : void
public addResourcePath(string $path) : void
public getResourcePaths() : array
public handle() : int
protected getResource(string $resource) : string

This class extends \Whoops\Handler\Handler

This class implements \Whoops\Handler\HandlerInterface


Class: \Grav\Common\File\CompiledJsonFile

Class CompiledJsonFile

Visibility Function
public __sleep() : array
Serialize file.
public __wakeup() : void
Unserialize file.
public content(mixed $var=null) : array
Get/set parsed file contents.
public save(mixed $data=null) : void
Save file.
protected decode(string $var, bool $assoc=true) : array
Decode RAW string into contents.

This class extends \RocketTheme\Toolbox\File\JsonFile

This class implements \RocketTheme\Toolbox\File\FileInterface


Class: \Grav\Common\File\CompiledYamlFile

Class CompiledYamlFile

Visibility Function
public __sleep() : array
Serialize file.
public __wakeup() : void
Unserialize file.
public content(mixed $var=null) : array
Get/set parsed file contents.
public save(mixed $data=null) : void
Save file.

This class extends \RocketTheme\Toolbox\File\YamlFile

This class implements \RocketTheme\Toolbox\File\FileInterface


Class: \Grav\Common\File\CompiledMarkdownFile

Class CompiledMarkdownFile

Visibility Function
public __sleep() : array
Serialize file.
public __wakeup() : void
Unserialize file.
public content(mixed $var=null) : array
Get/set parsed file contents.
public save(mixed $data=null) : void
Save file.

This class extends \RocketTheme\Toolbox\File\MarkdownFile

This class implements \RocketTheme\Toolbox\File\FileInterface


Class: \Grav\Common\Filesystem\Archiver (abstract)

Class Archiver

Visibility Function
public abstract addEmptyFolders(array $folders, callable/null/callable $status=null) : \Grav\Common\Filesystem\$this
public abstract compress(string $folder, callable/null/callable $status=null) : \Grav\Common\Filesystem\$this
public static create(string $compression) : \Grav\Common\Filesystem\ZipArchiver
public abstract extract(string $destination, callable/null/callable $status=null) : \Grav\Common\Filesystem\$this
public setArchive(string $archive_file) : \Grav\Common\Filesystem\$this
public setOptions(array $options) : \Grav\Common\Filesystem\$this
protected getArchiveFiles(string $rootPath) : \Grav\Common\Filesystem\RecursiveIteratorIterator


Class: \Grav\Common\Filesystem\RecursiveDirectoryFilterIterator

Class RecursiveDirectoryFilterIterator

Visibility Function
public __construct(\RecursiveIterator $iterator, string $root, array $ignore_folders, array $ignore_files) : void
Create a RecursiveFilterIterator from a RecursiveIterator
public accept() : bool true if the current element is acceptable, otherwise false.
Check whether the current element of the iterator is acceptable
public getChildren() : \Grav\Common\Filesystem\RecursiveDirectoryFilterIterator/\Grav\Common\Filesystem\RecursiveFilterIterator
protected matchesPattern(string $filename, array $patterns) : bool
Check if filename matches any pattern in the list

This class extends \RecursiveFilterIterator

This class implements \RecursiveIterator, \Iterator, \Traversable, \OuterIterator


Class: \Grav\Common\Filesystem\RecursiveFolderFilterIterator

Class RecursiveFolderFilterIterator

Visibility Function
public __construct(\RecursiveIterator $iterator, array $ignore_folders=array()) : void
Create a RecursiveFilterIterator from a RecursiveIterator
public accept() : bool true if the current element is acceptable, otherwise false.
Check whether the current element of the iterator is acceptable

This class extends \RecursiveFilterIterator

This class implements \RecursiveIterator, \Iterator, \Traversable, \OuterIterator


Class: \Grav\Common\Filesystem\Folder (abstract)

Class Folder

Visibility Function
public static all(string $path, array $params=array()) : array
Return recursive list of all files and directories under given path.
public static copy(string $source, string $target, string/null $ignore=null) : void
Recursively copy directory in filesystem.
public static countChildren(string $directory) : int/false
Does a directory contain children
public static create(string $folder) : void
public static delete(string $target, bool $include_target=true) : bool
Recursively delete directory from filesystem.
public static getRelativePath(string $path, string $base='/Users/rhuk/Projects/grav/grav') : string
Get relative path between target and base path. If path isn't relative, return full path.
public static getRelativePathDotDot(string $path, string $base) : string
Get relative path between target and base path. If path isn't relative, return full path.
public static hashAllFiles(array $paths) : string
Recursively md5 hash all files in a path
public static lastModifiedFile(array $paths, string $extensions='md|yaml') : int
Recursively find the last modified time under given path by file.
public static lastModifiedFolder(array $paths) : int
Recursively find the last modified time under given path.
public static mkdir(string $folder) : void
public static move(string $source, string $target) : void
Move directory in filesystem.
public static rcopy(string $src, string $dest, bool $preservePermissions=false) : bool
Recursive copy of one directory to another
public static shift(string $path) : string/null
Shift first directory out of the path.
protected static doDelete(string $folder, bool $include_target=true) : bool


Class: \Grav\Common\Filesystem\ZipArchiver

Class ZipArchiver

Visibility Function
public addEmptyFolders(array $folders, callable/null/callable $status=null) : \Grav\Common\Filesystem\$this
public compress(string $source, callable/null/callable $status=null) : \Grav\Common\Filesystem\$this
public extract(string $destination, callable/null/callable $status=null) : \Grav\Common\Filesystem\$this

This class extends \Grav\Common\Filesystem\Archiver


Class: \Grav\Common\Flex\FlexIndex (abstract)

Class FlexIndex

Visibility Function
protected getActiveUser() : \Grav\Common\Flex\UserInterface/null
protected getAuthorizeScope() : string
protected getContainer() : \Grav\Common\Flex\Grav
protected getFlexContainer() : \Grav\Common\Flex\Flex
protected isAdminSite() : bool

This class extends \Grav\Framework\Flex\FlexIndex

This class implements \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Flex\Interfaces\FlexIndexInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Doctrine\Common\Collections\Selectable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Doctrine\Common\Collections\Collection, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Stringable, \Grav\Framework\Collection\CollectionInterface


Class: \Grav\Common\Flex\FlexCollection (abstract)

Class FlexCollection

Visibility Function
public triggerEvent(string $name, object/null $event=null) : \Grav\Common\Flex\$this
protected getActiveUser() : \Grav\Common\Flex\UserInterface/null
protected getAuthorizeScope() : string
protected getContainer() : \Grav\Common\Flex\Grav
protected getFlexContainer() : \Grav\Common\Flex\Flex
protected getTemplate(string $layout) : \Grav\Common\Flex\Template/\Grav\Common\Flex\TemplateWrapper
protected isAdminSite() : bool

This class extends \Grav\Framework\Flex\FlexCollection

This class implements \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \JsonSerializable, \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \Stringable, \Doctrine\Common\Collections\Selectable, \Doctrine\Common\Collections\Collection


Class: \Grav\Common\Flex\FlexObject (abstract)

Class FlexObject

Visibility Function
public __debugInfo() : array
public checkMediaFilename(string $filename) : void
DEPRECATED - 1.7 Use Media class that implements MediaUploadInterface instead.
public checkUploadedMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string/null/string $filename=null, string/null/string $field=null) : void
public deleteMediaFile(string $filename) : void
public getFieldSettings(string $field) : array/null
public getFormValue(string $name, mixed $default=null, string $separator=null) : mixed
public getMedia() : \Grav\Common\Flex\MediaCollectionInterface
public getMediaField(string $field) : \Grav\Common\Flex\MediaCollectionInterface/null
public getMediaFolder() : string/null
public getMediaOrder() : array Empty array means default ordering.
Get display order for the associated media.
public getMediaUri() : string/null
Get URI ot the associated media. Method will return null if path isn't URI.
public getStorageFolder() : string/null
public prepareStorage() : void
public triggerEvent(string $name, object/null $event=null) : \Grav\Common\Flex\$this
public uploadMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string/null/string $filename=null, string/null/string $field=null) : void
protected addUpdatedMedia(\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : void
protected buildMediaList(string/null/string $field) : array
protected buildMediaObject(string/null/string $field, string $filename, \Grav\Common\Flex\MediaObjectInterface/null/\Grav\Framework\Media\Interfaces\MediaObjectInterface $image=null) : \Grav\Common\Flex\MediaObject/\Grav\Common\Flex\UploadedMediaObject
protected clearMediaCache() : void
Clear media cache.
protected createMedium(string $uri) : \Grav\Common\Flex\Medium/null
protected freeMedia() : void
protected getActiveUser() : \Grav\Common\Flex\UserInterface/null
protected getAuthorizeScope() : string
protected getContainer() : \Grav\Common\Flex\Grav
protected getExistingMedia() : \Grav\Common\Flex\MediaCollectionInterface/Media Representation of associated media.
Gets the associated media collection.
protected getFlexContainer() : \Grav\Common\Flex\Flex
protected getMediaCache() : \Grav\Common\Flex\CacheInterface
protected getMediaFieldSettings(string $field) : array
protected getMediaFields() : array
protected getTemplate(string $layout) : \Grav\Common\Flex\Template/\Grav\Common\Flex\TemplateWrapper
protected getUpdatedMedia() : \Grav\Common\Flex\array<string,UploadedFileInterface/array/\Grav\Common\Flex\null>
protected isAdminSite() : bool
protected offsetLoad_media() : \Grav\Common\Flex\MediaCollectionInterface
protected offsetSerialize_media() : null
protected parseFileProperty(array/mixed $value, array $settings=array()) : array/mixed
protected saveUpdatedMedia() : void
protected setMedia(\Grav\Common\Flex\MediaCollectionInterface/\Grav\Common\Flex\Media/\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : \Grav\Common\Flex\$this
Sets the associated media collection.
protected setUpdatedMedia(array $files) : void

This class extends \Grav\Framework\Flex\FlexObject

This class implements \Grav\Framework\Flex\Interfaces\FlexObjectInterface, \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface, \Stringable, \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable, \Grav\Framework\Interfaces\RenderInterface, \ArrayAccess, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Framework\Media\Interfaces\MediaInterface


Class: \Grav\Common\Flex\Types\Generic\GenericObject

Class GenericObject

Visibility Function

This class extends \Grav\Common\Flex\FlexObject

This class implements \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Grav\Framework\Interfaces\RenderInterface, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable, \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface, \Grav\Framework\Flex\Interfaces\FlexObjectInterface


Class: \Grav\Common\Flex\Types\Generic\GenericCollection

Class GenericCollection

Visibility Function

This class extends \Grav\Common\Flex\FlexCollection

This class implements \Doctrine\Common\Collections\Collection, \Doctrine\Common\Collections\Selectable, \Stringable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Serializable, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface


Class: \Grav\Common\Flex\Types\Generic\GenericIndex

Class GenericIndex

Visibility Function

This class extends \Grav\Common\Flex\FlexIndex

This class implements \Grav\Framework\Collection\CollectionInterface, \Stringable, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \JsonSerializable, \Doctrine\Common\Collections\Collection, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Doctrine\Common\Collections\Selectable, \Serializable, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Grav\Framework\Flex\Interfaces\FlexIndexInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface


Class: \Grav\Common\Flex\Types\Pages\PageCollection

Class GravPageCollection

Visibility Function
public addPage(\Grav\Common\Page\Interfaces\PageInterface $page) : \Grav\Common\Flex\Types\Pages\$this
Add a single page to a collection
public all() : \Grav\Common\Flex\Types\Pages\$this
DEPRECATED - 1.7 Not needed anymore in Flex Pages (does nothing).
public append(array $items) : \Grav\Common\Flex\Types\Pages\static
Append new elements to the list.
public batch(int $size) : \Grav\Common\Flex\Types\Pages\static[]
Split collection into array of smaller collections.
public dateRange(string/null $startDate=null, string/null $endDate=null, string/null $field=null) : \Grav\Common\Flex\Types\Pages\static
Returns the items between a set of date ranges of either the page date field (default) or an arbitrary datetime page field where start date and end date are optional Dates must be passed in as text that strtotime() can process http://php.net/manual/en/function.strtotime.php
public filterBy(array $filters, bool $recursive=false) : \Grav\Common\Flex\Types\Pages\static
Filter pages by given filters. - search: string - page_type: string
string[] - modular: bool - visible: bool - routable: bool - published: bool - page: bool - translated: bool
public static getCachedMethods() : array
public getLevelListing(array $options) : array
public getParams() : array
Get the collection params
public getRoot() : \Grav\Common\Page\Interfaces\PageInterface
public intersect(\Grav\Common\Page\Interfaces\PageCollectionInterface $collection) : \Grav\Common\Flex\Types\Pages\static
Intersect another collection with the current collection
public merge(\Grav\Common\Page\Interfaces\PageCollectionInterface $collection) : \Grav\Common\Flex\Types\Pages\static
Merge another collection with the current collection
public modular() : \Grav\Common\Flex\Types\Pages\static
Alias of modules()
public modules() : static The collection with only modules
Creates new collection with only modules
public nonModular() : \Grav\Common\Flex\Types\Pages\static
Alias of pages()
public nonPublished() : static The collection with only non-published pages
Creates new collection with only non-published pages
public nonRoutable() : static The collection with only non-routable pages
Creates new collection with only non-routable pages
public nonVisible() : static The collection with only non-visible pages
Creates new collection with only non-visible pages
public nth(int $key) : \Grav\Common\Flex\Types\Pages\PageInterface/bool
Return nth item.
public ofOneOfTheseAccessLevels(array $accessLevels) : static The collection
Creates new collection with only pages of one of the specified access levels
public ofOneOfTheseTypes(string[] $types) : static The collection
Creates new collection with only pages of one of the specified types
public ofType(string $type) : static The collection
Creates new collection with only pages of the specified type
public order(string $by, string $dir='asc', array/null $manual=null, int/null $sort_flags=null) : \Grav\Common\Flex\Types\Pages\static
Reorder collection.
public pages() : static The collection with only pages
Creates new collection with only pages
public params() : array
Get the collection params
public prev() : \Grav\Common\Flex\Types\Pages\PageInterface/false
Return previous item.
public published() : static The collection with only published pages
Creates new collection with only published pages
public random(int $num=1) : \Grav\Common\Flex\Types\Pages\static
Pick one or more random entries.
public routable() : static The collection with only routable pages
Creates new collection with only routable pages
public setCurrent(string $path) : void
Set current page.
public setParams(array $params) : \Grav\Common\Flex\Types\Pages\$this
Set parameters to the Collection
public toExtendedArray() : array
Get the extended version of this Collection with each page keyed by route
public triggerEvent(string $name, object/null $event=null) : \Grav\Common\Flex\Types\Pages\$this
public visible() : static The collection with only visible pages
Creates new collection with only visible pages
public withModules(bool $bool=true) : \Grav\Common\Flex\Types\Pages\static
public withOrdered(bool $bool=true) : \Grav\Common\Flex\Types\Pages\static
public withPages(bool $bool=true) : \Grav\Common\Flex\Types\Pages\static
public withTranslated(string/null/string $languageCode=null, bool/null/bool $fallback=null) : \Grav\Common\Flex\Types\Pages\PageIndex
public withTranslation(bool $bool=true, string/null/string $languageCode=null, bool/null/bool $fallback=null) : \Grav\Common\Flex\Types\Pages\static
protected buildSort(string $order_by='default', string $order_dir='asc', array/null $manual=null, int/null $sort_flags=null) : array
protected getActiveUser() : \Grav\Common\Flex\Types\Pages\UserInterface/null
protected getAuthorizeScope() : string
protected getContainer() : \Grav\Common\Grav
protected getFlexContainer() : \Grav\Common\Flex\Types\Pages\Flex
protected getTemplate(string $layout) : \Grav\Common\Flex\Types\Pages\Template/\Grav\Common\Flex\Types\Pages\TemplateWrapper
protected isAdminSite() : bool

This class extends \Grav\Framework\Flex\Pages\FlexPageCollection

This class implements \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \JsonSerializable, \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \Stringable, \Doctrine\Common\Collections\Selectable, \Doctrine\Common\Collections\Collection, \Grav\Common\Page\Interfaces\PageCollectionInterface


Class: \Grav\Common\Flex\Types\Pages\PageIndex

Class GravPageObject

Visibility Function
public __construct(array $entries=array(), \Grav\Common\Flex\Types\Pages\FlexDirectory/null/\Grav\Framework\Flex\FlexDirectory $directory=null) : void
public addPage(\Grav\Common\Page\Interfaces\PageInterface $page) : \Grav\Common\Flex\Types\Pages\PageCollection
Add a single page to a collection
public adjacentSibling(string $path, int $direction=1) : \Grav\Common\Flex\Types\Pages\PageObject/false The sibling item.
Returns the adjacent sibling based on a direction.
public all() : \Grav\Common\Flex\Types\Pages\$this
DEPRECATED - 1.7 Not needed anymore in Flex Pages (does nothing).
public batch(int $size) : \Grav\Common\Flex\Types\Pages\PageCollection[]
Split collection into array of smaller collections.
public copy() : \Grav\Common\Flex\Types\Pages\static
Create a copy of this collection
public currentPosition(string $path) : int/null The index of the current page, null if not found.
Returns the item in the current position.
public dateRange(string/null $startDate=null, string/null $endDate=null, string/null $field=null) : \Grav\Common\Flex\Types\Pages\static
Returns the items between a set of date ranges of either the page date field (default) or an arbitrary datetime page field where start date and end date are optional Dates must be passed in as text that strtotime() can process http://php.net/manual/en/function.strtotime.php
public filterBy(array $filters, bool $recursive=false) : \Grav\Common\Flex\Types\Pages\static
Filter pages by given filters. - search: string - page_type: string
string[] - modular: bool - visible: bool - routable: bool - published: bool - page: bool - translated: bool
public get(string $key) : \Grav\Common\Flex\Types\Pages\PageObject/null
public getCacheKey() : mixed
public getLanguage() : string/null
public getLevelListing(array $options) : array
public getParam(string $name) : mixed
Get the collection param
public getParams() : array
Get the collection params
public getRoot() : \Grav\Common\Page\Interfaces\PageInterface
public intersect(\Grav\Common\Page\Interfaces\PageCollectionInterface $collection) : \Grav\Common\Flex\Types\Pages\PageCollection
Intersect another collection with the current collection
public isFirst(string $path) : bool True if item is first.
Check to see if this item is the first in the collection.
public isLast(string $path) : bool True if item is last.
Check to see if this item is the last in the collection.
public static loadEntriesFromStorage(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : array
public merge(\Grav\Common\Page\Interfaces\PageCollectionInterface $collection) : \Grav\Common\Flex\Types\Pages\PageCollection
Merge another collection with the current collection
public modular() : static The collection with only modular pages
Creates new collection with only modular pages
public modules() : static The collection with only modular pages
Creates new collection with only modular pages
public nextSibling(string $path) : \Grav\Common\Flex\Types\Pages\PageObject/null The next item.
Gets the next sibling based on current position.
public nonModular() : static The collection with only non-modular pages
Creates new collection with only non-modular pages
public nonPublished() : static The collection with only non-published pages
Creates new collection with only non-published pages
public nonRoutable() : static The collection with only non-routable pages
Creates new collection with only non-routable pages
public nonVisible() : static The collection with only non-visible pages
Creates new collection with only non-visible pages
public ofOneOfTheseAccessLevels(array $accessLevels) : static The collection
Creates new collection with only pages of one of the specified access levels
public ofOneOfTheseTypes(string[] $types) : static The collection
Creates new collection with only pages of one of the specified types
public ofType(string $type) : static The collection
Creates new collection with only pages of the specified type
public order(string $by, string $dir='asc', array $manual=null, string $sort_flags=null) : \Grav\Common\Flex\Types\Pages\static
Reorder collection.
public pages() : static The collection with only non-modular pages
Creates new collection with only non-modular pages
public params() : array
Get the collection params
public prevSibling(string $path) : \Grav\Common\Flex\Types\Pages\PageObject/null The previous item.
Gets the previous sibling based on current position.
public published() : static The collection with only published pages
Creates new collection with only published pages
public remove(string $key) : \Grav\Common\Flex\Types\Pages\PageObject/null
Remove item from the list.
public routable() : static The collection with only routable pages
Creates new collection with only routable pages
public setParam(string $name, mixed $value) : \Grav\Common\Flex\Types\Pages\$this
Set a parameter to the Collection
public setParams(array $params) : \Grav\Common\Flex\Types\Pages\$this
Set parameters to the Collection
public toArray() : array
Converts collection into an array.
public toExtendedArray() : array
Get the extended version of this Collection with each page keyed by route
public visible() : static The collection with only visible pages
Creates new collection with only visible pages
public withTranslated(string/null/string $languageCode=null, bool/null/bool $fallback=null) : \Grav\Common\Flex\Types\Pages\static
protected createFrom(array $entries, string/null/string $keyField=null) : \Grav\Common\Flex\Types\Pages\static
protected filterByParent(array $filters) : \Grav\Common\Flex\Types\Pages\static
protected getActiveUser() : \Grav\Common\Flex\Types\Pages\UserInterface/null
protected getAuthorizeScope() : string
protected getContainer() : \Grav\Common\Grav
protected getFallbackLanguages(string/null/string $languageCode=null, bool/null/bool $fallback=null) : array
protected getFlexContainer() : \Grav\Common\Flex\Types\Pages\Flex
protected static getIndexFile(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : \Grav\Common\Flex\Types\Pages\CompiledJsonFile/\Grav\Common\Flex\Types\Pages\CompiledYamlFile/null
protected getLanguageTemplates(string $key) : array
protected getLevelListingRecurse(array $options) : array
protected getListingActions(\Grav\Common\Flex\Types\Pages\PageObject $object, \Grav\Common\User\Interfaces\UserInterface $user) : array
protected isAdminSite() : bool
protected translateEntries(array $entries, string $lang, bool/null/bool $fallback=null) : array

This class extends \Grav\Framework\Flex\Pages\FlexPageIndex

This class implements \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Flex\Interfaces\FlexIndexInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Doctrine\Common\Collections\Selectable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Doctrine\Common\Collections\Collection, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Stringable, \Grav\Framework\Collection\CollectionInterface, \Grav\Common\Page\Interfaces\PageCollectionInterface


Class: \Grav\Common\Flex\Types\Pages\PageObject

Class GravPageObject

Visibility Function
public __debugInfo() : array
public active() : bool True if it is active
Returns whether or not this page is the currently active page requested via the URL.
public activeChild() : bool True if active child exists
Returns whether or not this URI's URL contains the URL of the active page. Or in other words, is this page's URL in the current URL
public adjacentSibling(int $direction=1) : \Grav\Common\Flex\Types\Pages\PageInterface/false the sibling page
Returns the adjacent sibling based on a direction.
public ancestor(string/null $lookup=null) : \Grav\Common\Flex\Types\Pages\PageInterface/null page you were looking for if it exists
Helper method to return an ancestor page.
public check(\Grav\Common\Flex\Types\Pages\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : void
public children() : \Grav\Common\Flex\Types\Pages\FlexIndexInterface/\Grav\Common\Flex\Types\Pages\PageCollectionInterface/\Grav\Common\Flex\Types\Pages\Collection
Returns children of this page.
public collection(string/string/array $params='content', bool $pagination=true) : \Grav\Common\Flex\Types\Pages\PageCollectionInterface/\Grav\Common\Flex\Types\Pages\Collection
Get a collection of pages in the current context.
public content(string/null $var=null) : string Content
Gets and Sets the content based on content portion of the .md file
public currentPosition() : int/null the index of the current page.
Returns the item in the current position.
public date(string/null $var=null) : int Unix timestamp representation of the date
Gets and sets the date for this Page object. This is typically passed in via the page headers
public dateformat(string/null $var=null) : string String representation of a date format
Gets and sets the date format for this Page object. This is typically passed in via the page headers using typical PHP date string structure - http://php.net/manual/en/function.date.php
public delete() : \Grav\Common\Flex\Types\Pages\static
public evaluate(string/array $value, bool $only_published=true) : \Grav\Common\Flex\Types\Pages\PageCollectionInterface/\Grav\Common\Flex\Types\Pages\Collection
public exists() : void
public filterBy(array $filters, bool $recursive=false) : bool
Filter page (true/false) by given filters. - search: string - extension: string - module: bool - visible: bool - routable: bool - published: bool - page: bool - translated: bool
public find(string $url, bool $all=false) : \Grav\Common\Flex\Types\Pages\PageInterface/null page you were looking for if it exists
Helper method to return a page.
public full_order() : string
public getCacheKey() : mixed
public static getCachedMethods() : array
public getFormValue(string $name, mixed $default=null, string $separator=null) : mixed
public getLevelListing(array $options) : array
public getRawContent() : string the current page content
Needed by the onPageContentProcessed event to get the raw page content
public getRoute(array/string/array $query=array()) : \Grav\Common\Flex\Types\Pages\Route/null
public header(object/array/null $var=null) : \stdClass/Header The current YAML configuration
Gets and Sets the header based on the YAML configuration at the top of the .md file
public id(string/null $var=null) : string The identifier
Gets and sets the identifier for this Page object.
public initialize() : void
public isDir() : bool True if its a directory
Returns whether or not this Page object is a directory or a page.
public isFirst() : bool True if item is first.
Check to see if this item is the first in an array of sub-pages.
public isLast() : bool True if item is last
Check to see if this item is the last in an array of sub-pages.
public isPage() : bool True if its a page with a .md file associated
Returns whether or not this Page object has a .md file associated with it or if its just a directory.
public lastModified(bool/null $var=null) : bool Show last_modified header
Gets and sets the option to show the last_modified header for the page.
public media(\Grav\Common\Page\Interfaces\MediaCollectionInterface/null $var=null) : MediaCollectionInterface Representation of associated media.
Gets and sets the associated media as found in the page folder.
public menu(string/null $var=null) : string The menu field for the page
Gets and sets the menu name for this Page. This is the text that can be used specifically for navigation. If no menu field is set, it will use the title()
public modified(int/null $var=null) : int Modified unix timestamp
Gets and sets the modified timestamp.
public move(\Grav\Common\Page\Interfaces\PageInterface $parent) : \Grav\Common\Flex\Types\Pages\$this
Prepare move page to new location. Moves also everything that's under the current page. You need to call $this->save() in order to perform the move.
public order(int/null $var=null) : string/bool Order in a form of '02.' or false if not set
Get/set order number of this page.
public parent(\Grav\Common\Flex\Types\Pages\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $var=null) : \Grav\Common\Flex\Types\Pages\PageInterface/null the parent page object if it exists.
Gets and Sets the parent object for this page
public prepareStorage() : array
public process(array/null $var=null) : array Array of name value pairs where the name is the process and value is true or false
Gets and Sets the process setup for this Page. This is multi-dimensional array that consists of a simple array of arrays with the form array("markdown"=>true) for example
public publishDate(string/null $var=null) : int Unix timestamp representation of the date
Gets and Sets the Page publish date
public published(bool/null $var=null) : bool True if the page is published
Gets and Sets whether or not this Page is considered published
public rawMarkdown(string/null $var=null) : string
Gets and Sets the Page raw content
public save(bool/array/bool $reorder=true) : \Grav\Common\Flex\Types\Pages\static
public setRawContent(string/null $content) : void
Needed by the onPageContentProcessed event to set the raw page content
public setSummary(string $summary) : void
Sets the summary of the page
public shouldProcess(string $process) : bool Whether or not the processing method is enabled for this Page
Gets the configured state of the processing method.
public slug(string/null $var=null) : string The slug
Gets and Sets the slug for the Page. The slug is used in the URL routing. If not set it uses the parent folder from the path
public summary(int/null $size=null, bool $textOnly=false) : string
Get the summary.
public taxonomy(array/null $var=null) : array An array of taxonomies
Gets and sets the taxonomy array which defines which taxonomies this page identifies itself with.
public title(string/null $var=null) : string The title of the Page
Gets and sets the title for this Page. If no title is set, it will use the slug() to get a name
public translatedLanguages(bool $onlyPublished=false) : array the page translated languages
Return an array with the routes of other translated languages
public triggerEvent(string $name, object/null $event=null) : \Grav\Common\Flex\Types\Pages\$this
public unpublishDate(string/null $var=null) : int/null Unix timestamp representation of the date
Gets and Sets the Page unpublish date
public visible(bool/null $var=null) : bool True if the page is visible
Gets and Sets whether or not this Page is visible for navigation
protected doGetBlueprint(string $name='') : \Grav\Common\Data\Blueprint
protected filterElements(array $elements, bool $extended=false) : void
protected getActiveUser() : \Grav\Common\Flex\Types\Pages\UserInterface/null
protected getAuthorizeScope() : string
protected getContainer() : \Grav\Common\Grav
protected getFlexContainer() : \Grav\Common\Flex\Types\Pages\Flex
protected getInheritedParams(string $field) : array
Method that contains shared logic for inherited() and inheritedField()
protected getTemplate(string $layout) : \Grav\Common\Flex\Types\Pages\Template/\Grav\Common\Flex\Types\Pages\TemplateWrapper
protected isAdminSite() : bool
protected isAuthorizedOverride(\Grav\Common\User\Interfaces\UserInterface $user, string $action, string $scope, bool $isMe) : bool/null
protected isMoved() : bool
protected onAfterSave(array $variables) : void
protected onBeforeSave(array $variables) : array
protected onSave(array $variables) : array
protected reorderSiblings(array $ordering) : \Grav\Common\Flex\Types\Pages\PageCollection/null

This class extends \Grav\Framework\Flex\Pages\FlexPageObject

This class implements \Grav\Common\Page\Interfaces\PageContentInterface, \Grav\Common\Page\Interfaces\PageFormInterface, \Grav\Common\Page\Interfaces\PageRoutableInterface, \Grav\Common\Page\Interfaces\PageTranslateInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Common\Page\Interfaces\PageLegacyInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Framework\Flex\Interfaces\FlexTranslateInterface, \Grav\Common\Page\Interfaces\PageInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Grav\Framework\Interfaces\RenderInterface, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable, \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface, \Grav\Framework\Flex\Interfaces\FlexObjectInterface


Class: \Grav\Common\Flex\Types\Pages\Storage\PageStorage

Class GravPageStorage

Visibility Function
public buildFilename(array $keys) : string
public buildFilepath(array $keys) : string
public buildFolder(array $keys) : string
public buildStorageKey(array $keys, bool $includeParams=true) : string
public buildStorageKeyParams(array $keys) : string
public extractKeysFromRow(array $row, bool $setDefaultLang=true) : array
public extractKeysFromStorageKey(string $key) : array
public parseKey(string $key, bool $variations=true) : array
public readFrontmatter(string $key) : string
public readRaw(string $key) : string
protected buildIndex() : array
Returns list of all stored keys in [key => timestamp] pairs.
protected canDeleteFolder(string $key) : bool
Check if page folder should be deleted. Deleting page can be done either by deleting everything or just a single language. If key contains the language, delete only it, unless it is the last language.
protected getIndexMeta() : array
protected getKeyFromPath(string $path) : string
Get key from the filesystem path.
protected getNewKey() : string
protected getObjectMeta(string $key, bool $reload=false) : array
protected initOptions(array $options) : void
protected loadRow(string $key) : array
protected parseParams(string $key, string $params) : array
protected prepareRow(array $row) : void
Prepares the row for saving and returns the storage key for the record.
protected saveRow(string $key, array $row) : array
Page storage supports moving and copying the pages and their languages. $row['META']['copy'] = true Use this if you want to copy the whole folder, otherwise it will be moved $row['META']['clone'] = true Use this if you want to clone the file, otherwise it will be renamed

This class extends \Grav\Framework\Flex\Storage\FolderStorage

This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


Class: \Grav\Common\Flex\Types\UserGroups\UserGroupObject

Flex User Group

Visibility Function
public authorize(string $action, string/null/string $scope=null) : bool/null
Checks user authorization to the action.
public static getCachedMethods() : array
public getTitle() : string
public static groupNames() : void
protected getAccess() : \Grav\Common\User\Access
protected offsetLoad_access(mixed $value) : array
protected offsetPrepare_access(mixed $value) : array
protected offsetSerialize_access(array/null/array $value) : array/null

This class extends \Grav\Common\Flex\FlexObject

This class implements \Grav\Framework\Flex\Interfaces\FlexObjectInterface, \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface, \Stringable, \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable, \Grav\Framework\Interfaces\RenderInterface, \ArrayAccess, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\User\Interfaces\UserGroupInterface, \Grav\Common\User\Interfaces\AuthorizeInterface


Class: \Grav\Common\Flex\Types\UserGroups\UserGroupCollection

Class UserGroupCollection

Visibility Function
public authorize(string $action, string/null/string $scope=null) : bool/null
Checks user authorization to the action.
public static getCachedMethods() : array

This class extends \Grav\Common\Flex\FlexCollection

This class implements \Doctrine\Common\Collections\Collection, \Doctrine\Common\Collections\Selectable, \Stringable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Serializable, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface


Class: \Grav\Common\Flex\Types\UserGroups\UserGroupIndex

Class GroupIndex

Visibility Function

This class extends \Grav\Common\Flex\FlexIndex

This class implements \Grav\Framework\Collection\CollectionInterface, \Stringable, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \JsonSerializable, \Doctrine\Common\Collections\Collection, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Doctrine\Common\Collections\Selectable, \Serializable, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Grav\Framework\Flex\Interfaces\FlexIndexInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface


Class: \Grav\Common\Flex\Types\Users\UserObject

Flex User Flex User is mostly compatible with the older User class, except on few key areas: - Constructor parameters have been changed. Old code creating a new user does not work. - Serializer has been changed -- existing sessions will be killed.

Visibility Function
public __clone() : void
public __construct(array $elements, string $key, \Grav\Framework\Flex\FlexDirectory $directory, bool $validate=false) : void
UserObject constructor.
public __debugInfo() : array
public authenticate(string $password) : bool
Authenticate user. If user password needs to be updated, new information will be saved.
public authorise(string $action) : bool
DEPRECATED - 1.5 Use ->authorize() method instead.
public authorize(string $action, string/null/string $scope=null) : bool/null
Checks user authorization to the action.
public avatarUrl() : string
DEPRECATED - 1.6 Use ->getAvatarUrl() method instead.
public checkMediaFilename(string $filename) : void
DEPRECATED - 1.7 Use Media class that implements MediaUploadInterface instead.
public checkUploadedMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string/null/string $filename=null, string/null/string $field=null) : void
public count() : int
DEPRECATED - 1.6 Method makes no sense for user account.
public def(string $name, mixed $default=null, string/null $separator=null) : \Grav\Common\Flex\Types\Users\$this
Set default value by using dot notation for nested arrays/objects.
public deleteMediaFile(string $filename) : void
public extra() : array
Get extra items which haven't been defined in blueprints.
public file(\Grav\Common\Flex\Types\Users\FileInterface/null/\RocketTheme\Toolbox\File\FileInterface $storage=null) : \Grav\Common\Flex\Types\Users\FileInterface/null
Set or get the data storage.
public filter() : \Grav\Common\Flex\Types\Users\$this
Filter all items by using blueprints.
public get(string $name, mixed $default=null, string/null $separator=null) : mixed Value.
Get value by using dot notation for nested arrays/objects.
public getAvatarImage() : \Grav\Common\Flex\Types\Users\ImageMedium/\Grav\Common\Flex\Types\Users\StaticImageMedium/null
Return media object for the User's avatar. Note: if there's no local avatar image for the user, you should call getAvatarUrl() to get the external avatar URL.
public getAvatarMedia() : \Grav\Common\Flex\Types\Users\ImageMedium/\Grav\Common\Flex\Types\Users\StaticImageMedium/null
DEPRECATED - 1.6 Use ->getAvatarImage() method instead.
public getAvatarUrl() : string
Return the User's avatar URL
public static getCachedMethods() : array
public getContentEditor() : string
Helper to get content editor will fall back if not set
public getDefaults() : array
Get nested structure containing default values defined in the blueprints. Fields without default value are ignored in the list.
public getFieldSettings(string $field) : array/null
public getJoined(string $name, array/object $value, string $separator=null) : array
Get value from the configuration and join it with given data.
public getMedia() : \Grav\Common\Media\Interfaces\MediaCollectionInterface
public getMediaField(string $field) : \Grav\Common\Flex\Types\Users\MediaCollectionInterface/null
public getMediaFolder() : string/null
public getMediaOrder() : array Empty array means default ordering.
Get display order for the associated media.
public getMediaUri() : string/null
Get URI ot the associated media. Method will return null if path isn't URI.
public getProperty(string $property, mixed $default=null) : mixed
public getRelationship(string $name) : \Grav\Common\Flex\Types\Users\RelationshipInterface/null
public getRelationships() : \Grav\Common\Flex\Types\Users\Relationships
public getRoles() : \Grav\Common\Flex\Types\UserGroups\UserGroupIndex
public getStorageFolder() : string/null
public initRelationship(string $name) : array/object/null
public isMyself(\Grav\Common\Flex\Types\Users\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : bool
public isValid() : bool
public join(string $name, mixed $value, string/null $separator=null) : \Grav\Common\Flex\Types\Users\$this
Join nested values together by using blueprints.
public joinDefaults(string $name, mixed $value, string/null $separator=null) : \Grav\Common\Flex\Types\Users\$this
Set default values by using blueprints.
public jsonSerialize() : void
public merge(array $data) : \Grav\Common\Flex\Types\Users\$this
DEPRECATED - 1.6 Use ->update($data) instead (same but with data validation & filtering, file upload support).
public onPrepareRegistration() : void
public prepareStorage() : array
public raw() : string
Return unmodified data as raw string. NOTE: This function only returns data which has been saved to the storage.
public save() : \Grav\Common\Flex\Types\Users\static
Save user
public set(string $name, mixed $value, string/null $separator=null) : \Grav\Common\Flex\Types\Users\$this
Set value by using dot notation for nested arrays/objects.
public setDefaults(array $data) : \Grav\Common\Flex\Types\Users\$this
Set default values to the configuration if variables were not set.
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=5, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public triggerEvent(string $name, object/null $event=null) : \Grav\Common\Flex\Types\Users\$this
public undef(string $name, string/null $separator=null) : \Grav\Common\Flex\Types\Users\$this
Unset value by using dot notation for nested arrays/objects.
public uploadMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string/null/string $filename=null, string/null/string $field=null) : void
public validate() : \Grav\Common\Flex\Types\Users\$this
Validate by blueprints.
protected addUpdatedMedia(\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : void
protected buildFlexIdentifierList(iterable $collection) : array
protected buildMediaList(string/null/string $field) : array
protected buildMediaObject(string/null/string $field, string $filename, \Grav\Common\Flex\Types\Users\MediaObjectInterface/null/\Grav\Framework\Media\Interfaces\MediaObjectInterface $image=null) : \Grav\Common\Flex\Types\Users\MediaObject/\Grav\Common\Flex\Types\Users\UploadedMediaObject
protected clearMediaCache() : void
Clear media cache.
protected createMedium(string $uri) : \Grav\Common\Flex\Types\Users\Medium/null
protected doGetBlueprint(string $name='') : \Grav\Common\Data\Blueprint
protected doSerialize() : array
Override doSerialize to preserve sensitive fields during PHP serialization (caching). Note: jsonSerialize() and toArray() strip sensitive fields for frontend security, but we need to preserve them when serializing for cache storage to ensure password hashes and 2FA secrets are not lost.
protected freeMedia() : void
protected generateMultiavatar(string $hash) : string
protected getAccess() : \Grav\Common\User\Access
protected getActiveUser() : \Grav\Common\Flex\Types\Users\UserInterface/null
protected getAuthorizeScope() : string
protected getAvatarFile() : string/null
protected getContainer() : \Grav\Common\Grav
protected getExistingMedia() : \Grav\Common\Flex\Types\Users\MediaCollectionInterface/Media Representation of associated media.
Gets the associated media collection.
protected getFlexContainer() : \Grav\Framework\Flex\Flex
protected getGroups() : \Grav\Common\Flex\Types\UserGroups\UserGroupIndex
protected getMediaCache() : \Grav\Common\Flex\Types\Users\CacheInterface
protected getMediaFieldSettings(string $field) : array
protected getMediaFields() : array
protected getOriginalMedia() : MediaCollectionInterface Representation of associated media.
Gets the associated media collection (original images).
protected getTemplate(string $layout) : \Grav\Common\Flex\Types\Users\Template/\Grav\Common\Flex\Types\Users\TemplateWrapper
protected getUpdatedMedia() : \Grav\Common\Flex\Types\Users\array<string,UploadedFileInterface/array/\Grav\Common\Flex\Types\Users\null>
protected getUserGroups() : \Grav\Common\Flex\Types\UserGroups\UserGroupIndex
protected isAdminSite() : bool
protected isAuthorizedOverride(\Grav\Common\User\Interfaces\UserInterface $user, string $action, string $scope, bool $isMe=false) : bool/null
protected offsetLoad_access(mixed $value) : array
protected offsetLoad_media() : \Grav\Common\Media\Interfaces\MediaCollectionInterface
protected offsetPrepare_access(mixed $value) : array
protected offsetSerialize_access(array/null/array $value) : array/null
protected offsetSerialize_media() : null
protected parseFileProperty(array/mixed $value, array $settings=array()) : array/mixed
protected resetRelationships() : void
protected saveUpdatedMedia() : void
protected setMedia(\Grav\Common\Flex\Types\Users\MediaCollectionInterface/\Grav\Common\Flex\Types\Users\Media/\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : \Grav\Common\Flex\Types\Users\$this
Sets the associated media collection.
protected setUpdatedMedia(array $files) : void
protected updateAvatarRelationship(\Grav\Framework\Contracts\Relationships\ToOneRelationshipInterface $relationship) : void
protected updateRelationships() : bool Return true if relationships were updated.
Examples of UserObject::def()
TXT
$data->def('this.is.my.nested.variable', 'default');
Examples of UserObject::get()
TXT
$value = $this->get('this.is.my.nested.variable');
Examples of UserObject::set()
TXT
$data->set('this.is.my.nested.variable', $value);
Examples of UserObject::undef()
TXT
$data->undef('this.is.my.nested.variable');

This class extends \Grav\Common\Flex\FlexObject

This class implements \Grav\Framework\Flex\Interfaces\FlexObjectInterface, \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface, \Stringable, \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable, \Grav\Framework\Interfaces\RenderInterface, \ArrayAccess, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\User\Interfaces\UserInterface, \Countable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\Data\DataInterface, \Grav\Common\User\Interfaces\AuthorizeInterface


Class: \Grav\Common\Flex\Types\Users\UserCollection

Class UserCollection

Visibility Function
public delete(string $username) : bool True if user account was found and was deleted.
Delete user account.
public find(string $query, array/string/string[] $fields=array()) : \Grav\Common\Flex\Types\Users\UserObject
Find a user by username, email, etc
public static getCachedMethods() : array
public load(string $username) : \Grav\Common\Flex\Types\Users\UserObject
Load user account. Always creates user object. To check if user exists, use $this->exists().
protected filterUsername(string $key) : string

This class extends \Grav\Common\Flex\FlexCollection

This class implements \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \JsonSerializable, \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \Stringable, \Doctrine\Common\Collections\Selectable, \Doctrine\Common\Collections\Collection, \Grav\Common\User\Interfaces\UserCollectionInterface


Class: \Grav\Common\Flex\Types\Users\UserIndex

Class UserIndex

Visibility Function
public delete(string $username) : bool True if user account was found and was deleted.
Delete user account.
public find(string $query, array $fields=array()) : \Grav\Common\Flex\Types\Users\UserObject
Find a user by username, email, etc
public load(string $username) : \Grav\Common\Flex\Types\Users\UserObject
Load user account. Always creates user object. To check if user exists, use $this->exists().
public static loadEntriesFromStorage(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : array
public static updateObjectMeta(array $meta, array $data, \Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : void
protected static filterUsername(string $key, \Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : string
protected static getIndexFile(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : \Grav\Common\Flex\Types\Users\CompiledYamlFile/null
protected static onChanges(array $entries, array $added, array $updated, array $removed) : void

This class extends \Grav\Common\Flex\FlexIndex

This class implements \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Flex\Interfaces\FlexIndexInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Doctrine\Common\Collections\Selectable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Doctrine\Common\Collections\Collection, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Stringable, \Grav\Framework\Collection\CollectionInterface, \Grav\Common\User\Interfaces\UserCollectionInterface


Class: \Grav\Common\Flex\Types\Users\Storage\UserFolderStorage

Class UserFolderStorage

Visibility Function
protected prepareRow(array $row) : void
Prepares the row for saving and returns the storage key for the record.

This class extends \Grav\Framework\Flex\Storage\FolderStorage

This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


Class: \Grav\Common\Flex\Types\Users\Storage\UserFileStorage

Class UserFileStorage

Visibility Function
public getMediaPath(string $key=null) : mixed
protected prepareRow(array $row) : void
Prepares the row for saving and returns the storage key for the record.

This class extends \Grav\Framework\Flex\Storage\FileStorage

This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


Class: \Grav\Common\Form\FormFlash

Class FormFlash

Visibility Function
public __construct(array $config) : void
public addFile(string $filename, string $field, array/null/array $crop=null) : bool
Add existing file to the form flash.
public addUploadedFile(\Psr\Http\Message\UploadedFileInterface $upload, string/null/string $field=null, array/null/array $crop=null) : string Return name of the file
Add uploaded file to the form flash.
public clearFiles() : void
Clear form flash from all uploaded files.
public cropFile(string $field, string $filename, array $upload, array $crop) : bool
DEPRECATED - 1.6 For backwards compatibility only, do not use
public delete() : \Grav\Framework\Form\Interfaces\$this
Delete this form flash.
public exists() : bool
Check if this form flash exists.
public getCreatedTimestamp() : int
Get creation timestamp for this form flash.
public getData() : array/null
Get raw form data.
public getFilesByField(string $field) : array
Get all files associated to a form field.
public getFilesByFields(bool $includeOriginal=false) : array
Get all files grouped by the associated form fields.
public getFormName() : string
Get form name associated to this form instance.
public getId() : string
Get unique form flash id if set.
public getLegacyFiles() : array
DEPRECATED - 1.6 For backwards compatibility only, do not use
public getSessionId() : string
Get session Id associated to this form instance.
public getUniqueId() : string
Get unique identifier associated to this form instance.
public getUpdatedTimestamp() : int
Get last updated timestamp for this form flash.
public getUrl() : string
Get URL associated to this form instance.
public getUserEmail() : string
Get email from the user who was associated to this form instance.
public getUsername() : string
Get username from the user who was associated to this form instance.
public jsonSerialize() : array
public removeFile(string $name, string/null/string $field=null) : bool
Remove any file from form flash.
public save() : \Grav\Framework\Form\Interfaces\$this
Save this form flash.
public setData(array/null/array $data) : void
Set raw form data.
public uploadFile(string $field, string $filename, array $upload) : bool
DEPRECATED - 1.6 For backwards compatibility only, do not use

This class extends \Grav\Framework\Form\FormFlash

This class implements \JsonSerializable, \Grav\Framework\Form\Interfaces\FormFlashInterface


Class: \Grav\Common\GPM\AbstractCollection (abstract)

Class AbstractCollection

Visibility Function
public toArray() : array
public toJson() : string

This class extends \Grav\Common\Iterator

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Upgrader

Class Upgrader

Visibility Function
public __construct(bool/boolean $refresh=false, callable/null $callback=null) : void
Creates a new GPM instance with Local and Remote packages available
public getAssets() : array
Returns an array of assets available to download remotely
public getChangelog(string/null $diff=null) : array return the changelog list for each version
Returns the changelog list for each version of Grav
public getLocalVersion() : string
Returns the version of the installed Grav
public getReleaseDate() : string
Returns the release date of the latest version of Grav
public getRemoteVersion() : string
Returns the version of the remotely available Grav
public isSymlink() : bool True if Grav is symlinked, False otherwise.
Checks if Grav is currently symbolically linked
public isUpgradable() : bool True if it's upgradable, False otherwise.
Checks if the currently installed Grav is upgradable to a newer version
public meetsRequirements() : bool
Make sure this meets minimum PHP requirements
public minPHPVersion() : string
Get minimum PHP version from remote


Class: \Grav\Common\GPM\Licenses

Class Licenses

Visibility Function
public static get(string/null $slug=null) : string[]/string
Returns the license for a Premium package
public static getLicenseFile() : \RocketTheme\Toolbox\File\FileInterface
Get the License File object
public static set(string $slug, string $license) : bool
Returns the license for a Premium package
public static validate(string/null $license=null) : bool
Validates the License format


Class: \Grav\Common\GPM\Installer

Class Installer

Visibility Function
public static copyInstall(string $source_path, string $install_path) : bool
public static getMessage() : string The message
Returns the last message added by the installer
public static install(string $zip, string $destination, array $options=array(), string/null $extracted=null, bool $keepExtracted=false) : bool True if everything went fine, False otherwise.
Installs a given package to a given destination.
public static isGravInstance(string $target) : bool True if is a Grav Instance. False otherwise
Validates if the given path is a Grav Instance
public static isValidDestination(string $destination, array $exclude=array()) : bool True if validation passed. False otherwise
Runs a set of checks on the destination and sets the Error if any
public static lastErrorCode() : int/string The code of the last error
Returns the last error code of the occurred error
public static lastErrorMsg() : string The message of the last error
Returns the last error occurred in a string message format
public static moveInstall(string $source_path, string $install_path) : bool
public static setError(int/string $error) : void
Allows to manually set an error
public static sophisticatedInstall(string $source_path, string $install_path, array $ignores=array(), bool $keep_source=false) : bool
public static unZip(string $zip_file, string $destination) : string/false
Unzip a file to somewhere
public static uninstall(string $path, array $options=array()) : bool True if everything went fine, False otherwise.
Uninstalls one or more given package


Class: \Grav\Common\GPM\GPM

Class GPM

Visibility Function
public __construct(bool $refresh=false, callable/null $callback=null) : void
Creates a new GPM instance with Local and Remote packages available
public __get(string $offset) : mixed Asset value
Magic getter method
public __isset(string $offset) : bool True if the value is set
Magic method to determine if the attribute is set
public calculateMergedDependenciesOfPackages(array $packages) : array
Calculates and merges the dependencies of the passed packages
public calculateVersionNumberFromDependencyVersion(string $version) : string/null
Returns the actual version from a dependency version string. Examples: $versionInformation == '~2.0' => returns '2.0' $versionInformation == '>=2.0.2' => returns '2.0.2' $versionInformation == '2.0.2' => returns '2.0.2' $versionInformation == '*' => returns null $versionInformation == '' => returns null
public checkNextSignificantReleasesAreCompatible(string $version1, string $version2) : bool
Check if two releases are compatible by next significant release ~1.2 is equivalent to >=1.2 <2.0.0 ~1.2.3 is equivalent to >=1.2.3 <1.3.0 In short, allows the last digit specified to go up
public checkNoOtherPackageNeedsTheseDependenciesInALowerVersion(array $dependencies_slugs) : void
public checkNoOtherPackageNeedsThisDependencyInALowerVersion(string $slug, string $version_with_operator, array $ignore_packages_list) : bool
Check the package identified by $slug can be updated to the version passed as argument. Thrown an exception if it cannot be updated because another package installed requires it to be at an older version.
public checkPackagesCanBeInstalled(array $packages_names_list) : void
Check the passed packages list can be updated
public static copyPackage(string $package_file, string $tmp) : string/null
Copy the local zip package to tmp
public countInstalled() : int Amount of installed packages
Returns the amount of locally installed packages
public countUpdates() : int Amount of available updates
Returns the amount of updates available
public static downloadPackage(string $package_file, string $tmp) : string/null
Download the zip package via the URL
public findPackage(string $search, bool $ignore_exception=false) : \Grav\Common\GPM\Remote\Package/false Package if found, FALSE if not
Searches for a Package in the repository
public findPackages(array $searches=array()) : array Array of found Packages Format: ['total' => int, 'not_found' => array, ]
Searches for a list of Packages in the repository
public static getBlueprints(string $source) : array/false
Find/Parse the blueprint file
public getDependencies(array $packages) : array
Fetch the dependencies, check the installed packages and return an array with the list of packages with associated an information on what to do: install, update or ignore. ignore means the package is already installed and can be safely left as-is. install means the package is not installed and must be installed. update means the package is already installed and must be updated as a dependency needs a higher version.
public getGrav() : \Grav\Common\GPM\Remote\GravCore/null
Returns Grav version available in the repository
public static getInstallPath(string $type, string $name) : string
Get the install path for a name and a particular type of package
public getInstallable(array $list_type_installed=array()) : array The installed packages
Returns the Locally installable packages
public getInstalled() : \Grav\Common\GPM\Local\Packages
Return the locally installed packages
public getInstalledPackage(string $slug) : \Grav\Common\GPM\Local\Package/null The instance of the Package
Return the instance of a specific Package
public getInstalledPlugin(string $slug) : \Grav\Common\GPM\Local\Package/null The instance of the Plugin
Return the instance of a specific Plugin
public getInstalledPlugins() : Iterator The installed plugins
Returns the Locally installed plugins
public getInstalledTheme(string $slug) : \Grav\Common\GPM\Local\Package/null The instance of the Theme
Return the instance of a specific Theme
public getInstalledThemes() : Iterator The installed themes
Returns the Locally installed themes
public getLatestVersionOfPackage(string $package_name) : string/null
Get the latest release of a package from the GPM
public static getPackageName(string $source) : string/false
Try to guess the package name from the source files
public static getPackageType(string $source) : string/false
Try to guess the package type from the source files
public getPackagesThatDependOnPackage(string $slug) : array
Return the list of packages that have the passed one as dependency
public getReleaseType(string $package_name) : string/null
Get the release type of a package (stable / testing)
public getRepository() : \Grav\Common\GPM\Remote\Packages/null Available Plugins and Themes Format: ['plugins' => array, 'themes' => array]
Returns the list of Plugins and Themes available in the repository
public getRepositoryPlugin(string $slug) : \Grav\Common\GPM\Remote\Package/null Package if found, NULL if not
Returns a Plugin from the repository
public getRepositoryPlugins() : \Grav\Common\GPM\Iterator/null The Plugins remotely available
Returns the list of Plugins available in the repository
public getRepositoryTheme(string $slug) : \Grav\Common\GPM\Remote\Package/null Package if found, NULL if not
Returns a Theme from the repository
public getRepositoryThemes() : \Grav\Common\GPM\Iterator/null The Themes remotely available
Returns the list of Themes available in the repository
public getUpdatable(array $list_type_update=array()) : array Array of updatable Plugins and Themes. Format: ['total' => int, 'plugins' => array, 'themes' => array]
Returns an array of Plugins and Themes that can be updated. Plugins and Themes are extended with the available property that relies to the remote version
public getUpdatablePlugins() : array Array of updatable Plugins
Returns an array of Plugins that can be updated. The Plugins are extended with the available property that relies to the remote version
public getUpdatableThemes() : array Array of updatable Themes
Returns an array of Themes that can be updated. The Themes are extended with the available property that relies to the remote version
public getVersionOfDependencyRequiredByPackage(string $package_slug, string $dependency_slug) : mixed/null
Get the required version of a dependency of a package
public isPluginEnabled(string $slug) : bool True if the Plugin is Enabled. False if manually set to enable:false. Null otherwise.
Returns the plugin's enabled state
public isPluginInstalled(string $slug) : bool True if the Plugin has been installed. False otherwise
Checks if a Plugin is installed
public isPluginInstalledAsSymlink(string $slug) : bool
public isPluginUpdatable(string $plugin) : bool True if the Plugin is updatable. False otherwise
Checks if a Plugin is updatable
public isStableRelease(string $package_name) : bool
Returns true if the package latest release is stable
public isTestingRelease(string $package_name) : bool
Returns true if the package latest release is testing
public isThemeEnabled(string $slug) : bool True if the Theme has been set to the default theme. False if installed, but not enabled. Null otherwise.
Checks if a Theme is enabled
public isThemeInstalled(string $slug) : bool True if the Theme has been installed. False otherwise
Checks if a Theme is installed
public isThemeUpdatable(string $theme) : bool True if the Theme is updatable. False otherwise
Checks if a Theme is Updatable
public isUpdatable(string $slug) : bool True if updatable. False otherwise or if not found
Check if a Plugin or Theme is updatable
public versionFormatIsEqualOrHigher(string $version) : bool
Check if the passed version information contains equal or higher operator Example: returns true for $version: '>=2.0'
public versionFormatIsNextSignificantRelease(string $version) : bool
Check if the passed version information contains next significant release (tilde) operator Example: returns true for $version: '~2.0'
protected isRemotePackagePublished(object/array $package) : bool
Determine whether a remote package is marked as published. Remote package metadata introduced a published flag to hide releases that are not yet public. Older repository payloads may omit the key, so we default to treating packages as published unless the flag is explicitly set to false.

This class extends \Grav\Common\Iterator

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Common\AbstractPackageCollection (abstract)

Class AbstractPackageCollection

Visibility Function
public toArray() : array
public toJson() : string

This class extends \Grav\Common\Iterator

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Common\Package

Visibility Function
public __construct(\Grav\Common\Data\Data $package, string/null $type=null) : void
Package constructor.
public __get(string $key) : mixed
public __isset(string $key) : bool
public __set(string $key, mixed $value) : void
public __toString() : string
public getData() : \Grav\Common\Data\Data
public toArray() : array
public toJson() : string

This class implements \Stringable


Class: \Grav\Common\GPM\Common\CachedCollection

Class CachedCollection

Visibility Function
public __construct(array $items) : void
CachedCollection constructor.

This class extends \Grav\Common\Iterator

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Local\AbstractPackageCollection (abstract)

Class AbstractPackageCollection

Visibility Function
public __construct(array $items) : void
AbstractPackageCollection constructor.

This class extends \Grav\Common\GPM\Common\AbstractPackageCollection

This class implements \ArrayAccess, \Iterator, \Countable, \Serializable, \Stringable, \Traversable


Class: \Grav\Common\GPM\Local\Package

Class Package

Visibility Function
public __construct(\Grav\Common\Data\Data $package, string/null $package_type=null) : void
Package constructor.
public isEnabled() : bool

This class extends \Grav\Common\GPM\Common\Package

This class implements \Stringable


Class: \Grav\Common\GPM\Local\Themes

Class Themes

Visibility Function
public __construct() : void
Local Themes Constructor

This class extends \Grav\Common\GPM\Local\AbstractPackageCollection

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Local\Plugins

Class Plugins

Visibility Function
public __construct() : void
Local Plugins Constructor

This class extends \Grav\Common\GPM\Local\AbstractPackageCollection

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Local\Packages

Class Packages

Visibility Function
public __construct() : void

This class extends \Grav\Common\GPM\Common\CachedCollection

This class implements \ArrayAccess, \Iterator, \Countable, \Serializable, \Stringable, \Traversable


Class: \Grav\Common\GPM\Remote\AbstractPackageCollection

Class AbstractPackageCollection

Visibility Function
public __construct(string/null $repository=null, bool $refresh=false, callable/null $callback=null) : void
AbstractPackageCollection constructor.
public fetch(bool $refresh=false, callable/null $callback=null) : string

This class extends \Grav\Common\GPM\Common\AbstractPackageCollection

This class implements \ArrayAccess, \Iterator, \Countable, \Serializable, \Stringable, \Traversable


Class: \Grav\Common\GPM\Remote\Package

Class Package

Visibility Function
public __construct(array $package, string/null $package_type=null) : void
Package constructor.
public getChangelog(string/null $diff=null) : array changelog list for each version
Returns the changelog list for each version of a package
public jsonSerialize() : array

This class extends \Grav\Common\GPM\Common\Package

This class implements \Stringable, \JsonSerializable


Class: \Grav\Common\GPM\Remote\Themes

Class Themes

Visibility Function
public __construct(bool $refresh=false, callable/null $callback=null) : void
Local Themes Constructor

This class extends \Grav\Common\GPM\Remote\AbstractPackageCollection

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Remote\Plugins

Class Plugins

Visibility Function
public __construct(bool $refresh=false, callable/null $callback=null) : void
Local Plugins Constructor

This class extends \Grav\Common\GPM\Remote\AbstractPackageCollection

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Remote\Packages

Class Packages

Visibility Function
public __construct(bool $refresh=false, callable/null $callback=null) : void
Packages constructor.

This class extends \Grav\Common\GPM\Common\CachedCollection

This class implements \ArrayAccess, \Iterator, \Countable, \Serializable, \Stringable, \Traversable


Class: \Grav\Common\GPM\Remote\GravCore

Class GravCore

Visibility Function
public __construct(bool $refresh=false, callable/null $callback=null) : void
public getAssets() : array list of assets
Returns the list of assets associated to the latest version of Grav
public getChangelog(string/null $diff=null) : array changelog list for each version
Returns the changelog list for each version of Grav
public getDate() : string
Return the release date of the latest Grav
public getMinPHPVersion() : string
Returns the minimum PHP version
public getVersion() : string
Returns the latest version of Grav available remotely
public isSymlink() : bool
Is this installation symlinked?
public isUpdatable() : mixed
Determine if this version of Grav is eligible to be updated

This class extends \Grav\Common\GPM\Remote\AbstractPackageCollection

This class implements \Traversable, \Stringable, \Serializable, \Countable, \Iterator, \ArrayAccess


Class: \Grav\Common\HTTP\Response

Class Response

Visibility Function
public static get(string $uri='', array $overrides=array(), callable/null/callable $callback=null) : string
Backwards compatible helper method
public static isRemote(string $file) : bool
Is this a remote file or not
public static request(string $method, string $uri, array $overrides=array(), callable/null/callable $callback=null) : \Symfony\Contracts\HttpClient\ResponseInterface
Makes a request to the URL by using the preferred method


Class: \Grav\Common\HTTP\Client

Visibility Function
public static getClient(array $overrides=array(), int $connections=6, callable $callback=null) : mixed
public static getOptions() : \Symfony\Component\HttpClient\HttpOptions
Get HTTP Options
public static progress(int $bytes_transferred, int $filesize, array $info) : void
Progress normalized for cURL and Fopen Accepts a variable length of arguments passed in by stream method


Class: \Grav\Common\Helpers\YamlLinter

Class YamlLinter

Visibility Function
public static lint(string/null/string $folder=null, callable/null/callable $callback=null, bool $strict=false) : array
public static lintBlueprints(callable/null/callable $callback=null, bool $strict=false) : array
public static lintConfig(callable/null/callable $callback=null, bool $strict=false) : array
public static lintEnvironments(callable/null/callable $callback=null, bool $strict=false) : array
public static lintPages(callable/null/callable $callback=null, bool $strict=false) : array
public static recurseFolder(string $path, string $extensions='(md|yaml)', callable/null/callable $callback=null, bool $strict=false) : array
protected static extractYaml(string $path) : string


Class: \Grav\Common\Helpers\Excerpts

Class Excerpts

Visibility Function
public static getExcerptFromHtml(string $html, string $tag) : array/null returns nested array excerpt
Get an Excerpt array from a chunk of HTML
public static getHtmlFromExcerpt(array $excerpt) : string
Rebuild HTML tag from an excerpt array
public static processImageExcerpt(array $excerpt, \Grav\Common\Helpers\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $page=null) : array
Process an image excerpt
public static processImageHtml(string $html, \Grav\Common\Helpers\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $page=null) : string Returns final HTML string
Process Grav image media URL from HTML tag
public static processLinkExcerpt(array $excerpt, \Grav\Common\Helpers\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $page=null, string $type='link') : mixed
Process a Link excerpt
public static processLinkHtml(string $html, \Grav\Common\Helpers\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $page=null) : string Returns final HTML string
Process Grav page link URL from HTML tag
public static processMediaActions(\Grav\Common\Helpers\Medium $medium, string/array $url, \Grav\Common\Helpers\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $page=null) : \Grav\Common\Helpers\Medium/\Grav\Common\Helpers\Link
Process media actions


Class: \Grav\Common\Helpers\Base32

Class Base32

Visibility Function
public static decode(string $base32) : string
Decode in Base32
public static encode(string $bytes) : string
Encode in Base32


Class: \Grav\Common\Helpers\Truncator

This file is part of https://github.com/Bluetel-Solutions/twig-truncate-extension Copyright (c) 2015 Bluetel Solutions [email protected] Copyright (c) 2015 Alex Wilson [email protected] For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

Visibility Function
public static htmlToDomDocument(string $html) : DOMDocument Returns a DOMDocument object.
Builds a DOMDocument object from a string containing HTML.
public truncate(string $text, int $length=100, string $ending='...', bool $exact=false, bool $considerHtml=true) : string
public static truncateLetters(string $html, int $limit, string $ellipsis='') : string Safe truncated HTML.
Safely truncates HTML by a given number of letters.
public static truncateWords(string $html, int $limit, string $ellipsis='') : string Safe truncated HTML.
Safely truncates HTML by a given number of words.


Class: \Grav\Common\Helpers\LogViewer

Class LogViewer

Visibility Function
public static levelColor(string $level) : string
Helper class to get level color
public objectTail(string $filepath, int $lines=1, bool $desc=true) : array
Get the objects of a tailed file
public parse(string $line) : array
Parse a monolog row into array bits
public static parseTrace(string $trace, int $rows=10) : array
Parse text of trace into an array of lines
public tail(string $filepath, int $lines=1) : string/false
Optimized way to get just the last few entries of a log file


Class: \Grav\Common\Helpers\Exif

Class Exif

Visibility Function
public __construct() : void
Exif constructor.
public getReader() : \PHPExif\Reader\Reader


Class: \Grav\Common\Language\Language

Class Language

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Constructor
public __debugInfo() : array
public enabled() : bool
Ensure that languages are enabled
public getActive() : string/false
Gets current active language
public getAvailable(string/null $delimiter=null) : string
Gets a pipe-separated string of available languages
public getBrowserLanguages(array $accept_langs=array()) : array
DEPRECATED - 1.6 No longer used - using content negotiation.
public getDefault() : string/false
Gets current default language
public getFallbackLanguages(string/null/string $languageCode=null, bool $includeDefault=false) : array
Gets an array of languages with active first, then fallback languages.
public getFallbackPageExtensions(string/null/string $fileExtension=null, string/null/string $languageCode=null, bool $assoc=false) : array Key is the language code, value is the file extension to be used.
Gets an array of valid extensions with active first, then fallback extensions
public getLanguage() : string/false
Gets language, active if set, else default
public getLanguageCode(string $code, string $type='name') : string/false
Accessible wrapper to LanguageCodes
public getLanguageURLPrefix(string/null $lang=null) : string
Get a URL prefix based on configuration
public getLanguages() : array
Gets the array of supported languages
public getPageExtensions(string/null $fileExtension=null) : array
Get full list of used language page extensions: [''=>'.md', 'en'=>'.en.md', ...]
public getTranslation(string $lang, string $key, bool $array_support=false) : string/string[]
Lookup the translation text for a given lang and key
public init() : void
Initialize the default and enabled languages
public isDebug() : bool
Returns true if language debugging is turned on.
public isIncludeDefaultLanguage(string/null $lang=null) : bool
Test to see if language is default and language should be included in the URL
public isLanguageInUrl() : bool
Simple getter to tell if a language was found in the URL
public resetFallbackPageExtensions() : void
Resets the fallback_languages value. Useful to re-initialize the pages and change site language at runtime, example: $this->grav['language']->setActive('it'); $this->grav['language']->resetFallbackPageExtensions(); $this->grav['pages']->init();
public setActive(string/false $lang) : string/false
Sets active language manually
public setActiveFromUri(string $uri) : string
Sets the active language based on the first part of the URL
public setDefault(string $lang) : string/bool
Sets default language manually
public setLanguages(array $langs) : void
Sets the current supported languages manually
public translate(string/array $args, array/null/array $languages=null, bool $array_support=false, bool $html_out=false) : string/string[]
Translate a key and possibly arguments into a string using current lang and fallbacks Other arguments can be passed and replaced in the translation with sprintf syntax
public translateArray(string $key, string $index, array/null $languages=null, bool $html_out=false) : string
Translate Array
public validate(string $lang) : bool
Ensures the language is valid and supported
protected getTranslatedLanguages() : array


Class: \Grav\Common\Language\LanguageCodes

Class LanguageCodes

Visibility Function
public static get(string $code, string $type) : string/false
public static getList(bool $native=true) : array
public static getName(string $code) : string/false
public static getNames(array $keys) : array
public static getNativeName(string $code) : string/false
public static getOrientation(string $code) : string
public static isRtl(string $code) : bool


Class: \Grav\Common\Markdown\Parsedown

Class Parsedown

Visibility Function
public __call(string $method, array $args) : mixed/null
For extending this class via plugins
public __construct(\Grav\Common\Markdown\Excerpts/\Grav\Common\Markdown\PageInterface/null $excerpts=null, array/null $defaults=null) : void
Parsedown constructor.
public __set(mixed $name, mixed $value) : void
public addBlockType(string $type, string $tag, bool $continuable=false, bool $completable=false, int/null $index=null) : void
Be able to define a new Block type or override an existing one
public addInlineType(string $type, string $tag, int/null $index=null) : void
Be able to define a new Inline type or override an existing one
public elementToHtml(array $Element) : string markup
Make the element function publicly accessible, Medium uses this to render from Twig
public getExcerpts() : \Grav\Common\Page\Markdown\Excerpts
public setSpecialChars(array $special_chars) : \Grav\Common\Markdown\$this
Setter for special chars
protected blockTwigTag(array $line) : array/null
Ensure Twig tags are treated as block level items with no

tags
protected init(\Grav\Common\Markdown\PageInterface/\Grav\Common\Markdown\Excerpts/null $excerpts=null, array/null $defaults=null) : void
Initialization function to setup key variables needed by the MarkdownGravLinkTrait
protected inlineImage(array $excerpt) : array
protected inlineLink(array $excerpt) : array
protected inlineSpecialCharacter(array $excerpt) : array/null
protected isBlockCompletable(string $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be completable
protected isBlockContinuable(string $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be continuable

This class extends \Parsedown


Class: \Grav\Common\Markdown\ParsedownExtra

Class ParsedownExtra

Visibility Function
public __call(string $method, array $args) : mixed/null
For extending this class via plugins
public __construct(\Grav\Common\Markdown\Excerpts/\Grav\Common\Markdown\PageInterface/null $excerpts=null, array/null $defaults=null) : void
ParsedownExtra constructor.
public __set(mixed $name, mixed $value) : void
public addBlockType(string $type, string $tag, bool $continuable=false, bool $completable=false, int/null $index=null) : void
Be able to define a new Block type or override an existing one
public addInlineType(string $type, string $tag, int/null $index=null) : void
Be able to define a new Inline type or override an existing one
public elementToHtml(array $Element) : string markup
Make the element function publicly accessible, Medium uses this to render from Twig
public getExcerpts() : \Grav\Common\Page\Markdown\Excerpts
public setSpecialChars(array $special_chars) : \Grav\Common\Markdown\$this
Setter for special chars
protected blockTwigTag(array $line) : array/null
Ensure Twig tags are treated as block level items with no

tags
protected init(\Grav\Common\Markdown\PageInterface/\Grav\Common\Markdown\Excerpts/null $excerpts=null, array/null $defaults=null) : void
Initialization function to setup key variables needed by the MarkdownGravLinkTrait
protected inlineImage(array $excerpt) : array
protected inlineLink(array $excerpt) : array
protected inlineSpecialCharacter(array $excerpt) : array/null
protected isBlockCompletable(string $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be completable
protected isBlockContinuable(string $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be continuable

This class extends \ParsedownExtra


Interface: \Grav\Common\Media\Interfaces\ImageManipulateInterface

Class implements image manipulation interface.

Visibility Function
public cache() : \Grav\Common\Media\Interfaces\$this
Simply processes with no extra methods. Useful for triggering events.
public clearAlternatives() : void
Clear out the alternatives.
public derivatives(int/int[] $min_width, int $max_width=2500, int $step=200) : \Grav\Common\Media\Interfaces\$this
Generate alternative image widths, using either an array of integers, or a min width, a max width, and a step parameter to fill out the necessary widths. Existing image alternatives won't be overwritten.
public format(string $format) : \Grav\Common\Media\Interfaces\$this
Sets image output format.
public getImagePrettyName() : string
public height(string/string/int $value='auto') : \Grav\Common\Media\Interfaces\$this
Allows to set the height attribute from Markdown or Twig Examples: Example Example Example Example {{ page.media['myimg.png'].width().height().html }} {{ page.media['myimg.png'].resize(100,200).width(100).height(200).html }}
public higherQualityAlternative() : ImageMediaInterface the alternative version with higher quality
Return the image higher quality version
public quality(int/null $quality=null) : int/\Grav\Common\Media\Interfaces\$this
Sets or gets the quality of the image
public setImagePrettyName(string $name) : void
Allows the ability to override the image's pretty name stored in cache
public sizes(string/null $sizes=null) : string
Set or get sizes parameter for srcset media action
public width(string/string/int $value='auto') : \Grav\Common\Media\Interfaces\$this
Allows to set the width attribute from Markdown or Twig Examples: Example Example Example Example {{ page.media['myimg.png'].width().height().html }} {{ page.media['myimg.png'].resize(100,200).width(100).height(200).html }}


Interface: \Grav\Common\Media\Interfaces\MediaObjectInterface

Class implements media object interface.

Visibility Function
public __call(string $method, mixed $args) : \Grav\Common\Media\Interfaces\$this
Allow any action to be called on this medium from twig or markdown
public __toString() : string
Return string representation of the object (html).
public addAlternative(int/float $ratio, \Grav\Common\Media\Interfaces\MediaObjectInterface $alternative) : void
Add alternative Medium to this Medium.
public addMetaFile(string $filepath) : void
Add meta file for the medium.
public attribute(string $attribute=null, string $value='') : \Grav\Common\Media\Interfaces\$this
Add custom attribute to medium.
public classes() : \Grav\Common\Media\Interfaces\$this
Add a class to the element from Markdown or Twig Example: Example or Example
public copy() : \Grav\Common\Media\Interfaces\static
Create a copy of this media object
public display(string $mode='source') : \Grav\Common\Media\Interfaces\MediaObjectInterface/null
Switch display mode.
public getAlternatives(bool $withDerived=true) : array
Get list of image alternatives. Includes the current media image as well.
public id(string $id) : \Grav\Common\Media\Interfaces\$this
Add an id to the element from Markdown or Twig Example: Example
public lightbox(int $width=null, int $height=null, bool $reset=true) : \Grav\Common\Media\Interfaces\MediaLinkInterface
Turn the current Medium into a Link with lightbox enabled
public link(bool $reset=true, array $attributes=array()) : \Grav\Common\Media\Interfaces\MediaLinkInterface
Turn the current Medium into a Link
public meta() : \Grav\Common\Data\Data
Return just metadata from the Medium object
public metadata() : array
Returns an array containing just the metadata
public parsedownElement(string/null $title=null, string/null $alt=null, string/null $class=null, string/null $id=null, bool $reset=true) : array
Get an element (is array) that can be rendered by the Parsedown engine
public querystring(string/null $querystring=null, bool $withQuestionmark=true) : string
Get/set querystring for the file's url
public reset() : \Grav\Common\Media\Interfaces\$this
Reset medium.
public set(string $name, mixed $value, string/null $separator=null) : \Grav\Common\Media\Interfaces\$this
Set value by using dot notation for nested arrays/objects.
public setTimestamp(string/int/null $timestamp=null) : \Grav\Common\Media\Interfaces\$this
Set querystring to file modification timestamp (or value provided as a parameter).
public style(string $style) : \Grav\Common\Media\Interfaces\$this
Allows to add an inline style attribute from Markdown or Twig Example: Example
public thumbnail(string $type='auto') : \Grav\Common\Media\Interfaces\$this
Switch thumbnail.
public thumbnailExists(string $type='page') : bool
Helper method to determine if this media item has a thumbnail or not
public urlHash(string/null $hash=null, bool $withHash=true) : string
Get/set hash for the file's url
public urlQuerystring(string $url) : string
Get the URL with full querystring
Examples of MediaObjectInterface::set()
TXT
$data->set('this.is.my.nested.variable', $value);

This class implements \Grav\Framework\Media\Interfaces\MediaObjectInterface, \ArrayAccess, \Stringable


Interface: \Grav\Common\Media\Interfaces\MediaLinkInterface

Class implements media file interface.

Visibility Function


Interface: \Grav\Common\Media\Interfaces\ImageMediaInterface

Class implements image media interface.

Visibility Function

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Stringable, \ArrayAccess, \Grav\Framework\Media\Interfaces\MediaObjectInterface


Interface: \Grav\Common\Media\Interfaces\MediaFileInterface

Class implements media file interface.

Visibility Function
public exists() : bool
Check if this medium exists or not
public modified() : int/null
Get file modification time for the medium.
public path(bool $reset=true) : string path to file
Return the path to file.
public relativePath(bool $reset=true) : mixed
Return the relative path to file
public size() : int
Get size of the medium.

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Stringable, \ArrayAccess, \Grav\Framework\Media\Interfaces\MediaObjectInterface


Interface: \Grav\Common\Media\Interfaces\MediaInterface

Class implements media interface.

Visibility Function

This class implements \Grav\Framework\Media\Interfaces\MediaInterface


Interface: \Grav\Common\Media\Interfaces\VideoMediaInterface

Class implements video media interface.

Visibility Function
public playsinline(bool $status=false) : \Grav\Common\Media\Interfaces\$this
Allows to set the playsinline attribute
public poster(string $urlImage) : \Grav\Common\Media\Interfaces\$this
Allows to set the video's poster image

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaPlayerInterface, \Stringable, \ArrayAccess, \Grav\Framework\Media\Interfaces\MediaObjectInterface


Interface: \Grav\Common\Media\Interfaces\AudioMediaInterface

Class implements audio media interface.

Visibility Function
public controlsList(string $controlsList) : \Grav\Common\Media\Interfaces\$this
Allows to set the controlsList behaviour Separate multiple values with a hyphen

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaPlayerInterface, \Stringable, \ArrayAccess, \Grav\Framework\Media\Interfaces\MediaObjectInterface


Interface: \Grav\Common\Media\Interfaces\MediaCollectionInterface

Class implements media collection interface.

Visibility Function
public add(string $name, \Grav\Common\Media\Interfaces\MediaObjectInterface $file) : void
public all() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all media.
public audios() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all audio media.
public createFromArray(array $items=array(), \Grav\Common\Media\Interfaces\Blueprint/null/\Grav\Common\Data\Blueprint $blueprint=null) : \Grav\Common\Media\Interfaces\Medium/null
Create Medium from array of parameters
public createFromFile(string $file, array $params=array()) : \Grav\Common\Media\Interfaces\Medium/null
Create Medium from a file.
public files() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all file media.
public get(string $filename) : \Grav\Common\Media\Interfaces\Medium/null
Get medium by filename.
public getImageFileObject(\Grav\Common\Media\Interfaces\MediaObjectInterface $mediaObject) : \Grav\Common\Page\Medium\ImageFile
public getPath() : string/null
Return media path.
public images() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all image media.
public setPath(string/null/string $path) : void
public setTimestamps(string/int/null $timestamp=null) : \Grav\Common\Media\Interfaces\$this
Set file modification timestamps (query params) for all the media files.
public videos() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all video media.

This class implements \Grav\Framework\Media\Interfaces\MediaCollectionInterface, \Traversable, \Iterator, \Countable, \ArrayAccess


Interface: \Grav\Common\Media\Interfaces\MediaPlayerInterface

Class implements media player interface.

Visibility Function
public autoplay(bool $status=false) : \Grav\Common\Media\Interfaces\$this
Allows to set the autoplay attribute
public controls(bool $status=true) : \Grav\Common\Media\Interfaces\$this
Allows to set or remove the HTML5 default controls
public loop(bool $status=false) : \Grav\Common\Media\Interfaces\$this
Allows to set the loop attribute
public muted(bool $status=false) : \Grav\Common\Media\Interfaces\$this
Allows to set the muted attribute
public preload(string/null $preload=null) : \Grav\Common\Media\Interfaces\$this
Allows to set the preload behaviour

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Stringable, \ArrayAccess, \Grav\Framework\Media\Interfaces\MediaObjectInterface


Interface: \Grav\Common\Media\Interfaces\MediaUploadInterface

Implements media upload and delete functionality.

Visibility Function
public checkUploadedFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string/null/string $filename=null, array/null/array $settings=null) : string
Checks that uploaded file meets the requirements. Returns new filename.
public copyUploadedFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string $filename, array/null/array $settings=null) : void
Copy uploaded file to the media collection. WARNING: Always check uploaded file before copying it!
public deleteFile(string $filename, array/null/array $settings=null) : void
Delete real file from the media collection.
public renameFile(string $from, string $to, array/null/array $settings=null) : void
Rename file inside the media collection.
Examples of MediaUploadInterface::checkUploadedFile()
TXT
$filename = null;  // Override filename if needed (ignored if randomizing filenames).
  $settings = ['destination' => 'user://pages/media']; // Settings from the form field.
  $filename = $media->checkUploadedFile($uploadedFile, $filename, $settings);
  $media->copyUploadedFile($uploadedFile, $filename);
Examples of MediaUploadInterface::copyUploadedFile()
TXT
$filename = null;  // Override filename if needed (ignored if randomizing filenames).
  $settings = ['destination' => 'user://pages/media']; // Settings from the form field.
  $filename = $media->checkUploadedFile($uploadedFile, $filename, $settings);
  $media->copyUploadedFile($uploadedFile, $filename);


Class: \Grav\Common\Page\Header

Class Header

Visibility Function
public __construct(array $items=array()) : void
Constructor to initialize array.
public __get(string $offset) : mixed Asset value
Magic getter method
public __isset(string $offset) : bool True if the value is set
Magic method to determine if the attribute is set
public __set(string $offset, mixed $value) : void
Magic setter method
public __unset(string $offset) : void
Magic method to unset the attribute
public def(string $name, mixed $default=null, string/null $separator=null) : \Grav\Common\Page\$this
Set default value by using dot notation for nested arrays/objects.
public get(string $name, mixed $default=null, string/null $separator=null) : mixed Value.
Get value by using dot notation for nested arrays/objects.
public jsonSerialize() : array
public offsetExists(string $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(string $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(string/null $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(string/null $offset) : void
Unsets variable at specified offset.
public set(string $name, mixed $value, string/null $separator=null) : \Grav\Common\Page\$this
Set value by using dot notation for nested arrays/objects.
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public undef(string $name, string/null $separator=null) : \Grav\Common\Page\$this
Unset value by using dot notation for nested arrays/objects.
Examples of Header::def()
TXT
$data->def('this.is.my.nested.variable', 'default');
Examples of Header::get()
TXT
$value = $this->get('this.is.my.nested.variable');
Examples of Header::set()
TXT
$data->set('this.is.my.nested.variable', $value);
Examples of Header::undef()
TXT
$data->undef('this.is.my.nested.variable');

This class implements \ArrayAccess, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable


Class: \Grav\Common\Page\Collection

Class Collection

Visibility Function
public __construct(array $items=array(), array $params=array(), \Grav\Common\Page\Pages/null/\Grav\Common\Page\Pages $pages=null) : void
Collection constructor.
public add(string $path, string $slug) : \Grav\Common\Page\$this
Add a page with path and slug
public addPage(\Grav\Common\Page\Interfaces\PageInterface $page) : \Grav\Common\Page\$this
Add a single page to a collection
public adjacentSibling(string $path, int $direction=1) : \Grav\Common\Page\PageInterface/Collection The sibling item.
Returns the adjacent sibling based on a direction.
public batch(int $size) : \Grav\Common\Page\Collection[]
Split collection into array of smaller collections.
public copy() : \Grav\Common\Page\static
Create a copy of this collection
public current() : \Grav\Common\Page\Interfaces\PageInterface
Returns current page.
public currentPosition(string $path) : int/null The index of the current page, null if not found.
Returns the item in the current position.
public dateRange(string/null $startDate=null, string/null $endDate=null, string/null $field=null) : \Grav\Common\Page\$this
Returns the items between a set of date ranges of either the page date field (default) or an arbitrary datetime page field where start date and end date are optional Dates must be passed in as text that strtotime() can process http://php.net/manual/en/function.strtotime.php
public intersect(\Grav\Common\Page\Interfaces\PageCollectionInterface $collection) : \Grav\Common\Page\$this
Intersect another collection with the current collection
public isFirst(string $path) : bool True if item is first.
Check to see if this item is the first in the collection.
public isLast(string $path) : bool True if item is last.
Check to see if this item is the last in the collection.
public key() : mixed
Returns current slug.
public merge(\Grav\Common\Page\Interfaces\PageCollectionInterface $collection) : \Grav\Common\Page\$this
Merge another collection with the current collection
public modular() : Collection The collection with only modules
Alias of modules()
public modules() : Collection The collection with only modules
Creates new collection with only modules
public nextSibling(string $path) : PageInterface The next item.
Gets the next sibling based on current position.
public nonModular() : Collection The collection with only non-module pages
Alias of pages()
public nonPublished() : Collection The collection with only non-published pages
Creates new collection with only non-published pages
public nonRoutable() : Collection The collection with only non-routable pages
Creates new collection with only non-routable pages
public nonTranslated() : Collection The collection with only non-published pages
Creates new collection with only untranslated pages
public nonVisible() : Collection The collection with only non-visible pages
Creates new collection with only non-visible pages
public ofOneOfTheseAccessLevels(array $accessLevels) : Collection The collection
Creates new collection with only pages of one of the specified access levels
public ofOneOfTheseTypes(string[] $types) : Collection The collection
Creates new collection with only pages of one of the specified types
public ofType(string $type) : Collection The collection
Creates new collection with only pages of the specified type
public offsetGet(string $offset) : \Grav\Common\Page\PageInterface/null
Returns the value at specified offset.
public order(string $by, string $dir='asc', array/null $manual=null, string/null $sort_flags=null) : \Grav\Common\Page\$this
Reorder collection.
public pages() : Collection The collection with only pages
Creates new collection with only pages
public params() : array
Get the collection params
public prevSibling(string $path) : PageInterface The previous item.
Gets the previous sibling based on current position.
public published() : Collection The collection with only published pages
Creates new collection with only published pages
public remove(\Grav\Common\Page\PageInterface/string/null $key=null) : \Grav\Common\Page\$this
Remove item from the list.
public routable() : Collection The collection with only routable pages
Creates new collection with only routable pages
public setCurrent(string $path) : void
Set current page.
public setParams(array $params) : \Grav\Common\Page\$this
Set parameters to the Collection
public toExtendedArray() : array
Get the extended version of this Collection with each page keyed by route
public translated() : Collection The collection with only published pages
Creates new collection with only translated pages
public visible() : Collection The collection with only visible pages
Creates new collection with only visible pages

This class extends \Grav\Common\Iterator

This class implements \ArrayAccess, \Iterator, \Countable, \Serializable, \Stringable, \Traversable, \Grav\Common\Page\Interfaces\PageCollectionInterface


Class: \Grav\Common\Page\Types

Class Types

Visibility Function
public __construct(array $items=array()) : void
Constructor to initialize array.
public count() : int
Implements Countable interface.
public current() : mixed Can return any type.
Returns the current element.
public init() : void
public key() : string/null Returns key on success, or NULL on failure.
Returns the key of the current element.
public modularSelect() : array
public next() : void
Moves the current position to the next element.
public offsetExists(string/int $offset) : bool Returns TRUE on success or FALSE on failure.
Tests if an offset exists.
public offsetGet(string/int $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(string/int/null $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(string/int $offset) : void
Unsets an offset.
public pageSelect() : array
public register(string $type, \Grav\Common\Page\Blueprint/null $blueprint=null) : void
public rewind() : void
Rewinds back to the first element of the Iterator.
public scanBlueprints(string $uri) : void
public scanTemplates(string $uri) : void
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public valid() : bool Returns TRUE on success or FALSE on failure.
This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid.

This class implements \ArrayAccess, \Iterator, \Countable, \Traversable


Class: \Grav\Common\Page\Page

Class Page

Visibility Function
public __clone() : void
public __construct() : void
Page Object Constructor
public active() : bool True if it is active
Returns whether or not this page is the currently active page requested via the URL.
public activeChild() : bool True if active child exists
Returns whether or not this URI's URL contains the URL of the active page. Or in other words, is this page's URL in the current URL
public addContentMeta(string $name, mixed $value) : void
Add an entry to the page's contentMeta array
public addForms(array $new, bool $override=true) : \Grav\Common\Page\$this
Add forms to this page.
public adjacentSibling(int $direction=1) : \Grav\Common\Page\PageInterface/false the sibling page
Returns the adjacent sibling based on a direction.
public ancestor(bool/null $lookup=null) : PageInterface page you were looking for if it exists
Helper method to return an ancestor page.
public blueprintName() : string
Get the blueprint name for this page. Use the blueprint form field if set
public blueprints() : \Grav\Common\Data\Blueprint
Get blueprints for the page.
public cacheControl(string/null $var=null) : string/null
Gets and sets the cache-control property. If not set it will return the default value (null) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control for more details on valid options
public cachePageContent() : void
Fires the onPageContentProcessed event, and caches the page content using a unique ID for the page
public canonical(bool $include_lang=true) : string
Returns the canonical URL for a page
public childType() : string
Returns child page type.
public children() : \Grav\Common\Page\PageCollectionInterface/\Grav\Common\Page\Collection
Returns children of this page.
public collection(string/string/array $params='content', bool $pagination=true) : \Grav\Common\Page\PageCollectionInterface/\Grav\Common\Page\Collection
Get a collection of pages in the current context.
public content(string/null $var=null) : string Content
Gets and Sets the content based on content portion of the .md file
public contentMeta() : mixed
Get the contentMeta array and initialize content first if it's not already
public copy(\Grav\Common\Page\Interfaces\PageInterface $parent) : \Grav\Common\Page\$this
Prepare a copy from the page. Copies also everything that's under the current page. Returns a new Page object for the copy. You need to call $this->save() in order to perform the move.
public currentPosition() : int/null The index of the current page.
Returns the item in the current position.
public date(string/null $var=null) : int unix timestamp representation of the date
Gets and sets the date for this Page object. This is typically passed in via the page headers
public dateformat(string/null $var=null) : string string representation of a date format
Gets and sets the date format for this Page object. This is typically passed in via the page headers using typical PHP date string structure - http://php.net/manual/en/function.date.php
public debugger() : bool
Returns the state of the debugger override setting for this page
public eTag(bool/null $var=null) : bool show etag header
Gets and sets the option to show the etag header for the page.
public evaluate(string/array $value, bool $only_published=true) : \Grav\Common\Page\PageCollectionInterface/\Grav\Common\Page\Collection
public exists() : bool
Returns whether the page exists in the filesystem.
public expires(int/null $var=null) : int The expires value
Gets and sets the expires field. If not set will return the default
public extension(string/null $var=null) : string
Gets and sets the extension field.
public extra() : array
Get unknown header variables.
public file() : \Grav\Common\Page\CompiledMarkdownFile/null
Get file object to the page.
public filePath(string/null $var=null) : string/null the file path
Gets and sets the path to the .md file for this Page object.
public filePathClean() : string The relative file path
Gets the relative path to the .md file
public filter() : void
Filter page header from illegal contents.
public find(string $url, bool $all=false) : PageInterface page you were looking for if it exists
Helper method to return a page.
public folder(string/null $var=null) : string/null
Get/set the folder.
public folderExists() : bool
Returns whether or not the current folder exists
public forms() : array
Alias of $this->getForms();
public frontmatter(string/null $var=null) : string
Gets and Sets the page frontmatter
public getAction() : string/null The Action string.
Gets the action.
public getBlueprint(string $name='') : Blueprint Returns a Blueprint.
Returns the blueprint from the page.
public getCacheKey() : string
public getContentMeta(string/null $name=null) : mixed/null
Return the whole contentMeta array as it currently stands
public getForms() : array
Return all the forms which are associated to this page. Forms are returned as [name => blueprint, ...], where blueprint follows the regular form blueprint format.
public getMedia() : \Grav\Common\Page\MediaCollectionInterface/Media Representation of associated media.
Gets the associated media collection.
public getMediaFolder() : string/null
Get filesystem path to the associated media.
public getMediaOrder() : array Empty array means default ordering.
Get display order for the associated media.
public getMediaUri() : string/null
Get URI ot the associated media. Method will return null if path isn't URI.
public getOriginal() : PageInterface The original version of the page.
Gets the Page Unmodified (original) version of the page.
public getRawContent() : string the current page content
Needed by the onPageContentProcessed event to get the raw page content
public header(object/array/null $var=null) : \stdClass the current YAML configuration
Gets and Sets the header based on the YAML configuration at the top of the .md file
public home() : bool True if it is the homepage
Returns whether or not this page is the currently configured home page.
public httpHeaders() : array
public httpResponseCode() : int
public id(string/null $var=null) : string the identifier
Gets and sets the identifier for this Page object.
public inherited(string $field) : \Grav\Common\Page\Interfaces\PageInterface
Helper method to return an ancestor page to inherit from. The current page object is returned.
public inheritedField(string $field) : array
Helper method to return an ancestor field only to inherit from. The first occurrence of an ancestor field will be returned if at all.
public init(\SplFileInfo $file, string/null $extension=null) : \Grav\Common\Page\$this
Initializes the page instance variables based on a file
public initialize() : void
public isDir() : bool True if its a directory
Returns whether or not this Page object is a directory or a page.
public isFirst() : bool True if item is first.
Check to see if this item is the first in an array of sub-pages.
public isLast() : bool True if item is last
Check to see if this item is the last in an array of sub-pages.
public isModule() : bool
public isPage() : bool True if its a page with a .md file associated
Returns whether or not this Page object has a .md file associated with it or if its just a directory.
public language(string/null $var=null) : mixed
Get page language
public lastModified(bool/null $var=null) : bool show last_modified header
Gets and sets the option to show the last_modified header for the page.
public link(bool $include_host=false) : string the permalink
Gets the URL for a page - alias of url().
public maxCount(int/null $var=null) : int the maximum number of sub-pages
DEPRECATED - 1.6
public media(\Grav\Common\Page\Media/null $var=null) : Media Representation of associated media.
Gets and sets the associated media as found in the page folder.
public menu(string/null $var=null) : string the menu field for the page
Gets and sets the menu name for this Page. This is the text that can be used specifically for navigation. If no menu field is set, it will use the title()
public metadata(array/null $var=null) : array an Array of metadata values for the page
Function to merge page metadata tags and build an array of Metadata objects that can then be rendered in the page.
public modified(int/null $var=null) : int modified unix timestamp
Gets and sets the modified timestamp.
public modifyHeader(string $key, mixed $value) : void
Modify a header value directly
public modular(bool/null $var=null) : bool true if modular_twig
DEPRECATED - 1.7 Use ->isModule() or ->modularTwig() method instead.
public modularTwig(bool/null $var=null) : bool true if modular_twig
Gets and sets the modular_twig var that helps identify this page as a modular child page that will need twig processing handled differently from a regular page.
public move(\Grav\Common\Page\Interfaces\PageInterface $parent) : \Grav\Common\Page\$this
Prepare move page to new location. Moves also everything that's under the current page. You need to call $this->save() in order to perform the move.
public name(string/null $var=null) : string The name of this page.
Gets and sets the name field. If no name field is set, it will return 'default.md'.
public nextSibling() : PageInterface the next Page item
Gets the next sibling based on current position.
public order(int/null $var=null) : string/bool
Get/set order number of this page.
public orderBy(string/null $var=null) : string supported options include "default", "title", "date", and "folder"
DEPRECATED - 1.6
public orderDir(string/null $var=null) : string the order, either "asc" or "desc"
DEPRECATED - 1.6
public orderManual(string/null $var=null) : array
DEPRECATED - 1.6
public parent(\Grav\Common\Page\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $var=null) : \Grav\Common\Page\PageInterface/null the parent page object if it exists.
Gets and Sets the parent object for this page
public path(string/null $var=null) : string/null the path
Gets and sets the path to the folder where the .md for this Page object resides. This is equivalent to the filePath but without the filename.
public permalink() : string The permalink.
Gets the URL with host information, aka Permalink.
public prevSibling() : PageInterface the previous Page item
Gets the previous sibling based on current position.
public process(array/null $var=null) : array an Array of name value pairs where the name is the process and value is true or false
Gets and Sets the process setup for this Page. This is multi-dimensional array that consists of a simple array of arrays with the form array("markdown"=>true) for example
public publishDate(string/null $var=null) : int unix timestamp representation of the date
Gets and Sets the Page publish date
public published(bool/null $var=null) : bool true if the page is published
Gets and Sets whether or not this Page is considered published
public raw(string/null $var=null) : string Raw content string
Gets and Sets the raw data
public rawMarkdown(string/null $var=null) : string
Gets and Sets the Page raw content
public rawRoute(string/null $var=null) : null/string
Gets and Sets the page raw route
public redirect(string/null $var=null) : string/null
Gets the redirect set in the header.
public relativePagePath() : string
Returns the clean path to the page file
public resetMetadata() : void
Reset the metadata and pull from header again
public root() : bool True if it is the root
Returns whether or not this page is the root node of the pages tree.
public routable(bool/null $var=null) : bool true if the page is routable
Gets and Sets whether or not this Page is routable, ie you can reach it via a URL. The page must be routable and published
public route(string/null $var=null) : string/null The route for the Page.
Gets the route for the page based on the route headers if available, else from the parents route and the current Page's slug.
public routeAliases(array/null $var=null) : array The route aliases for the Page.
Gets the route aliases for the page based on page headers.
public routeCanonical(string/null $var=null) : bool/string
Gets the canonical route for this page if its set. If provided it will use that value, else if it's true it will use the default route.
public save(bool/bool/array $reorder=true) : void
Save page if there's a file assigned to it.
public setContentMeta(array $content_meta) : array
Sets the whole content meta array in one shot
public setRawContent(string/null $content) : void
Needed by the onPageContentProcessed event to set the raw page content
public setSummary(string $summary) : void
Sets the summary of the page
public shouldProcess(string $process) : bool whether or not the processing method is enabled for this Page
Gets the configured state of the processing method.
public slug(string/null $var=null) : string the slug
Gets and Sets the slug for the Page. The slug is used in the URL routing. If not set it uses the parent folder from the path
public ssl(bool/null $var=null) : bool
public summary(int/null $size=null, bool $textOnly=false) : string
Get the summary.
public taxonomy(array/null $var=null) : array an array of taxonomies
Gets and sets the taxonomy array which defines which taxonomies this page identifies itself with.
public template(string/null $var=null) : string the template name
Gets and sets the template field. This is used to find the correct Twig template file to render. If no field is set, it will return the name without the .md extension
public templateFormat(string/null $var=null) : string
Allows a page to override the output render format, usually the extension provided in the URL. (e.g. html, json, xml, etc).
public title(string/null $var=null) : string the title of the Page
Gets and sets the title for this Page. If no title is set, it will use the slug() to get a name
public toArray() : array
Convert page to an array.
public toJson() : string
Convert page to JSON encoded string.
public toYaml() : string
Convert page to YAML encoded string.
public topParent() : PageInterface The top parent page object.
Gets the top parent object for this page. Can return page itself.
public translated() : bool
public translatedLanguages(bool $onlyPublished=false) : array the page translated languages
Return an array with the routes of other translated languages
public unpublishDate(string/null $var=null) : int/null unix timestamp representation of the date
Gets and Sets the Page unpublish date
public unsetRouteSlug() : void
Helper method to clear the route out so it regenerates next time you use it
public untranslatedLanguages(bool $includeUnpublished=false) : array the page untranslated languages
Return an array listing untranslated languages available
public url(bool $include_host=false, bool $canonical=false, bool $include_base=true, bool $raw_route=false) : string The url.
Gets the url for the Page.
public urlExtension() : string The extension of this page. For example .html
Returns the page extension, got from the page url_extension config and falls back to the system config system.pages.append_url_extension.
public validate() : void
Validate page header.
public value(string $name, mixed $default=null) : mixed
Get value from a page variable (used mostly for creating edit forms).
public visible(bool/null $var=null) : bool true if the page is visible
Gets and Sets whether or not this Page is visible for navigation
protected adjustRouteCase(string $route) : string
protected cleanPath(string $path) : string the path
Cleans the path.
protected clearMediaCache() : void
Clear media cache.
protected doRelocation() : void
Moves or copies the page in filesystem.
protected doReorder(array/null $new_order) : void
Reorders all siblings according to a defined order
protected freeMedia() : void
protected getInheritedParams(string $field) : array
Method that contains shared logic for inherited() and inheritedField()
protected getMediaCache() : \Grav\Common\Page\CacheInterface
protected normalizeForm(array/null $form, string/null $name=null, array $rules=array()) : array/null
protected processFrontmatter() : void
protected processMarkdown(bool $keepTwig=false) : void
Process the Markdown content. Uses Parsedown or Parsedown Extra depending on configuration
protected setMedia(\Grav\Common\Page\MediaCollectionInterface/\Grav\Common\Page\Media/\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : \Grav\Common\Page\$this
Sets the associated media collection.
protected setPublishState() : void

This class implements \Grav\Common\Page\Interfaces\PageInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\Page\Interfaces\PageLegacyInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Common\Page\Interfaces\PageTranslateInterface, \Grav\Common\Page\Interfaces\PageRoutableInterface, \Grav\Common\Page\Interfaces\PageFormInterface, \Grav\Common\Page\Interfaces\PageContentInterface


Class: \Grav\Common\Page\Media

Class Media

Visibility Function
public __construct(string $path, array/null/array $media_order=null, bool $load=true) : void
public __wakeup() : void
Initialize static variables on unserialize.
public getRawRoute() : string/null Route to the page or null if media isn't for a page.
Return raw route to the page.
public getRoute() : string/null Route to the page or null if media isn't for a page.
Return page route.
public offsetExists(string $offset) : bool
public offsetGet(string $offset) : \Grav\Common\Page\MediaObjectInterface/null
public path() : string/null
DEPRECATED - 1.6 Use $this->getPath() instead.
protected init() : void
Initialize class.

This class extends \Grav\Common\Page\Medium\AbstractMedia

This class implements \Grav\Framework\Media\Interfaces\MediaCollectionInterface, \Traversable, \Iterator, \Countable, \ArrayAccess, \Grav\Common\Media\Interfaces\MediaUploadInterface, \Grav\Common\Media\Interfaces\MediaCollectionInterface, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Page\Pages

Class Pages

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Constructor
public accessLevels() : array
Get access levels of the site pages
public addPage(\Grav\Common\Page\Interfaces\PageInterface $page, string/null $route=null) : void
Adds a page and assigns a route to it.
public all(\Grav\Common\Page\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $current=null) : \Grav\Common\Page\Collection
Get all pages
public ancestor(string $route, string/null $path=null) : \Grav\Common\Page\PageInterface/null
Get a page ancestor.
public base(string/null $path=null) : string
Get or set base path for the pages.
public baseRoute(string/null $lang=null) : string
Get base route for Grav pages.
public baseUrl(string/null $lang=null, bool/null $absolute=null) : string
Get base URL for Grav pages.
public blueprints(string $type) : \Grav\Common\Data\Blueprint
Get a blueprint for a page type.
public children(string $path) : \Grav\Common\Page\Collection
Get children of the path.
public disablePages() : void
Method used in admin to disable frontend pages from being initialized.
public dispatch(string $route, bool $all=false, bool $redirect=true) : \Grav\Common\Page\PageInterface/null
Dispatch URI to a page.
public enablePages() : void
Method used in admin to later load frontend pages.
public find(string $route, bool $all=false) : \Grav\Common\Page\PageInterface/null
Find a page based on route.
public get(string $path) : \Grav\Common\Page\PageInterface/null
Get a page instance.
public getCollection(array $params=array(), array $context=array()) : \Grav\Common\Page\PageCollectionInterface/\Grav\Common\Page\Collection
Get a collection of pages in the given context.
public getDirectory() : \Grav\Common\Page\FlexDirectory/null
public static getHomeRoute() : string
Gets the home route
public getList(\Grav\Common\Page\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $current=null, int $level, bool $rawRoutes=false, bool $showAll=true, bool $showFullpath=false, bool $showSlug=false, bool $showModular=false, bool $limitLevels=false) : array
Get list of route/title of all pages. Title is in HTML.
public getPagesCacheId() : null/string
Get the Pages cache ID this is particularly useful to know if pages have changed and you want to sync another cache with pages cache - works best in onPagesInitialized()
public getSimplePagesHash() : null/string
Get the simple pages hash that is not md5 encoded, and isn't specific to language
public static getTypes() : \Grav\Common\Page\Types
Get available page types.
public homeUrl(string/null $lang=null, bool/null $absolute=null) : string
Get home URL for Grav site.
public inherited(string $route, string/null $field=null) : \Grav\Common\Page\PageInterface/null
Get a page ancestor trait.
public init() : void
Class initialization. Must be called before using this class.
public instances() : \Grav\Common\Page\Interfaces\PageInterface[]
Returns a list of all pages.
public lastModified(int/null $modified=null) : int/null
Get or set last modification time.
public static modularTypes() : array
Get available page types.
public static pageTypes(string/null $type=null) : array
Get template types based on page type (standard or modular)
public static parents() : array
Get available parents routes
public static parentsRawRoutes() : array
Get available parents raw routes.
public referrerRoute(string/null/string $langCode, string $route='/') : string/null
Get relative referrer route and language code. Returns null if the route isn't within the current base, language (if set) and route.
public register() : void
public reset() : void
Reset pages (used in search indexing etc).
public static resetHomeRoute() : string/null
Needed for testing where we change the home route via config
public resetPages(array $pages_dirs) : void
Accessible method to manually reset the pages cache
public root() : \Grav\Common\Page\Interfaces\PageInterface
Get root page.
public route(string $route='/', string/null $lang=null) : string
Get route for Grav site.
public routes() : array
Returns a list of all routes.
public setCheckMethod(string $method) : void
public sort(\Grav\Common\Page\Interfaces\PageInterface $page, string/null $order_by=null, string/null $order_dir=null, mixed $sort_flags=null) : array
Sort sub-pages in a page.
public sortCollection(\Grav\Common\Page\Collection $collection, string $orderBy, string $orderDir='asc', array/null $orderManual=null, int/null $sort_flags=null) : array
public static types() : array
Get available page types.
public url(string $route='/', string/null $lang=null, bool/null $absolute=null) : string
Get URL for Grav site.
protected arrayShuffle(array $list) : array
Shuffles an associative array
protected buildFlexPages(\Grav\Framework\Flex\FlexDirectory $directory) : void
protected buildPages() : void
Builds pages.
protected buildRegularPages() : void
protected buildRootPage() : \Grav\Common\Page\Page
protected buildRoutes() : void
protected buildSort(string $path, array $pages, string $order_by='default', array/null $manual=null, int/null $sort_flags=null) : void
protected evaluate(array/string $value, \Grav\Common\Page\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $self=null) : \Grav\Common\Page\Collection
protected findSiteBasedRoute(string $route) : \Grav\Common\Page\PageInterface/null
Check site based routes.
protected getPagesPaths() : mixed
protected getVersion() : string
protected initFlexPages() : void
protected recurse(string $directory, \Grav\Common\Page\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $parent=null) : \Grav\Common\Page\Interfaces\PageInterface
Recursive function to load & build page relationships.
protected resolvePagesHash(array $pagesDirs, int $interval, string $method) : void
Resolve filesystem hash for pages with optional throttling to avoid expensive scans every request.
Examples of Pages::referrerRoute()
TXT
`$langCode = null; $referrer = $pages->referrerRoute($langCode, '/admin');` returns relative referrer url within /admin and updates $langCode`$langCode = 'en'; $referrer = $pages->referrerRoute($langCode, '/admin');` returns relative referrer url within the /en/admin


Interface: \Grav\Common\Page\Interfaces\PagesSourceInterface

Interface PagesSourceInterface

Visibility Function
public get(string $route) : \Grav\Common\Page\Interfaces\PageInterface/null
Get the page for the given route.
public getChecksum() : string
Get checksum for the page source.
public getChildren(string $route, array/null/array $options=null) : array
Get the children for the given route.
public getTimestamp() : int
Get timestamp for the page source.
public has(string $route) : bool
Returns true if the source contains a page for the given route.


Interface: \Grav\Common\Page\Interfaces\PageRoutableInterface

Interface PageRoutableInterface

Visibility Function
public active() : bool True if it is active
Returns whether or not this page is the currently active page requested via the URL.
public activeChild() : bool True if active child exists
Returns whether or not this URI's URL contains the URL of the active page. Or in other words, is this page's URL in the current URL
public canonical(bool $include_lang=true) : string
Returns the canonical URL for a page
public currentPosition() : int/null The index of the current page.
Returns the item in the current position.
public folder(string/null $var=null) : string/null
Get/set the folder.
public home() : bool True if it is the homepage
Returns whether or not this page is the currently configured home page.
public link(bool/bool/null $include_host=false) : string the permalink
Gets the URL for a page - alias of url().
public parent(\Grav\Common\Page\Interfaces\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $var=null) : \Grav\Common\Page\Interfaces\PageInterface/null the parent page object if it exists.
Gets and Sets the parent object for this page
public path(string/null $var=null) : string/null the path
Gets and sets the path to the folder where the .md for this Page object resides. This is equivalent to the filePath but without the filename.
public permalink() : string The permalink.
Gets the URL with host information, aka Permalink.
public rawRoute(string/null $var=null) : string
Gets and Sets the page raw route
public redirect(string/null $var=null) : string
Gets the redirect set in the header.
public relativePagePath() : void
Returns the clean path to the page file
public root() : bool True if it is the root
Returns whether or not this page is the root node of the pages tree.
public routable(bool/null $var=null) : bool true if the page is routable
Gets and Sets whether or not this Page is routable, ie you can reach it via a URL. The page must be routable and published
public route(string/null $var=null) : string/null The route for the Page.
Gets the route for the page based on the route headers if available, else from the parents route and the current Page's slug.
public routeAliases(array/null $var=null) : array The route aliases for the Page.
Gets the route aliases for the page based on page headers.
public routeCanonical(string/null $var=null) : bool/string
Gets the canonical route for this page if its set. If provided it will use that value, else if it's true it will use the default route.
public topParent() : PageInterface The top parent page object.
Gets the top parent object for this page. Can return page itself.
public unsetRouteSlug() : void
Helper method to clear the route out so it regenerates next time you use it
public url(bool $include_host=false, bool $canonical=false, bool $include_lang=true, bool $raw_route=false) : string The url.
Gets the url for the Page.
public urlExtension() : string The extension of this page. For example .html
Returns the page extension, got from the page url_extension config and falls back to the system config system.pages.append_url_extension.


Interface: \Grav\Common\Page\Interfaces\PageInterface

Class implements page interface.

Visibility Function

This class implements \Grav\Common\Page\Interfaces\PageContentInterface, \Grav\Common\Page\Interfaces\PageFormInterface, \Grav\Common\Page\Interfaces\PageRoutableInterface, \Grav\Common\Page\Interfaces\PageTranslateInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Common\Page\Interfaces\PageLegacyInterface, \Grav\Framework\Media\Interfaces\MediaInterface


Interface: \Grav\Common\Page\Interfaces\PageCollectionInterface

Interface PageCollectionInterface

Visibility Function
public addPage(\Grav\Common\Page\Interfaces\PageInterface $page) : \Grav\Common\Page\Interfaces\$this/\Grav\Common\Page\Interfaces\PageCollectionInterface<TKey,T>
Add a single page to a collection
public adjacentSibling(string $path, int $direction=1) : \Grav\Common\Page\Interfaces\PageInterface/\Grav\Common\Page\Interfaces\PageCollectionInterface/false The sibling item.
Returns the adjacent sibling based on a direction.
public batch(int $size) : \Grav\Common\Page\Interfaces\PageCollectionInterface[]
Split collection into array of smaller collections.
public copy() : \Grav\Common\Page\Interfaces\static<TKey,T>
Create a copy of this collection
public currentPosition(string $path) : int/null The index of the current page, null if not found.
Returns the item in the current position.
public dateRange(string/null $startDate=null, string/null $endDate=null, string/null $field=null) : \Grav\Common\Page\Interfaces\PageCollectionInterface
Returns the items between a set of date ranges of either the page date field (default) or an arbitrary datetime page field where start date and end date are optional Dates must be passed in as text that strtotime() can process http://php.net/manual/en/function.strtotime.php
public intersect(\Grav\Common\Page\Interfaces\PageCollectionInterface $collection) : \Grav\Common\Page\Interfaces\PageCollectionInterface
Intersect another collection with the current collection
public isFirst(string $path) : bool True if item is first.
Check to see if this item is the first in the collection.
public isLast(string $path) : bool True if item is last.
Check to see if this item is the last in the collection.
public merge(\Grav\Common\Page\Interfaces\PageCollectionInterface $collection) : \Grav\Common\Page\Interfaces\PageCollectionInterface
Merge another collection with the current collection
public modular() : PageCollectionInterface The collection with only modules
DEPRECATED - 1.7 Use $this->modules() instead
public modules() : PageCollectionInterface The collection with only modules
Creates new collection with only modules
public nextSibling(string $path) : PageInterface The next item.
Gets the next sibling based on current position.
public nonModular() : PageCollectionInterface The collection with only non-module pages
DEPRECATED - 1.7 Use $this->pages() instead
public nonPublished() : PageCollectionInterface The collection with only non-published pages
Creates new collection with only non-published pages
public nonRoutable() : PageCollectionInterface The collection with only non-routable pages
Creates new collection with only non-routable pages
public nonVisible() : PageCollectionInterface The collection with only non-visible pages
Creates new collection with only non-visible pages
public ofOneOfTheseAccessLevels(array $accessLevels) : PageCollectionInterface The collection
Creates new collection with only pages of one of the specified access levels
public ofOneOfTheseTypes(string[] $types) : PageCollectionInterface The collection
Creates new collection with only pages of one of the specified types
public ofType(string $type) : PageCollectionInterface The collection
Creates new collection with only pages of the specified type
public order(string $by, string $dir='asc', array/null $manual=null, string/null $sort_flags=null) : \Grav\Common\Page\Interfaces\PageCollectionInterface
Reorder collection.
public pages() : PageCollectionInterface The collection with only pages
Creates new collection with only pages
public params() : array
Get the collection params
public prevSibling(string $path) : PageInterface The previous item.
Gets the previous sibling based on current position.
public published() : PageCollectionInterface The collection with only published pages
Creates new collection with only published pages
public routable() : PageCollectionInterface The collection with only routable pages
Creates new collection with only routable pages
public setParams(array $params) : \Grav\Common\Page\Interfaces\$this
Set parameters to the Collection
public toArray() : array
Converts collection into an array.
public toExtendedArray() : array
Get the extended version of this Collection with each page keyed by route
public visible() : PageCollectionInterface The collection with only visible pages
Creates new collection with only visible pages

This class implements \Traversable, \ArrayAccess, \Countable, \Serializable


Interface: \Grav\Common\Page\Interfaces\PageLegacyInterface

Interface PageLegacyInterface

Visibility Function
public addContentMeta(string $name, mixed $value) : void
Add an entry to the page's contentMeta array
public addForms(array $new) : void
public adjacentSibling(int $direction=1) : \Grav\Common\Page\Interfaces\PageInterface/false the sibling page
Returns the adjacent sibling based on a direction.
public ancestor(bool/null $lookup=null) : PageInterface page you were looking for if it exists
Helper method to return an ancestor page.
public blueprintName() : string
Get the blueprint name for this page. Use the blueprint form field if set
public blueprints() : \Grav\Common\Data\Blueprint
Get blueprints for the page.
public cacheControl(string/null $var=null) : string/null
Gets and sets the cache-control property. If not set it will return the default value (null) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control for more details on valid options
public cachePageContent() : void
Fires the onPageContentProcessed event, and caches the page content using a unique ID for the page
public childType() : string
Returns child page type.
public children() : \Grav\Common\Page\Interfaces\PageCollectionInterface/\Grav\Common\Page\Interfaces\Collection
Returns children of this page.
public collection(string/string/array $params='content', bool $pagination=true) : \Grav\Common\Page\Collection
Get a collection of pages in the current context.
public contentMeta() : mixed
Get the contentMeta array and initialize content first if it's not already
public copy(\Grav\Common\Page\Interfaces\PageInterface $parent) : \Grav\Common\Page\Interfaces\$this
Prepare a copy from the page. Copies also everything that's under the current page. Returns a new Page object for the copy. You need to call $this->save() in order to perform the move.
public debugger() : bool
Returns the state of the debugger override etting for this page
public eTag(bool/null $var=null) : bool show etag header
Gets and sets the option to show the etag header for the page.
public evaluate(string/array $value, bool $only_published=true) : \Grav\Common\Page\Interfaces\PageCollectionInterface/\Grav\Common\Page\Interfaces\Collection
public expires(int/null $var=null) : int The expires value
Gets and sets the expires field. If not set will return the default
public extension(string/null $var=null) : string/null
Gets and sets the extension field.
public extra() : array
Get unknown header variables.
public file() : \Grav\Common\Page\Interfaces\MarkdownFile/null
Get file object to the page.
public filePath(string/null $var=null) : string/null the file path
Gets and sets the path to the .md file for this Page object.
public filePathClean() : string The relative file path
Gets the relative path to the .md file
public filter() : void
Filter page header from illegal contents.
public find(string $url, bool $all=false) : PageInterface page you were looking for if it exists
Helper method to return a page.
public folderExists() : bool
Returns whether or not the current folder exists
public forms() : array
Returns normalized list of name => form pairs.
public frontmatter(string/null $var=null) : string
Gets and Sets the page frontmatter
public getAction() : string The Action string.
Gets the action.
public getContentMeta(string/null $name=null) : mixed
Return the whole contentMeta array as it currently stands
public getOriginal() : PageInterface The original version of the page.
Gets the Page Unmodified (original) version of the page.
public httpHeaders() : array
public httpResponseCode() : int
public inherited(string $field) : \Grav\Common\Page\Interfaces\PageInterface
Helper method to return an ancestor page to inherit from. The current page object is returned.
public inheritedField(string $field) : array
Helper method to return an ancestor field only to inherit from. The first occurrence of an ancestor field will be returned if at all.
public init(\SplFileInfo $file, string/null $extension=null) : \Grav\Common\Page\Interfaces\$this
Initializes the page instance variables based on a file
public isFirst() : bool True if item is first.
Check to see if this item is the first in an array of sub-pages.
public isLast() : bool True if item is last
Check to see if this item is the last in an array of sub-pages.
public maxCount(int/null $var=null) : int the maximum number of sub-pages
DEPRECATED - 1.6
public metadata(array/null $var=null) : array an Array of metadata values for the page
Function to merge page metadata tags and build an array of Metadata objects that can then be rendered in the page.
public modifyHeader(string $key, mixed $value) : void
Modify a header value directly
public modular(bool/null $var=null) : bool true if modular_twig
DEPRECATED - 1.7 Use ->isModule() or ->modularTwig() method instead.
public modularTwig(bool/null $var=null) : bool true if modular_twig
Gets and sets the modular_twig var that helps identify this page as a modular child page that will need twig processing handled differently from a regular page.
public move(\Grav\Common\Page\Interfaces\PageInterface $parent) : \Grav\Common\Page\Interfaces\$this
Prepare move page to new location. Moves also everything that's under the current page. You need to call $this->save() in order to perform the move.
public name(string/null $var=null) : string The name of this page.
Gets and sets the name field. If no name field is set, it will return 'default.md'.
public nextSibling() : PageInterface the next Page item
Gets the next sibling based on current position.
public orderBy(string/null $var=null) : string supported options include "default", "title", "date", and "folder"
DEPRECATED - 1.6
public orderDir(string/null $var=null) : string the order, either "asc" or "desc"
DEPRECATED - 1.6
public orderManual(string/null $var=null) : array
DEPRECATED - 1.6
public prevSibling() : PageInterface the previous Page item
Gets the previous sibling based on current position.
public raw(string/null $var=null) : string Raw content string
Gets and Sets the raw data
public save(bool/bool/mixed $reorder=true) : void
Save page if there's a file assigned to it.
public setContentMeta(array $content_meta) : array
Sets the whole content meta array in one shot
public ssl(bool/null $var=null) : bool
public template(string/null $var=null) : string the template name
Gets and sets the template field. This is used to find the correct Twig template file to render. If no field is set, it will return the name without the .md extension
public templateFormat(string/null $var=null) : string
Allows a page to override the output render format, usually the extension provided in the URL. (e.g. html, json, xml, etc).
public toArray() : array
Convert page to an array.
public toJson() : string
Convert page to JSON encoded string.
public toYaml() : string
Convert page to YAML encoded string.
public validate() : void
Validate page header.


Interface: \Grav\Common\Page\Interfaces\PageContentInterface

Methods currently implemented in Flex Page emulation layer.

Visibility Function
public content(string/null $var=null) : string Content
Gets and Sets the content based on content portion of the .md file
public date(string/null $var=null) : int Unix timestamp representation of the date
Gets and sets the date for this Page object. This is typically passed in via the page headers
public dateformat(string/null $var=null) : string String representation of a date format
Gets and sets the date format for this Page object. This is typically passed in via the page headers using typical PHP date string structure - http://php.net/manual/en/function.date.php
public exists() : bool
Returns whether the page exists in the filesystem.
public folder(string/null $var=null) : string/null The folder
Get/set the folder.
public getBlueprint(string $name='') : Blueprint Returns a Blueprint.
Returns the blueprint from the page.
public getRawContent() : string the current page content
Needed by the onPageContentProcessed event to get the raw page content
public header(object/array/null $var=null) : \stdClass/Header The current YAML configuration
Gets and Sets the header based on the YAML configuration at the top of the .md file
public id(string/null $var=null) : string The identifier
Gets and sets the identifier for this Page object.
public isDir() : bool True if its a directory
Returns whether or not this Page object is a directory or a page.
public isModule() : bool
Returns true if page is a module.
public isPage() : bool True if its a page with a .md file associated
Returns whether or not this Page object has a .md file associated with it or if its just a directory.
public lastModified(bool/null $var=null) : bool Show last_modified header
Gets and sets the option to show the last_modified header for the page.
public media(\Grav\Common\Page\Interfaces\MediaCollectionInterface/null $var=null) : MediaCollectionInterface Representation of associated media.
Gets and sets the associated media as found in the page folder.
public menu(string/null $var=null) : string The menu field for the page
Gets and sets the menu name for this Page. This is the text that can be used specifically for navigation. If no menu field is set, it will use the title()
public modified(int/null $var=null) : int Modified unix timestamp
Gets and sets the modified timestamp.
public order(int/null $var=null) : string/bool Order in a form of '02.' or false if not set
Get/set order number of this page.
public process(array/null $var=null) : array Array of name value pairs where the name is the process and value is true or false
Gets and Sets the process setup for this Page. This is multi-dimensional array that consists of a simple array of arrays with the form array("markdown"=>true) for example
public publishDate(string/null $var=null) : int Unix timestamp representation of the date
Gets and Sets the Page publish date
public published(bool/null $var=null) : bool True if the page is published
Gets and Sets whether or not this Page is considered published
public rawMarkdown(string/null $var=null) : string
Gets and Sets the Page raw content
public setRawContent(string/null $content) : void
Needed by the onPageContentProcessed event to set the raw page content
public setSummary(string $summary) : void
Sets the summary of the page
public shouldProcess(string $process) : bool Whether or not the processing method is enabled for this Page
Gets the configured state of the processing method.
public slug(string/null $var=null) : string The slug
Gets and Sets the slug for the Page. The slug is used in the URL routing. If not set it uses the parent folder from the path
public summary(int/null $size=null, bool $textOnly=false) : string
Get the summary.
public taxonomy(array/null $var=null) : array An array of taxonomies
Gets and sets the taxonomy array which defines which taxonomies this page identifies itself with.
public title(string/null $var=null) : string The title of the Page
Gets and sets the title for this Page. If no title is set, it will use the slug() to get a name
public unpublishDate(string/null $var=null) : int/null Unix timestamp representation of the date
Gets and Sets the Page unpublish date
public value(string $name, mixed/null $default=null) : mixed
Get value from a page variable (used mostly for creating edit forms).
public visible(bool/null $var=null) : bool True if the page is visible
Gets and Sets whether or not this Page is visible for navigation


Interface: \Grav\Common\Page\Interfaces\PageTranslateInterface

Interface PageTranslateInterface

Visibility Function
public language(string/null $var=null) : mixed
Get page language
public translated() : bool
public translatedLanguages(bool $onlyPublished=false) : array the page translated languages
Return an array with the routes of other translated languages
public untranslatedLanguages(bool $includeUnpublished=false) : array the page untranslated languages
Return an array listing untranslated languages available


Interface: \Grav\Common\Page\Interfaces\PageFormInterface

Interface PageFormInterface

Visibility Function
public addForms(array $new) : \Grav\Common\Page\Interfaces\$this
Add forms to this page.
public forms() : array
Alias of $this->getForms();


Class: \Grav\Common\Page\Markdown\Excerpts

Class Excerpts

Visibility Function
public __construct(\Grav\Common\Page\Markdown\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $page=null, array/null/array $config=null) : void
Excerpts constructor.
public fireInitializedEvent(object $markdown) : void
public getConfig() : array
public getPage() : \Grav\Common\Page\Markdown\PageInterface/null
public processImageExcerpt(array $excerpt) : array
Process an image excerpt
public processLinkExcerpt(array $excerpt, string $type='link') : array
Process a Link excerpt
public processMediaActions(\Grav\Common\Page\Markdown\Medium $medium, string/array $url) : \Grav\Common\Page\Markdown\Medium/\Grav\Common\Page\Markdown\Link
Process media actions
protected parseUrl(string $url) : array
Variation of parse_url() which works also with local streams.


Class: \Grav\Common\Page\Medium\VectorImageMedium

Class StaticImageMedium

Visibility Function
public __construct(array $items=array(), \Grav\Common\Page\Medium\Blueprint/null/\Grav\Common\Data\Blueprint $blueprint=null) : void
Construct.

This class extends \Grav\Common\Page\Medium\StaticImageMedium

This class implements \Grav\Common\Media\Interfaces\ImageMediaInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Stringable, \Grav\Common\Media\Interfaces\MediaFileInterface, \Grav\Common\Page\Medium\RenderableInterface, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


Class: \Grav\Common\Page\Medium\VideoMedium

Class VideoMedium

Visibility Function
public autoplay(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the autoplay attribute
public controls(bool $status=true) : \Grav\Common\Page\Medium\$this
Allows to set or remove the HTML5 default controls
public loop(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the loop attribute
public muted(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the muted attribute
public playsinline(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the playsinline attribute
public poster(string $urlImage) : \Grav\Common\Page\Medium\$this
Allows to set the video's poster image
public preload(string/null $preload=null) : \Grav\Common\Page\Medium\$this
Allows to set the preload behaviour
public reset() : \Grav\Common\Page\Medium\$this
Reset medium.
public resetPlayer() : void
Reset player.
public resize(int/null $width=null, int/null $height=null) : \Grav\Common\Page\Medium\$this
Resize media by setting attributes
protected sourceParsedownElement(array $attributes, bool $reset=true) : array
Parsedown element for source display mode

This class extends \Grav\Common\Page\Medium\Medium

This class implements \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaFileInterface, \Stringable, \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\VideoMediaInterface, \Grav\Common\Media\Interfaces\MediaPlayerInterface


Class: \Grav\Common\Page\Medium\MediumFactory

Class MediumFactory

Visibility Function
public static fromArray(array $items=array(), \Grav\Common\Page\Medium\Blueprint/null/\Grav\Common\Data\Blueprint $blueprint=null) : \Grav\Common\Page\Medium\Medium
Create Medium from array of parameters
public static fromFile(string $file, array $params=array()) : \Grav\Common\Page\Medium\Medium/null
Create Medium from a file
public static fromUploadedFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, array $params=array()) : \Grav\Common\Page\Medium\Medium/null
Create Medium from an uploaded file
public static scaledFromMedium(\Grav\Common\Page\Medium\ImageMediaInterface/\Grav\Common\Page\Medium\MediaObjectInterface $medium, int $from, int $to) : \Grav\Common\Page\Medium\ImageMediaInterface/\Grav\Common\Page\Medium\MediaObjectInterface/array
Create a new ImageMedium by scaling another ImageMedium object.


Class: \Grav\Common\Page\Medium\ImageFile

Class ImageFile

Visibility Function
public __construct(string/null $originalFile=null, int/null $width=null, int/null $height=null) : void
Image constructor with adapter configuration from Grav.
public __destruct() : void
Destruct also image object.
public cacheFile(string $type='jpg', int $quality=80, bool $actual=false, array $extras=array()) : string
This is the same as the Gregwar Image class except this one fires a Grav Event on creation of new cached file
public clearOperations() : void
Clear previously applied operations
public fixOrientation() : void
Read exif rotation from file and apply it.
public generateHash(string $type='guess', int $quality=80, array $extras=array()) : void
Generates the hash.
public getHash(string $type='guess', int $quality=80, array $extras=array()) : string
Gets the hash.

This class extends \Gregwar\Image\Image

This class implements \Stringable


Class: \Grav\Common\Page\Medium\Medium

Class Medium

Visibility Function
public __call(string $method, array $args) : \Grav\Common\Page\Medium\$this
Allow any action to be called on this medium from twig or markdown
public __clone() : void
Clone medium.
public __construct(array $items=array(), \Grav\Common\Page\Medium\Blueprint/null/\Grav\Common\Data\Blueprint $blueprint=null) : void
Construct.
public __toString() : string
Return string representation of the object (html).
public addAlternative(int/float $ratio, \Grav\Common\Media\Interfaces\MediaObjectInterface $alternative) : void
Add alternative Medium to this Medium.
public addMetaFile(string $filepath) : void
Add meta file for the medium.
public attribute(string $attribute=null, string $value='') : \Grav\Common\Page\Medium\$this
Add custom attribute to medium.
public classes() : \Grav\Common\Page\Medium\$this
Add a class to the element from Markdown or Twig Example: Example or Example
public copy() : \Grav\Common\Page\Medium\static
Create a copy of this media object
public display(string $mode='source') : \Grav\Common\Page\Medium\MediaObjectInterface/null
Switch display mode.
public exists() : bool
Check if this medium exists or not
public getAlternatives(bool $withDerived=true) : array
public getMeta() : array
public html(string/null $title=null, string/null $alt=null, string/null $class=null, string/null $id=null, bool $reset=true) : string
Return HTML markup from the medium.
public id(string $id) : \Grav\Common\Page\Medium\$this
Add an id to the element from Markdown or Twig Example: Example
public lightbox(int/null $width=null, int/null $height=null, bool $reset=true) : \Grav\Common\Media\Interfaces\MediaLinkInterface
Turn the current Medium into a Link with lightbox enabled
public link(bool $reset=true, array $attributes=array()) : \Grav\Common\Media\Interfaces\MediaLinkInterface
Turn the current Medium into a Link
public meta() : \Grav\Common\Data\Data
Return just metadata from the Medium object
public metadata() : array
Returns an array containing just the metadata
public modified() : int/null
Get file modification time for the medium.
public parsedownElement(string/null $title=null, string/null $alt=null, string/null $class=null, string/null $id=null, bool $reset=true) : array
Get an element (is array) that can be rendered by the Parsedown engine
public path(bool $reset=true) : string path to file
Return PATH to file.
public querystring(string/null $querystring=null, bool $withQuestionmark=true) : string
Get/set querystring for the file's url
public relativePath(bool $reset=true) : string
Return the relative path to file
public reset() : \Grav\Common\Page\Medium\$this
Reset medium.
public setTimestamp(string/int/null $timestamp=null) : \Grav\Common\Page\Medium\$this
Set querystring to file modification timestamp (or value provided as a parameter).
public size() : int
Get size of the medium.
public style(string $style) : \Grav\Common\Page\Medium\$this
Allows to add an inline style attribute from Markdown or Twig Example: Example
public thumbnail(string $type='auto') : \Grav\Common\Page\Medium\$this
Switch thumbnail.
public thumbnailExists(string $type='page') : bool
Helper method to determine if this media item has a thumbnail or not
public url(bool $reset=true) : string
Return URL to file.
public urlHash(string/null $hash=null, bool $withHash=true) : string
Get/set hash for the file's url
public urlQuerystring(string $url) : string
Get the URL with full querystring
protected createLink(array $attributes) : \Grav\Common\Media\Interfaces\MediaLinkInterface
protected createThumbnail(string $thumb) : \Grav\Common\Page\Medium\Medium/null
protected getGrav() : \Grav\Common\Grav
protected getItems() : array
protected getThumbnail() : \Grav\Common\Page\Medium\ThumbnailImageMedium/null
Get the thumbnail Medium object
protected sourceParsedownElement(array $attributes, bool $reset=true) : array
Parsedown element for source display mode
protected textParsedownElement(array $attributes, bool $reset=true) : array
Parsedown element for text display mode

This class extends \Grav\Common\Data\Data

This class implements \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaFileInterface, \Stringable, \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface


Class: \Grav\Common\Page\Medium\AudioMedium

Class AudioMedium

Visibility Function
public autoplay(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the autoplay attribute
public controls(bool $status=true) : \Grav\Common\Page\Medium\$this
Allows to set or remove the HTML5 default controls
public controlsList(string $controlsList) : \Grav\Common\Page\Medium\$this
Allows to set the controlsList behaviour Separate multiple values with a hyphen
public loop(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the loop attribute
public muted(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the muted attribute
public preload(string/null $preload=null) : \Grav\Common\Page\Medium\$this
Allows to set the preload behaviour
public reset() : \Grav\Common\Page\Medium\$this
Reset medium.
public resetPlayer() : void
Reset player.
public resize(int/null $width=null, int/null $height=null) : \Grav\Common\Page\Medium\$this
Resize media by setting attributes
protected sourceParsedownElement(array $attributes, bool $reset=true) : array
Parsedown element for source display mode

This class extends \Grav\Common\Page\Medium\Medium

This class implements \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaFileInterface, \Stringable, \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\AudioMediaInterface, \Grav\Common\Media\Interfaces\MediaPlayerInterface


Class: \Grav\Common\Page\Medium\ImageMedium

Class ImageMedium

Visibility Function
public __call(string $method, mixed $args) : \Grav\Common\Page\Medium\$this/mixed
Forward the call to the image processing method.
public __clone() : void
Also clone image.
public __construct(array $items=array(), \Grav\Common\Page\Medium\Blueprint/null/\Grav\Common\Data\Blueprint $blueprint=null) : void
Construct.
public __destruct() : void
Also unset the image on destruct.
public addFrame(int $border=10, string $color='0x000000') : \Grav\Common\Page\Medium\$this
Add a frame to image
public addMetaFile(string $filepath) : \Grav\Common\Page\Medium\$this
Add meta file for the medium.
public aspectRatio(string $enabled='true') : \Grav\Common\Page\Medium\$this
public autoSizes(string $enabled='true') : \Grav\Common\Page\Medium\$this
public cache() : \Grav\Common\Page\Medium\$this
Simply processes with no extra methods. Useful for triggering events.
public clearAlternatives() : void
Clear out the alternatives.
public cropZoom() : \Grav\Common\Page\Medium\$this
Handle this commonly used variant
public decoding(string/null $value=null) : \Grav\Common\Page\Medium\$this
Allows to set the decoding attribute from Markdown or Twig
public derivatives(int/int[] $min_width, int $max_width=2500, int $step=200) : \Grav\Common\Page\Medium\$this
Generate alternative image widths, using either an array of integers, or a min width, a max width, and a step parameter to fill out the necessary widths. Existing image alternatives won't be overwritten.
public fetchpriority(string/null $value=null) : \Grav\Common\Page\Medium\$this
Allows to set the fetchpriority attribute from Markdown or Twig
public filter(string $filter='image.filters.default') : \Grav\Common\Page\Medium\$this
Filter image by using user defined filter parameters.
public format(string $format) : \Grav\Common\Page\Medium\$this
Sets image output format.
public getImagePrettyName() : string
public getMeta() : array
public height(string/string/int $value='auto') : \Grav\Common\Page\Medium\$this
Allows to set the height attribute from Markdown or Twig Examples: Example Example Example Example {{ page.media['myimg.png'].width().height().html }} {{ page.media['myimg.png'].resize(100,200).width(100).height(200).html }}
public higherQualityAlternative() : \Grav\Common\Page\Medium\ImageMediaInterface/$this the alternative version with higher quality
Return the image higher quality version
public lightbox(int $width=null, int $height=null, bool $reset=true) : \Grav\Common\Media\Interfaces\MediaLinkInterface
Turn the current Medium into a Link with lightbox enabled
public link(bool $reset=true, array $attributes=array()) : \Grav\Common\Media\Interfaces\MediaLinkInterface
Turn the current Medium into a Link
public loading(string/null $value=null) : \Grav\Common\Page\Medium\$this
Allows to set the loading attribute from Markdown or Twig
public path(bool $reset=true) : string path to image
Return PATH to image.
public quality(int/null $quality=null) : int/\Grav\Common\Page\Medium\$this
Sets or gets the quality of the image
public reset() : \Grav\Common\Page\Medium\$this
Reset image.
public retinaScale(int $scale=1) : \Grav\Common\Page\Medium\$this
public setImagePrettyName(string $name) : void
Allows the ability to override the image's pretty name stored in cache
public sizes(string/null $sizes=null) : string
Set or get sizes parameter for srcset media action
public sourceParsedownElement(array $attributes, bool $reset=true) : array
Parsedown element for source display mode
public srcset(bool $reset=true) : string
Return srcset string for this Medium and its alternatives.
public url(bool $reset=true) : string
Return URL to image.
public watermark(string/null $image=null, string/null $position=null, int/float/null $scale=null) : \Grav\Common\Page\Medium\$this
public width(string/string/int $value='auto') : \Grav\Common\Page\Medium\$this
Allows to set the width attribute from Markdown or Twig Examples: Example Example Example Example {{ page.media['myimg.png'].width().height().html }} {{ page.media['myimg.png'].resize(100,200).width(100).height(200).html }}
protected image() : \Grav\Common\Page\Medium\$this
Gets medium image, resets image manipulation operations.
protected saveImage() : string
Save the image with cache.

This class extends \Grav\Common\Page\Medium\Medium

This class implements \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaFileInterface, \Stringable, \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\ImageMediaInterface, \Grav\Common\Media\Interfaces\ImageManipulateInterface


Interface: \Grav\Common\Page\Medium\RenderableInterface

Interface RenderableInterface

Visibility Function
public html(string/null $title=null, string/null $alt=null, string/null $class=null, string/null $id=null, bool $reset=true) : string
Return HTML markup from the medium.
public parsedownElement(string/null $title=null, string/null $alt=null, string/null $class=null, string/null $id=null, bool $reset=true) : array
Return Parsedown Element from the medium.


Class: \Grav\Common\Page\Medium\GlobalMedia

Class GlobalMedia

Visibility Function
public static getInstance() : mixed
public getPath() : string/null
Return media path.
public offsetExists(string $offset) : bool
public offsetGet(string $offset) : \Grav\Common\Page\Medium\MediaObjectInterface/null
protected addMedium(string $stream) : \Grav\Common\Page\Medium\MediaObjectInterface/null
protected resolveStream(string $filename) : string/null

This class extends \Grav\Common\Page\Medium\AbstractMedia

This class implements \Grav\Framework\Media\Interfaces\MediaCollectionInterface, \Traversable, \Iterator, \Countable, \ArrayAccess, \Grav\Common\Media\Interfaces\MediaUploadInterface, \Grav\Common\Media\Interfaces\MediaCollectionInterface, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Page\Medium\StaticImageMedium

Class StaticImageMedium

Visibility Function
public higherQualityAlternative() : \Grav\Common\Page\Medium\$this
public loading(string/null $value=null) : \Grav\Common\Page\Medium\$this
Allows to set the loading attribute from Markdown or Twig
public resize(int/null $width=null, int/null $height=null) : \Grav\Common\Page\Medium\$this
Resize media by setting attributes
protected sourceParsedownElement(array $attributes, bool $reset=true) : array
Parsedown element for source display mode

This class extends \Grav\Common\Page\Medium\Medium

This class implements \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaFileInterface, \Stringable, \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\ImageMediaInterface


Class: \Grav\Common\Page\Medium\AbstractMedia (abstract)

Class AbstractMedia

Visibility Function
public __invoke(string $filename) : mixed
Call object as function to get medium by filename.
public add(string $name, \Grav\Common\Page\Medium\MediaObjectInterface/null $file) : void
public all() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all media.
public audios() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all audio media.
public checkFileMetadata(array $metadata, string $filename=null, array/null/array $settings=null) : string
Checks that file metadata meets the requirements. Returns new filename.
public checkUploadedFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string/null/string $filename=null, array/null/array $settings=null) : string
Checks that uploaded file meets the requirements. Returns new filename.
public copyUploadedFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string $filename, array/null/array $settings=null) : void
Copy uploaded file to the media collection. WARNING: Always check uploaded file before copying it!
public count() : int
Implements Countable interface.
public createFromArray(array $items=array(), \Grav\Common\Page\Medium\Blueprint/null/\Grav\Common\Data\Blueprint $blueprint=null) : \Grav\Common\Page\Medium\Medium/null
Create Medium from array of parameters
public createFromFile(string $file, array $params=array()) : \Grav\Common\Page\Medium\Medium/null
Create Medium from a file.
public createFromUploadedFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, array $params=array()) : \Grav\Common\Page\Medium\Medium/null
Create Medium from an uploaded file.
public current() : mixed Can return any type.
Returns the current element.
public deleteFile(string $filename, array/null/array $settings=null) : void
Delete real file from the media collection.
public files() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all file media.
public get(string $filename) : \Grav\Common\Page\Medium\MediaObjectInterface/null
Get medium by filename.
public getImageFileObject(\Grav\Common\Media\Interfaces\MediaObjectInterface $mediaObject) : \Grav\Common\Page\Medium\ImageFile
public getPath() : string/null
Return media path.
public getUploadSettings(array/null/array $settings=null) : array
Get upload settings.
public hide(string $name) : void
public images() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all image media.
public key() : string/null Returns key on success, or NULL on failure.
Returns the key of the current element.
public next() : void
Moves the current position to the next element.
public offsetExists(string/int $offset) : bool Returns TRUE on success or FALSE on failure.
Tests if an offset exists.
public offsetGet(string/int $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(string/int/null $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(string/int $offset) : void
Unsets an offset.
public renameFile(string $from, string $to, array/null/array $settings=null) : void
Rename file inside the media collection.
public rewind() : void
Rewinds back to the first element of the Iterator.
public setPath(string/null/string $path) : void
public setTimestamps(string/int/null $timestamp=null) : \Grav\Common\Page\Medium\$this
Set file modification timestamps (query params) for all the media files.
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public valid() : bool Returns TRUE on success or FALSE on failure.
This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid.
public videos() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all video media.
protected clearCache() : void
protected doAddUploadedMedium(string $name, string $filename, string $path) : void
protected doCopy(string $src, string $dst, string $path) : void
Internal logic to copy file.
protected doMoveUploadedFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string $filename, string $path) : void
Internal logic to move uploaded file.
protected doRemove(string $filename, string $path) : void
Internal logic to remove file.
protected doRemoveMetadata(string $filename, string $path) : void
protected doRename(string $from, string $to, string $path) : void
Internal logic to rename file.
protected doSanitizeSvg(string $filename, string $path) : void
protected doSaveMetadata(array $metadata, string $filename, string $path) : void
protected fileExists(string $filename, string $destination) : void
protected getConfig() : mixed
protected getFileParts(string $filename) : array
Get filename, extension and meta part.
protected getGrav() : mixed
protected getLanguage() : mixed
protected orderMedia(array $media) : array
Order the media based on the page's media_order
protected translate(string $string) : string
Examples of AbstractMedia::checkUploadedFile()
TXT
$filename = null;  // Override filename if needed (ignored if randomizing filenames).
  $settings = ['destination' => 'user://pages/media']; // Settings from the form field.
  $filename = $media->checkUploadedFile($uploadedFile, $filename, $settings);
  $media->copyUploadedFile($uploadedFile, $filename);
Examples of AbstractMedia::copyUploadedFile()
TXT
$settings = ['destination' => 'user://pages/media']; // Settings from the form field.
  $filename = $media->checkUploadedFile($uploadedFile, $filename, $settings);
  $media->copyUploadedFile($uploadedFile, $filename, $settings);

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\Media\Interfaces\MediaCollectionInterface, \Grav\Common\Media\Interfaces\MediaUploadInterface, \ArrayAccess, \Countable, \Iterator, \Traversable, \Grav\Framework\Media\Interfaces\MediaCollectionInterface


Class: \Grav\Common\Page\Medium\ThumbnailImageMedium

Class ThumbnailImageMedium

Visibility Function
public display(string $mode='source') : \Grav\Common\Page\Medium\MediaLinkInterface/\Grav\Common\Page\Medium\MediaObjectInterface/null
Switch display mode.
public html(string/null $title=null, string/null $alt=null, string/null $class=null, string/null $id=null, bool $reset=true) : string
Return HTML markup from the medium.
public lightbox(int/null $width=null, int/null $height=null, bool $reset=true) : \Grav\Common\Page\Medium\MediaLinkInterface
Turn the current Medium into a Link with lightbox enabled
public link(bool $reset=true, array $attributes=array()) : \Grav\Common\Page\Medium\MediaLinkInterface
Turn the current Medium into a Link
public parsedownElement(string/null $title=null, string/null $alt=null, string/null $class=null, string/null $id=null, bool $reset=true) : array
Get an element (is array) that can be rendered by the Parsedown engine
public srcset(bool $reset=true) : string
Return srcset string for this Medium and its alternatives.
public thumbnail(string $type='auto') : \Grav\Common\Page\Medium\MediaLinkInterface/\Grav\Common\Page\Medium\MediaObjectInterface
Switch thumbnail.
protected bubble(string $method, array $arguments=array(), bool $testLinked=true) : mixed
Bubble a function call up to either the superclass function or the parent Medium instance

This class extends \Grav\Common\Page\Medium\ImageMedium

This class implements \Grav\Common\Media\Interfaces\ImageManipulateInterface, \Grav\Common\Media\Interfaces\ImageMediaInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Stringable, \Grav\Common\Media\Interfaces\MediaFileInterface, \Grav\Common\Page\Medium\RenderableInterface, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


Class: \Grav\Common\Processors\ProcessorBase (abstract)

Class ProcessorBase

Visibility Function
public __construct(\Grav\Common\Grav $container) : void
ProcessorBase constructor.
protected addMessage(string $message, string $label='info', bool $isString=true) : void
protected startTimer(string/null $id=null, string/null $title=null) : void
protected stopTimer(string/null $id=null) : void

This class implements \Grav\Common\Processors\ProcessorInterface, \Psr\Http\Server\MiddlewareInterface


Class: \Grav\Common\Processors\TasksProcessor

Class TasksProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\PluginsProcessor

Class PluginsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\TwigProcessor

Class TwigProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\DebuggerAssetsProcessor

Class DebuggerAssetsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\InitializeProcessor

Class InitializeProcessor

Visibility Function
public static initializeCli(\Grav\Common\Grav $grav) : void
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface
public processCli() : void
protected handleDebuggerRequest(\Grav\Common\Debugger $debugger, \Psr\Http\Message\ServerRequestInterface $request) : \Grav\Common\Processors\ResponseInterface/null
protected handleRedirectRequest(\Psr\Http\Message\RequestInterface $request, int $code=null) : void
protected initializeConfig() : \Grav\Common\Config\Config
protected initializeDebugger() : \Grav\Common\Debugger
protected initializeErrors() : \Grav\Common\Errors\Errors
protected initializeLocale(\Grav\Common\Config\Config $config) : void
protected initializeLogger(\Grav\Common\Config\Config $config) : \Monolog\Logger
protected initializeOutputBuffering(\Grav\Common\Config\Config $config) : void
protected initializePages(\Grav\Common\Config\Config $config) : void
protected initializePlugins() : void
protected initializeSession(\Grav\Common\Config\Config $config) : void
protected initializeUri(\Grav\Common\Config\Config $config) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\BackupsProcessor

Class BackupsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\AssetsProcessor

Class AssetsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\RequestProcessor

Class RequestProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\ThemesProcessor

Class ThemesProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\RenderProcessor

Class RenderProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Interface: \Grav\Common\Processors\ProcessorInterface

Interface ProcessorInterface

Visibility Function

This class implements \Psr\Http\Server\MiddlewareInterface


Class: \Grav\Common\Processors\SchedulerProcessor

Class SchedulerProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\PagesProcessor

Class PagesProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\Events\RequestHandlerEvent

Class RequestHandlerEvent

Visibility Function
public addMiddleware(string $name, \Psr\Http\Server\MiddlewareInterface $middleware) : \Grav\Common\Processors\Events\RequestHandlerEvent
public getHandler() : \Grav\Framework\RequestHandler\RequestHandler
public getRequest() : \Psr\Http\Message\ServerRequestInterface
public getResponse() : \Grav\Common\Processors\Events\ResponseInterface/null
public getRoute() : \Grav\Framework\Route\Route
public setResponse(\Psr\Http\Message\ResponseInterface $response) : \Grav\Common\Processors\Events\$this

This class extends \RocketTheme\Toolbox\Event\Event

This class implements \ArrayAccess, \Psr\EventDispatcher\StoppableEventInterface


Class: \Grav\Common\Recovery\RecoveryManager

Handles recovery flag lifecycle and plugin quarantine during fatal errors.

Visibility Function
public __construct(mixed $context=null) : void
public activate(array $context) : void
Activate recovery mode and record context.
public clear() : void
Remove recovery flag.
public closeUpgradeWindow() : void
public disablePlugin(string $slug, array $context=array()) : void
public getContext() : array/null
Return last recorded recovery context.
public getUpgradeWindow() : array/null
public handleException(\Throwable $exception) : void
Handle uncaught exceptions bubbled to the top-level handler.
public handleShutdown() : void
Shutdown handler capturing fatal errors.
public isActive() : bool
Check if recovery mode flag is active.
public isEnabled() : bool
Check if recovery mode is enabled in system config (updates.recovery_mode).
public isUpgradeWindowActive() : bool
public markUpgradeWindow(string $reason, array $metadata=array(), int $ttlSeconds=604800) : void
Begin an upgrade window; during this window fatal plugin errors may trigger recovery mode.
public onFatalException(\RocketTheme\Toolbox\Event\Event $event) : void
public registerHandlers() : void
Register shutdown handler to capture fatal errors at runtime.
protected generateToken() : string
protected quarantinePlugin(string $slug, array $context) : void
protected randomBytes(int $length) : string
protected resolveLastError() : array/null


Class: \Grav\Common\Scheduler\JobHistory

Job History Manager Provides comprehensive job execution history, logging, and analytics

Visibility Function
public __construct(string $historyPath, int $retentionDays=30) : void
Constructor
public cleanOldHistory() : int Number of files deleted
Clean old history files
public exportToCsv(array $history, string $filename) : bool
Export history to CSV
public getGlobalStatistics(int $days=7) : array
Get global statistics
public getHistoryRange(\DateTime $startDate, \DateTime $endDate, string/null/string $jobId=null) : array
Get history for a date range
public getJobHistory(string $jobId, int $limit=50) : array
Get job history
public getJobStatistics(string $jobId, int $days=7) : array
Get job statistics
public logExecution(\Grav\Common\Scheduler\Job $job, array $metadata=array()) : string Log entry ID
Log job execution
public searchHistory(array $criteria) : array
Search history
protected captureOutput(\Grav\Common\Scheduler\Job $job) : array
Capture job output with length limit
protected storeEntry(array $entry) : void
Store entry in daily log file
protected storeJobHistory(string $jobId, array $entry) : void
Store job-specific history


Class: \Grav\Common\Scheduler\SchedulerController

Scheduler Controller for handling HTTP endpoints

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
SchedulerController constructor
public adminStatus(\Psr\Http\Message\ServerRequestInterface $request) : \Psr\Http\Message\ResponseInterface
Handle admin AJAX requests for scheduler status
public health(\Psr\Http\Message\ServerRequestInterface $request) : \Psr\Http\Message\ResponseInterface
Handle health check endpoint
public statistics(\Psr\Http\Message\ServerRequestInterface $request) : \Psr\Http\Message\ResponseInterface
Handle statistics endpoint
public webhook(\Psr\Http\Message\ServerRequestInterface $request) : \Psr\Http\Message\ResponseInterface
Handle webhook trigger endpoint
protected formatHealthStatus(array $health) : string
Format health status for display
protected formatTriggers(array $triggers) : string
Format triggers for display
protected jsonResponse(array $data, int $statusCode=200) : \Psr\Http\Message\ResponseInterface
Create JSON response


Class: \Grav\Common\Scheduler\Cron

Visibility Function
public __construct(string/null $cron=null) : void
public getCron() : string
public getCronDaysOfMonth() : string
public getCronDaysOfWeek() : string
public getCronHours() : string
public getCronMinutes() : string
public getCronMonths() : string
public getDaysOfMonth() : array
public getDaysOfWeek() : array
public getHours() : array
public getMinutes() : array
public getMonths() : array
public getText(string $lang) : string
public getType() : string
public matchExact(int/string/\Grav\Common\Scheduler\DateTime $date) : void
public matchWithMargin(int/string/\Grav\Common\Scheduler\DateTime $date, int $minuteBefore, int $minuteAfter) : void
public setCron(string $cron) : \Grav\Common\Scheduler\$this
public setDaysOfMonth(string/string[] $dom) : \Grav\Common\Scheduler\$this
public setDaysOfWeek(string/string[] $dow) : \Grav\Common\Scheduler\$this
public setHours(string/string[] $hours) : \Grav\Common\Scheduler\$this
public setMinutes(string/string[] $minutes) : \Grav\Common\Scheduler\$this
public setMonths(string/string[] $months) : \Grav\Common\Scheduler\$this
protected arrayToCron(array $array) : string
protected cronToArray(array/string $string, int $min, int $max) : array
protected parseDate(mixed $date, int $min, int $hour, int $day, int $month, int $weekday) : \Grav\Common\Scheduler\DateTime


Class: \Grav\Common\Scheduler\Scheduler

Class Scheduler

Visibility Function
public __construct() : void
Create new instance.
public addCommand(string $command, array $args=array(), string/null $id=null) : \Grav\Common\Scheduler\Job
Queue a raw shell command.
public addFunction(callable $fn, array $args=array(), string/null $id=null) : \Grav\Common\Scheduler\Job
Queues a PHP function execution.
public clearJobs() : \Grav\Common\Scheduler\$this
Remove all queued Jobs.
public getActiveTriggers() : array
Get active trigger methods
public getAllJobs() : \Grav\Common\Scheduler\Job[]
Get all jobs if they are disabled or not as one array
public getCronCommand() : string
Helper to get the full Cron command
public getHealthStatus() : array
Get health status
public getJob(string $jobid) : \Grav\Common\Scheduler\Job/null
Get a specific Job based on id
public getJobQueue() : \Grav\Common\Scheduler\JobQueue/null
Get the job queue
public getJobStates() : \RocketTheme\Toolbox\File\YamlFile
Get the Job states file
public getLogger() : \Grav\Common\Scheduler\Logger/null
Get the scheduler logger
public getQueue() : \Grav\Common\Scheduler\JobQueue/null
Get the job queue
public getQueuedJobs(bool $all=false) : array
Get the queued jobs as background/foreground
public getSchedulerCommand(string/null $php=null) : string
public getVerboseOutput(string $type='text') : string/array The return depends on the requested $type
Get the scheduler verbose output.
public isCrontabSetup() : int
Helper to determine if cron-like job is setup 0 - Crontab Not found 1 - Crontab Found 2 - Error
public isWebhookEnabled() : bool
Check if webhook is enabled
public loadSavedJobs() : \Grav\Common\Scheduler\$this
Load saved jobs from config/scheduler.yaml file
public processWebhookTrigger(string/null $token=null, string/null $jobId=null) : array
Process webhook trigger
public resetRun() : \Grav\Common\Scheduler\$this
Reset all collected data of last run. Call before run() if you call run() multiple times.
public run(\Grav\Common\Scheduler\DateTime/null/\DateTime $runTime=null, bool $force=false) : void
Run the scheduler.
public whoami() : false/string
Try to determine who's running the process
protected executeJob(\Grav\Common\Scheduler\Job $job, string/null/string $queueId=null) : void
Execute a job
protected initializeLogger(mixed $locator) : void
Initialize the scheduler logger
protected initializeModernFeatures(mixed $locator) : void
Initialize modern features
protected processJobsWithWorkers() : void
Process jobs using multiple workers
protected processQueuedJobs() : void
Process existing queued jobs
protected saveJobHistory() : void
Save job execution history
protected saveJobState(\Grav\Common\Scheduler\Job $job) : void
Save state for a single job
protected updateLastRun() : void
Update last run timestamp


Class: \Grav\Common\Scheduler\JobQueue

File-based job queue implementation

Visibility Function
public __construct(string $queuePath) : void
JobQueue constructor
public complete(string $queueId) : void
Mark a job as completed
public fail(string $queueId, string $error='') : void
Mark a job as failed
public getStatistics() : array
Get queue statistics
public isEmpty() : bool
Check if queue is empty
public pop() : \Grav\Common\Scheduler\Job/null
Pop the next job from the queue
public popWithId() : array/null Array with 'job' and 'id' keys
Pop a job from the queue with its queue ID
public push(\Grav\Common\Scheduler\Job $job, string $priority='normal') : string Job queue ID
Push a job to the queue
public pushDelayed(\Grav\Common\Scheduler\Job $job, \DateTime $scheduledFor, string $priority='normal') : string
Push a job for delayed execution
public size() : int
Get queue size
protected calculateRetryTime(int $attempts) : string
Calculate retry time with exponential backoff
protected cleanupCompleted() : void
Clean up old completed items
protected countCompletedToday() : int
Count completed jobs today
protected deleteQueueItem(string $queueId, string $directory) : void
Delete queue item
protected generateQueueId(\Grav\Common\Scheduler\Job $job) : string
Generate a unique queue ID
protected getItemsInDirectory(string $directory) : array
Get items in a specific directory
protected getPendingItems() : array
Get all pending items
protected getQueueItem(string $queueId, string $directory) : array/null
Read queue item from disk
protected initializeDirectories() : void
Initialize queue directories
protected lock() : bool
Acquire lock for queue operations
protected moveQueueItem(string $queueId, string $fromDir, string $toDir) : void
Move queue item between directories
protected reconstructJob(array $item) : \Grav\Common\Scheduler\Job/null
Reconstruct a job from queue item
protected unlock() : void
Release queue lock
protected writeQueueItem(array $item, string $directory) : void
Write queue item to disk


Class: \Grav\Common\Scheduler\Job

Class Job

Visibility Function
public __construct(string/callable $command, array $args=array(), string/null $id=null) : void
Create a new Job instance.
public april(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every April.
public at(string $expression) : \Grav\Common\Scheduler\self
Set the Job execution time.
public august(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every August.
public backlink(string/null $link=null) : string/null
Sets/Gets an option backlink
public before(callable $fn) : \Grav\Common\Scheduler\self
Set function to be called before job execution Job object is injected as a parameter to callable function.
public chain(\Grav\Common\Scheduler\Job $job, bool $onlyOnSuccess=true) : \Grav\Common\Scheduler\self
Chain another job to run after this one
public configure(array $config=array()) : \Grav\Common\Scheduler\self
Configure the job.
public daily(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to once a day.
public december(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every December.
public dependsOn(string $jobId) : \Grav\Common\Scheduler\self
Add job dependency
public email(string/array $email) : \Grav\Common\Scheduler\self
Set the emails where the output should be sent to. The Job should be set to write output to a file for this to work.
public everyMinute() : \Grav\Common\Scheduler\self
Set the execution time to every minute.
public february(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every February.
public finalize() : void
Finish up processing the job
public friday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Friday.
public static fromArray(array $data) : \Grav\Common\Scheduler\self
Create job from array
public getArguments() : string/null
Get optional arguments
public getAt() : string
Get the cron 'at' syntax for this job
public getCommand() : \Grav\Common\Scheduler\Closure/string
Get the command
public getCronExpression() : \Grav\Common\Scheduler\CronExpression/null
public getEnabled() : bool
Get the status of this job
public getExecutionTime() : float
Get execution time in seconds
public getId() : string
Get the Job id.
public getMaxAttempts() : int
Get maximum retry attempts
public getMetadata(string/null/string $key=null) : mixed
Get job metadata
public getOutput() : mixed
Get the job output.
public getPriority() : string
Get job priority
public getProcess() : \Grav\Common\Scheduler\Process/null
Get process (for background jobs)
public getQueueId() : string/null
Get queue ID
public getRawArguments() : array/string
Get raw arguments (array or string)
public getRetryCount() : int
Get current retry count
public getTags() : array
Get job tags
public hasTag(string $tag) : bool
Check if job has a specific tag
public hourly(int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every hour.
public inForeground() : \Grav\Common\Scheduler\$this
Force the Job to run in foreground.
public isDue(\Grav\Common\Scheduler\DateTime/null/\DateTime $date=null) : bool
Check if the Job is due to run. It accepts as input a DateTime used to check if the job is due. Defaults to job creation time. It also default the execution time if not previously defined.
public isOverlapping() : bool
Check if the Job is overlapping.
public isSuccessful() : bool
Get the status of the last run for this job
public static isValidCronExpression(string $expression) : bool
Validate a cron expression
public january(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every January.
public july(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every July.
public june(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every June.
public march(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every March.
public maxAttempts(int $attempts) : \Grav\Common\Scheduler\self
Set maximum retry attempts
public may(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every May.
public monday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Monday.
public monthly(string/int/string $month='*', int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to once a month.
public november(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every November.
public october(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every October.
public onFailure(callable $callback) : \Grav\Common\Scheduler\self
Set failure callback
public onRetry(callable $callback) : \Grav\Common\Scheduler\self
Set retry callback
public onSuccess(callable $callback) : \Grav\Common\Scheduler\self
Set success callback
public onlyOne(string/null $tempDir=null, callable/null/callable $whenOverlapping=null) : \Grav\Common\Scheduler\self
This will prevent the Job from overlapping. It prevents another instance of the same Job of being executed if the previous is still running. The job id is used as a filename for the lock file.
public output(string/array $filename, bool $append=false) : \Grav\Common\Scheduler\self
Set the file/s where to write the output of the job.
public priority(string $priority) : \Grav\Common\Scheduler\self
Set job priority
public retryDelay(int $seconds, string $strategy='exponential') : \Grav\Common\Scheduler\self
Set retry delay
public run() : bool
Run the job.
public runInBackground() : bool
Check if the Job can run in background.
public runWithRetry() : bool
Run the job with retry support
public saturday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Saturday.
public september(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every September.
public setQueueId(string $queueId) : \Grav\Common\Scheduler\self
Set queue ID
public sunday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Sunday.
public then(callable $fn, bool $runInBackground=false) : \Grav\Common\Scheduler\self
Set a function to be called after job execution. By default this will force the job to run in foreground because the output is injected as a parameter of this function, but it could be avoided by passing true as a second parameter. The job will run in background if it meets all the other criteria.
public thursday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Thursday.
public timeout(int $seconds) : \Grav\Common\Scheduler\self
Set job timeout
public toArray() : array
Convert job to array for serialization
public tuesday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Tuesday.
public wednesday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Wednesday.
public weekly(int/string $weekday, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to once a week.
public when(callable $fn) : \Grav\Common\Scheduler\self
Truth test to define if the job should run if due.
public withMetadata(string $key, mixed $value) : \Grav\Common\Scheduler\self
Add metadata to the job
public withTags(array $tags) : \Grav\Common\Scheduler\self
Add tags to the job
protected calculateRetryDelay(int $attempt) : int
Calculate retry delay based on strategy
protected checkDependencies() : bool
Check if dependencies are met
protected runChainedJobs(bool $success) : void
Run chained jobs


Class: \Grav\Common\Service\BackupsServiceProvider

Class BackupsServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\AccountsServiceProvider

Class AccountsServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void
protected flexAccounts(\Pimple\Container $container) : \Grav\Common\Service\FlexIndexInterface/null
protected initialize(\Pimple\Container $container) : string
protected regularAccounts(\Pimple\Container $container) : \Grav\Common\Service\DataUser\UserCollection

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\FilesystemServiceProvider

Class FilesystemServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\SessionServiceProvider

Class SessionServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\ErrorServiceProvider

Class ErrorServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\PagesServiceProvider

Class PagesServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\SchedulerServiceProvider

Class SchedulerServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\InflectorServiceProvider

Class InflectorServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\TaskServiceProvider

Class TaskServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\AssetsServiceProvider

Class AssetsServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\ConfigServiceProvider

Class ConfigServiceProvider

Visibility Function
public static blueprints(\Pimple\Container $container) : mixed
public static languages(\Pimple\Container $container) : mixed
public static load(\Pimple\Container $container) : \Grav\Common\Config\Config
public register(\Pimple\Container $container) : void
protected static loadCachedFileList(\RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator $locator, string $cacheDir, string $type, string $environment) : array/null Returns cached files array or null if cache is invalid
Load cached file list if still valid (based on directory and file mtimes).
protected static pluginFolderPaths(array $plugins, string $folder_path) : array
Find specific paths in plugins
protected static saveCachedFileList(\RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator $locator, string $cacheDir, string $type, string $environment, array $files) : void
Save file list to cache with directory and file mtimes for validation.

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\StreamsServiceProvider

Class StreamsServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \RocketTheme\Toolbox\DI\ServiceProviderInterface, \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\OutputServiceProvider

Class OutputServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\RequestServiceProvider

Class RequestServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\LoggerServiceProvider

Class LoggerServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\FlexServiceProvider

Class FlexServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Twig\TwigClockworkDataSource

Class TwigClockworkDataSource

Visibility Function
public __construct(\Twig\Environment $twig) : void
public listenToEvents() : void
Register the Twig profiler extension
public resolve(\Clockwork\Request\Request $request) : \Clockwork\Request\Request
Adds rendered views to the request

This class extends \Clockwork\DataSource\DataSource

This class implements \Clockwork\DataSource\DataSourceInterface


Class: \Grav\Common\Twig\TwigExtension

DEPRECATED 1.7 Use GravExtension instead

Visibility Function

This class extends \Grav\Common\Twig\Extension\GravExtension

This class implements \Twig\Extension\GlobalsInterface, \Twig\Extension\ExtensionInterface, \Twig\Extension\LastModifiedExtensionInterface


Class: \Grav\Common\Twig\TwigEnvironment

Class TwigEnvironment

Visibility Function
public getExtension(\Twig\class-string/string $class) : \Twig\TExtension
public resolveTemplate(string/\Twig\TemplateWrapper/\Twig\array<string/\Twig\TemplateWrapper> $names) : void
Tries to load a template consecutively from an array. Similar to load() but it also accepts instances of \Twig\TemplateWrapper and an array of templates where each is tried to be loaded.

This class extends \Twig\Environment


Class: \Grav\Common\Twig\TwigClockworkDumper

Class TwigClockworkDumper

Visibility Function
public dump(\Twig\Profiler\Profile $profile) : \Clockwork\Request\Timeline\Timeline
Dumps a profile into a new rendered views timeline
public dumpProfile(\Twig\Profiler\Profile $profile, \Clockwork\Request\Timeline\Timeline $timeline, null $parent=null) : void


Class: \Grav\Common\Twig\Compatibility\Twig3CompatibilityLoader

Decorates the active Twig loader to rewrite legacy Twig 1/2 constructs on the fly. This loader wraps the ChainLoader and transforms template source code for Twig 3 compatibility. It also proxies common FilesystemLoader methods to maintain backwards compatibility with plugins that may call these methods on the loader.

Visibility Function
public __construct(\Twig\Loader\LoaderInterface $inner, \Grav\Common\Twig\Compatibility\Twig3CompatibilityTransformer $transformer) : void
public addPath(string $path, string $namespace='__main__') : void
Proxy addPath to the FilesystemLoader.
public exists(string $name) : void
public getCacheKey(string $name) : mixed
public getFilesystemLoader() : \Grav\Common\Twig\Compatibility\FilesystemLoader/null
Get the FilesystemLoader from the inner ChainLoader.
public getInnerLoader() : \Twig\Loader\LoaderInterface
Get the inner loader (ChainLoader).
public getNamespaces() : array
Proxy getNamespaces to the FilesystemLoader.
public getPaths(string $namespace='__main__') : array
Proxy getPaths to the FilesystemLoader.
public getSourceContext(string $name) : mixed
public isFresh(string $name, int $time) : bool
public prependPath(string $path, string $namespace='__main__') : void
Proxy prependPath to the FilesystemLoader.
public setPaths(array $paths, string $namespace='__main__') : void
Proxy setPaths to the FilesystemLoader.

This class implements \Twig\Loader\LoaderInterface


Class: \Grav\Common\Twig\Compatibility\Twig3CompatibilityTransformer

Applies automatic rewrites that help legacy Twig 1/2 templates compile under Twig 3.

Visibility Function
public transform(string $code) : void
Transform raw Twig source code.


Class: \Grav\Common\Twig\Exception\TwigException

TwigException gets thrown when you use {% throw code message %} in twig. This allows Grav to catch 401, 403 and 404 exceptions and display proper error page.

Visibility Function

This class extends \RuntimeException

This class implements \Stringable, \Throwable


Class: \Grav\Common\Twig\Extension\FilesystemExtension

Class FilesystemExtension

Visibility Function
public __construct() : void
public exif_imagetype(string $filename) : int/false
public exif_read_data(string $filename, string/null/string $required_sections=null, bool $as_arrays=false, bool $read_thumbnail=false) : array/false
public file_exists(string $filename) : bool
public fileatime(string $filename) : int/false
public filectime(string $filename) : int/false
public filemtime(string $filename) : int/false
public filesize(string $filename) : int/false
public filetype(string $filename) : string/false
public getFilters() : \Twig\TwigFilter[]
public getFunctions() : \Twig\TwigFunction[]
Return a list of all functions.
public get_meta_tags(string $filename) : array/false
public getimagesize(string $filename) : array/false
public hash_file(string $algo, string $filename, bool $binary=false) : string/false
public hash_hmac_file(string $algo, string $filename, string $key, bool $binary=false) : string/false
public is_dir(string $filename) : bool
public is_file(string $filename) : bool
public is_link(string $filename) : bool
public is_readable(string $filename) : bool
public is_writable(string $filename) : bool
public lstat(string $filename) : array/false
public md5_file(string $filename, bool $binary=false) : string/false
public pathinfo(string $path, int/null $flags=null) : string/string[]
public sha1_file(string $filename, bool $binary=false) : string/false

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface, \Twig\Extension\LastModifiedExtensionInterface


Class: \Grav\Common\Twig\Node\TwigNodeMarkdown

Class TwigNodeMarkdown

Visibility Function
public __construct(\Twig\Node\Node $body, int $lineno, string $tag='markdown') : void
TwigNodeMarkdown constructor.
public compile(\Twig\Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Stringable, \Traversable, \Twig\Node\NodeOutputInterface


Class: \Grav\Common\Twig\Node\TwigNodeThrow

Class TwigNodeThrow

Visibility Function
public __construct(int $code, \Twig\Node\Node $message, int $lineno, string/null $tag=null) : void
TwigNodeThrow constructor.
public compile(\Twig\Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Traversable, \Stringable, \IteratorAggregate, \Countable


Class: \Grav\Common\Twig\Node\TwigNodeCache

Class TwigNodeCache

Visibility Function
public __construct(\Twig\Node\Node $body, string/\Twig\Node\Expression\AbstractExpression $key, int/\Twig\Node\Expression\AbstractExpression $lifetime, array $defaults, integer/int $lineno, string/null/string $tag) : void
public compile(\Twig\Compiler $compiler) : void

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Stringable, \Traversable, \Twig\Node\NodeOutputInterface


Class: \Grav\Common\Twig\Node\TwigNodeRender

Class TwigNodeRender

Visibility Function
public __construct(\Twig\Node\Expression\AbstractExpression $object, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $layout, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $context, int $lineno, string/null $tag=null) : void
public compile(\Twig\Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Stringable, \Traversable, \Twig\Node\NodeCaptureInterface


Class: \Grav\Common\Twig\Node\TwigNodeTryCatch

Class TwigNodeTryCatch

Visibility Function
public __construct(\Twig\Node\Node $try, \Grav\Common\Twig\Node\Node/null/\Twig\Node\Node $catch=null, int $lineno, string/null $tag=null) : void
TwigNodeTryCatch constructor.
public compile(\Twig\Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Traversable, \Stringable, \IteratorAggregate, \Countable


Class: \Grav\Common\Twig\Node\TwigNodeScript

Class TwigNodeScript

Visibility Function
public __construct(\Grav\Common\Twig\Node\Node/null/\Twig\Node\Node $body, string/null/string $type, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $file, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $group, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $priority, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $attributes, int $lineno, string/null $tag=null) : void
TwigNodeScript constructor.
public compile(\Twig\Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Stringable, \Traversable, \Twig\Node\NodeCaptureInterface


Class: \Grav\Common\Twig\Node\TwigNodeStyle

Class TwigNodeStyle

Visibility Function
public __construct(\Grav\Common\Twig\Node\Node/null/\Twig\Node\Node $body, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $file, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $group, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $priority, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $attributes, int $lineno, string/null $tag=null) : void
TwigNodeAssets constructor.
public compile(\Twig\Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Stringable, \Traversable, \Twig\Node\NodeCaptureInterface


Class TwigNodeLink

Visibility Function
public __construct(string/null/string $rel, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $file, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $group, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $priority, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $attributes, int $lineno, string/null $tag=null) : void
TwigNodeLink constructor.
public compile(\Twig\Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Stringable, \Traversable, \Twig\Node\NodeCaptureInterface


Class: \Grav\Common\Twig\Node\TwigNodeSwitch

Class TwigNodeSwitch

Visibility Function
public __construct(\Twig\Node\Node $value, \Twig\Node\Node $cases, \Grav\Common\Twig\Node\Node/null/\Twig\Node\Node $default=null, int $lineno, string/null $tag=null) : void
TwigNodeSwitch constructor.
public compile(\Twig\Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Traversable, \Stringable, \IteratorAggregate, \Countable


Class: \Grav\Common\Twig\TokenParser\TwigTokenParserTryCatch

Handles try/catch in template file.

 {% try %} 
  • {{ user.get('name') }}
  • {% catch %} {{ e.message }} {% endcatch %}
    Visibility Function
    public decideCatch(\Twig\Token $token) : bool
    public decideEnd(\Twig\Token $token) : bool
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig\Token $token) : \Grav\Common\Twig\Node\TwigNodeTryCatch
    Parses a token and returns a node.

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserRender

    Renders an object. {% render object layout: 'default' with { variable: true } %}

    Visibility Function
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig\Token $token) : \Grav\Common\Twig\Node\TwigNodeRender
    Parses a token and returns a node.
    protected parseArguments(\Twig\Token $token) : array

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserCache

    Adds ability to cache Twig between tags. {% cache 600 %} {{ some_complex_work() }} {% endcache %} Also can provide a unique key for the cache: {% cache "prefix-"~lang 600 %} Where the "prefix-"~lang will use a unique key based on the current language. "prefix-en" for example

    Visibility Function
    public decideCacheEnd(\Twig\Token $token) : void
    public getTag() : mixed
    public parse(\Twig\Token $token) : void

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserSwitch

    Adds ability use elegant switch instead of ungainly if statements {% switch type %} {% case 'foo' %} {{ my_data.foo }} {% case 'bar' %} {{ my_data.bar }} {% default %} {{ my_data.default }} {% endswitch %}

    Visibility Function
    public decideIfEnd(\Twig\Token $token) : bool
    Decide if current token marks end of swtich block.
    public decideIfFork(\Twig\Token $token) : bool
    Decide if current token marks switch logic.
    public getTag() : mixed
    public parse(\Twig\Token $token) : \Grav\Common\Twig\Node\TwigNodeSwitch

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserThrow

    Handles try/catch in template file.

     {% throw 404 'Not Found' %} 
    Visibility Function
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig\Token $token) : \Grav\Common\Twig\Node\TwigNodeThrow
    Parses a token and returns a node.

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserScript

    Adds a script to head/bottom/custom group location in the document. {% script 'theme://js/something.js' at 'bottom' priority: 20 with { position: 'pipeline', loading: 'async defer' } %} {% script module 'theme://js/module.mjs' at 'head' %} {% script 'theme://js/something.js' at 'bottom' priority: 20 with { loading: 'inline' } %} {% script at 'bottom' priority: 20 %} alert('Warning!'); {% endscript %} {% script module 'theme://js/module.mjs' at 'bottom' with { loading: 'inline' } %} {% script module at 'bottom' %} ... {% endscript %}

    Visibility Function
    public decideBlockEnd(\Twig\Token $token) : bool
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig\Token $token) : \Grav\Common\Twig\Node\TwigNodeScript
    Parses a token and returns a node.
    protected parseArguments(\Twig\Token $token) : array

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserMarkdown

    Adds ability to inline markdown between tags. {% markdown %} This is bold and this underlined 1. This is a bullet list 2. This is another item in that same list {% endmarkdown %}

    Visibility Function
    public decideMarkdownEnd(\Twig\Token $token) : bool
    Decide if current token marks end of Markdown block.
    public getTag() : mixed
    public parse(\Twig\Token $token) : \Grav\Common\Twig\Node\TwigNodeMarkdown

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserStyle

    Adds a style to the document. {% style 'theme://css/foo.css' priority: 20 %} {% style priority: 20 with { media: 'screen' } %} a { color: red; } {% endstyle %}

    Visibility Function
    public decideBlockEnd(\Twig\Token $token) : bool
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig\Token $token) : \Grav\Common\Twig\Node\TwigNodeStyle
    Parses a token and returns a node.
    protected parseArguments(\Twig\Token $token) : array

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserLink

    Adds a link to the document. First parameter is always value of rel without quotes. {% link icon 'theme://images/favicon.png' priority: 20 with { type: 'image/png' } %} {% link modulepreload 'plugin://grav-plugin/build/js/vendor.js' %}

    Visibility Function
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig\Token $token) : \Grav\Common\Twig\Node\TwigNodeLink
    Parses a token and returns a node.
    protected parseArguments(\Twig\Token $token) : array

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Upgrade\SafeUpgradeService

    Safe upgrade orchestration for Grav core.

    Visibility Function
    public __construct(array $options=array()) : void
    public clearRecoveryFlag() : void
    public createSnapshot(string/null/string $label=null) : array
    Create a manual snapshot of the current Grav installation.
    public createUpgradeSnapshot(string $targetVersion, string/null/string $label=null) : array
    Create a snapshot specifically for automated upgrades.
    public getLastManifest() : array/null
    public preflight(string/null/string $targetVersion=null) : array{plugins_pending: array<string, array>, psr_log_conflicts: array<string, array>, warnings: string[], is_major_minor_upgrade: bool}
    Run preflight validations before attempting an upgrade.
    public promote(string $extractedPath, string $targetVersion, \Grav\Common\Upgrade\array/array $ignores) : array Manifest data.
    Stage and promote a Grav update from an extracted folder.
    public rollback(string/null/string $id=null) : array/null
    Roll back to the most recent snapshot.
    public setProgressCallback(callable $callback) : void
    protected detectMonologConflicts() : array<string, array>
    Detect usage of deprecated Monolog add* methods removed in newer releases.
    protected detectPendingPluginUpdates() : array<string, array>
    protected detectPsrLogConflicts() : array<string, array>
    Check plugins for psr/log requirements that conflict with Grav 1.8 vendor stack.
    protected isGpmPackagePublished(mixed $package) : bool
    Determine if the provided GPM package metadata is marked as published. By default the GPM repository omits the published flag, so we only treat the package as unpublished when the value exists and evaluates to false.
    protected isPluginEnabled(string $slug) : bool
    protected isThemeEnabled(string $slug) : bool


    Class: \Grav\Common\User\Access

    Class Access

    Visibility Function
    public get(string $action) : bool/null

    This class extends \Grav\Framework\Acl\Access

    This class implements \Traversable, \Countable, \IteratorAggregate, \JsonSerializable


    Class: \Grav\Common\User\Group

    DEPRECATED 1.7 Use $grav['user_groups'] instead of this class. In type hints, please use UserGroupInterface.

    Visibility Function
    public static groupExists(string $groupname) : bool
    DEPRECATED - 1.7, use $grav['user_groups'] Flex UserGroupCollection instead
    public static groupNames() : array
    DEPRECATED - 1.7, use $grav['user_groups'] Flex UserGroupCollection instead
    public static load(string $groupname) : object
    DEPRECATED - 1.7, use $grav['user_groups'] Flex UserGroupCollection instead
    public static remove(string $groupname) : bool True if the action was performed
    DEPRECATED - 1.7, use $grav['user_groups'] Flex UserGroupCollection instead
    public save() : void
    Save a group
    protected static groups() : array
    DEPRECATED - 1.7, use $grav['user_groups'] Flex UserGroupCollection instead

    This class extends \Grav\Common\Data\Data

    This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


    Class: \Grav\Common\User\Authentication (abstract)

    Class Authentication

    Visibility Function
    public static create(string $password) : string
    Create password hash from plaintext password.
    public static verify(string $password, string $hash) : int Returns if the check fails, 1 if password matches, 2 if hash needs to be updated.
    Verifies that a password matches a hash.


    Class: \Grav\Common\User\DataUser\User

    Class User

    Visibility Function
    public __construct(array $items=array(), \Grav\Common\User\DataUser\Blueprint/null $blueprints=null) : void
    User constructor.
    public __sleep() : string[]
    Serialize user.
    public __wakeup() : void
    Unserialize user.
    public authenticate(string $password) : bool
    Authenticate user. If user password needs to be updated, new information will be saved.
    public authorise(string $action) : bool
    DEPRECATED - 1.5 Use ->authorize() method instead.
    public authorize(string $action, string/null/string $scope=null) : bool/null
    Checks user authorization to the action.
    public avatarUrl() : string
    DEPRECATED - 1.6 Use ->getAvatarUrl() method instead.
    public count() : int
    DEPRECATED - 1.6 Method makes no sense for user account.
    public getAvatarImage() : \Grav\Common\User\DataUser\ImageMedium/\Grav\Common\User\DataUser\StaticImageMedium/null
    Return media object for the User's avatar. Note: if there's no local avatar image for the user, you should call getAvatarUrl() to get the external avatar URL.
    public getAvatarMedia() : \Grav\Common\User\DataUser\Medium/null
    DEPRECATED - 1.6 Use ->getAvatarImage() method instead.
    public getAvatarUrl() : string
    Return the User's avatar URL
    public getMedia() : \Grav\Common\User\DataUser\MediaCollectionInterface/\Grav\Common\User\DataUser\Media
    public getMediaFolder() : string
    public getMediaOrder() : array
    public isValid() : bool
    public static isValidUsername(string $username) : bool
    Validates a username to prevent path traversal and other attacks.
    public jsonSerialize() : void
    public merge(array $data) : \Grav\Common\User\DataUser\$this
    DEPRECATED - 1.6 Use ->update($data) instead (same but with data validation & filtering, file upload support).
    public offsetExists(string $offset) : bool
    public offsetGet(string $offset) : mixed
    public save() : void
    Save user
    public update(array $data, array $files=array()) : \Grav\Common\User\DataUser\$this
    Update object with data
    protected filterUsername(string $username) : string
    protected generateMultiavatar(string $hash) : string
    protected getAvatarFile() : string/null

    This class extends \Grav\Common\Data\Data

    This class implements \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\User\Interfaces\UserInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Common\User\Interfaces\AuthorizeInterface


    Class: \Grav\Common\User\DataUser\UserCollection

    Class UserCollection

    Visibility Function
    public __construct(string $className) : void
    UserCollection constructor.
    public count() : int
    public delete(string $username) : bool True if the action was performed
    Remove user account.
    public find(string $query, array $fields=array()) : \Grav\Common\User\Interfaces\UserInterface
    Find a user by username, email, etc
    public load(string $username) : \Grav\Common\User\Interfaces\UserInterface
    Load user account. Always creates user object. To check if user exists, use $this->exists().
    protected filterUsername(string $username) : string

    This class implements \Grav\Common\User\Interfaces\UserCollectionInterface, \Countable


    Interface: \Grav\Common\User\Interfaces\UserInterface

    Interface UserInterface

    Visibility Function
    public authenticate(string $password) : bool
    Authenticate user. If user password needs to be updated, new information will be saved.
    public def(string $name, mixed $default=null, string/null $separator=null) : \Grav\Common\User\Interfaces\$this
    Set default value by using dot notation for nested arrays/objects.
    public exists() : bool
    Returns whether the data already exists in the storage. NOTE: This method does not check if the data is current.
    public get(string $name, mixed $default=null, string/null $separator=null) : mixed Value.
    Get value by using dot notation for nested arrays/objects.
    public getAvatarImage() : \Grav\Common\User\Interfaces\Medium/null
    Return media object for the User's avatar. Note: if there's no local avatar image for the user, you should call getAvatarUrl() to get the external avatar URL.
    public getAvatarUrl() : string
    Return the User's avatar URL.
    public getDefaults() : array
    Get nested structure containing default values defined in the blueprints. Fields without default value are ignored in the list.
    public getJoined(string $name, array/object $value, string $separator='.') : array
    Get value from the configuration and join it with given data.
    public join(string $name, mixed $value, string $separator='.') : \Grav\Common\User\Interfaces\$this
    Join nested values together by using blueprints.
    public joinDefaults(string $name, mixed $value, string $separator='.') : \Grav\Common\User\Interfaces\$this
    Set default values by using blueprints.
    public raw() : string
    Return unmodified data as raw string. NOTE: This function only returns data which has been saved to the storage.
    public set(string $name, mixed $value, string/null $separator=null) : \Grav\Common\User\Interfaces\$this
    Set value by using dot notation for nested arrays/objects.
    public setDefaults(array $data) : \Grav\Common\User\Interfaces\$this
    Set default values to the configuration if variables were not set.
    public undef(string $name, string/null $separator=null) : \Grav\Common\User\Interfaces\$this
    Unset value by using dot notation for nested arrays/objects.
    public update(array $data, array $files=array()) : \Grav\Common\User\Interfaces\$this
    Update object with data
    Examples of UserInterface::def()
    TXT
    $data->def('this.is.my.nested.variable', 'default');
    
    Examples of UserInterface::get()
    TXT
    $value = $this->get('this.is.my.nested.variable');
    
    Examples of UserInterface::set()
    TXT
    $data->set('this.is.my.nested.variable', $value);
    
    Examples of UserInterface::undef()
    TXT
    $data->undef('this.is.my.nested.variable');
    

    This class implements \Grav\Common\User\Interfaces\AuthorizeInterface, \Grav\Common\Data\DataInterface, \Grav\Common\Media\Interfaces\MediaInterface, \ArrayAccess, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Framework\Media\Interfaces\MediaInterface


    Interface: \Grav\Common\User\Interfaces\UserGroupInterface

    Interface UserGroupInterface

    Visibility Function

    This class implements \Grav\Common\User\Interfaces\AuthorizeInterface


    Interface: \Grav\Common\User\Interfaces\UserCollectionInterface

    Visibility Function
    public delete(string $username) : bool True if user account was found and was deleted.
    Delete user account.
    public find(string $query, array $fields=array()) : \Grav\Common\User\Interfaces\UserInterface
    Find a user by username, email, etc
    public load(string $username) : \Grav\Common\User\Interfaces\UserInterface
    Load user account. Always creates user object. To check if user exists, use $this->exists().

    This class implements \Countable


    Interface: \Grav\Common\User\Interfaces\AuthorizeInterface

    Interface AuthorizeInterface

    Visibility Function
    public authorize(string $action, string/null/string $scope=null) : bool/null
    Checks user authorization to the action.


    Class: \Grav\Console\GravCommand

    Class ConsoleCommand

    Visibility Function
    public addOption(string $name, string/array/null/array/string $shortcut=null, int/null/int $mode=null, string $description='', string/string[]/int/bool/null/mixed $default=null, \Closure/array $suggestedValues=array()) : \Grav\Console\$this
    Adds an option.
    public clearCache(array $all=array()) : int
    public composerUpdate(string $path, string $action='install') : string/false
    public getIO() : \Grav\Console\SymfonyStyle
    public getInput() : mixed
    public invalidateCache() : void
    public isGravInstance(string $path) : void
    public loadLocalConfig() : string/false The local config file name. false if local config does not exist
    Load the local config file
    public setupConsole(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : void
    Set colors style definition for the formatter.
    protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : int
    protected initializeGrav() : \Grav\Console\$this
    Initialize Grav. - Load configuration - Initialize logger - Disable debugger - Set timezone, locale - Load plugins (call PluginsLoadedEvent) - Set Pages and Users type to be used in the site Safe to be called multiple times.
    protected initializePages() : \Grav\Console\$this
    Properly initialize pages. - call $this->initializeThemes() - initialize assets (call onAssetsInitialized event) - initialize twig (calls the twig events) - initialize pages (calls onPagesInitialized event) Safe to be called multiple times.
    protected initializePlugins() : \Grav\Console\$this
    Properly initialize plugins. - call $this->initializeGrav() - call onPluginsInitialized event Safe to be called multiple times.
    protected initializeThemes() : \Grav\Console\$this
    Properly initialize themes. - call $this->initializePlugins() - initialize theme (call onThemeInitialized event) Safe to be called multiple times.
    protected serve() : int
    Override with your implementation.
    protected setLanguage(string/null/string $code=null) : \Grav\Console\$this
    Set language to be used in CLI.
    protected setupGrav() : void

    This class extends \Symfony\Component\Console\Command\Command

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\GpmCommand

    Class ConsoleCommand

    Visibility Function
    public addOption(string $name, string/array/null/array/string $shortcut=null, int/null/int $mode=null, string $description='', string/string[]/int/bool/null/mixed $default=null, \Closure/array $suggestedValues=array()) : \Grav\Console\$this
    Adds an option.
    public clearCache(array $all=array()) : int
    public composerUpdate(string $path, string $action='install') : string/false
    public getIO() : \Grav\Console\SymfonyStyle
    public getInput() : mixed
    public invalidateCache() : void
    public isGravInstance(string $path) : void
    public loadLocalConfig() : string/false The local config file name. false if local config does not exist
    Load the local config file
    public setupConsole(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : void
    Set colors style definition for the formatter.
    protected displayGPMRelease() : void
    protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : int
    protected initializeGrav() : \Grav\Console\$this
    Initialize Grav. - Load configuration - Initialize logger - Disable debugger - Set timezone, locale - Load plugins (call PluginsLoadedEvent) - Set Pages and Users type to be used in the site Safe to be called multiple times.
    protected initializePages() : \Grav\Console\$this
    Properly initialize pages. - call $this->initializeThemes() - initialize assets (call onAssetsInitialized event) - initialize twig (calls the twig events) - initialize pages (calls onPagesInitialized event) Safe to be called multiple times.
    protected initializePlugins() : \Grav\Console\$this
    Properly initialize plugins. - call $this->initializeGrav() - call onPluginsInitialized event Safe to be called multiple times.
    protected initializeThemes() : \Grav\Console\$this
    Properly initialize themes. - call $this->initializePlugins() - initialize theme (call onThemeInitialized event) Safe to be called multiple times.
    protected serve() : int
    Override with your implementation.
    protected setLanguage(string/null/string $code=null) : \Grav\Console\$this
    Set language to be used in CLI.
    protected setupGrav() : void

    This class extends \Symfony\Component\Console\Command\Command

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\ConsoleCommand

    Class ConsoleCommand

    Visibility Function
    public addOption(string $name, string/array/null/array/string $shortcut=null, int/null/int $mode=null, string $description='', string/string[]/int/bool/null/mixed $default=null, \Closure/array $suggestedValues=array()) : \Grav\Console\$this
    Adds an option.
    public clearCache(array $all=array()) : int
    public composerUpdate(string $path, string $action='install') : string/false
    public getIO() : \Grav\Console\SymfonyStyle
    public getInput() : mixed
    public invalidateCache() : void
    public isGravInstance(string $path) : void
    public loadLocalConfig() : string/false The local config file name. false if local config does not exist
    Load the local config file
    public setupConsole(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : void
    Set colors style definition for the formatter.
    protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : int
    protected initializeGrav() : \Grav\Console\$this
    Initialize Grav. - Load configuration - Initialize logger - Disable debugger - Set timezone, locale - Load plugins (call PluginsLoadedEvent) - Set Pages and Users type to be used in the site Safe to be called multiple times.
    protected initializePages() : \Grav\Console\$this
    Properly initialize pages. - call $this->initializeThemes() - initialize assets (call onAssetsInitialized event) - initialize twig (calls the twig events) - initialize pages (calls onPagesInitialized event) Safe to be called multiple times.
    protected initializePlugins() : \Grav\Console\$this
    Properly initialize plugins. - call $this->initializeGrav() - call onPluginsInitialized event Safe to be called multiple times.
    protected initializeThemes() : \Grav\Console\$this
    Properly initialize themes. - call $this->initializePlugins() - initialize theme (call onThemeInitialized event) Safe to be called multiple times.
    protected serve() : int
    Override with your implementation.
    protected setLanguage(string/null/string $code=null) : \Grav\Console\$this
    Set language to be used in CLI.
    protected setupGrav() : void

    This class extends \Symfony\Component\Console\Command\Command

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Application\GravApplication

    Class GravApplication

    Visibility Function
    public __construct(string $name='UNKNOWN', string $version='UNKNOWN') : void

    This class extends \Grav\Console\Application\Application

    This class implements \Symfony\Contracts\Service\ResetInterface


    Class: \Grav\Console\Application\Application

    Class GpmApplication

    Visibility Function
    public __construct(string $name='UNKNOWN', string $version='UNKNOWN') : void
    PluginApplication constructor.
    public getCommandName(\Symfony\Component\Console\Input\InputInterface $input) : string/null
    public prepareEnvironment(\Symfony\Component\Console\Event\ConsoleCommandEvent $event) : void
    protected configureIO(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : void
    protected getDefaultInputDefinition() : \Symfony\Component\Console\Input\InputDefinition
    Add global --env and --lang options.
    protected init() : void

    This class extends \Symfony\Component\Console\Application

    This class implements \Symfony\Contracts\Service\ResetInterface


    Class: \Grav\Console\Application\GpmApplication

    Class GpmApplication

    Visibility Function
    public __construct(string $name='UNKNOWN', string $version='UNKNOWN') : void

    This class extends \Grav\Console\Application\Application

    This class implements \Symfony\Contracts\Service\ResetInterface


    Class: \Grav\Console\Application\PluginApplication

    Class PluginApplication

    Visibility Function
    public __construct(string $name='UNKNOWN', string $version='UNKNOWN') : void
    PluginApplication constructor.
    public getPluginName() : string
    public run(\Grav\Console\Application\InputInterface/null/\Symfony\Component\Console\Input\InputInterface $input=null, \Grav\Console\Application\OutputInterface/null/\Symfony\Component\Console\Output\OutputInterface $output=null) : int
    public setPluginName(string $pluginName) : void
    protected init() : void

    This class extends \Grav\Console\Application\Application

    This class implements \Symfony\Contracts\Service\ResetInterface


    Class: \Grav\Console\Application\CommandLoader\PluginCommandLoader

    Class GpmApplication

    Visibility Function
    public __construct(string $name) : void
    PluginCommandLoader constructor.
    public get(string $name) : \Symfony\Component\Console\Command\Command
    public getNames() : string[]
    public has(string $name) : bool

    This class implements \Symfony\Component\Console\CommandLoader\CommandLoaderInterface


    Class: \Grav\Console\Cli\PageSystemValidatorCommand

    Class PageSystemValidatorCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\YamlLinterCommand

    Class YamlLinterCommand

    Visibility Function
    protected configure() : void
    protected displayErrors(array $errors, \Symfony\Component\Console\Style\SymfonyStyle $io) : void
    protected displayResult(array $errors, \Symfony\Component\Console\Style\SymfonyStyle $io, string $successMessage, bool $verbose, int $checked) : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\SchedulerCommand

    Class SchedulerCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\SecurityCommand

    Class SecurityCommand

    Visibility Function
    public outputProgress(array $args) : void
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\InstallCommand

    Class InstallCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\SafeUpgradeRunCommand

    Visibility Function
    protected configure() : void
    protected serve() : void

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\ComposerCommand

    Class ComposerCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\LogViewerCommand

    Class LogViewerCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\CleanCommand

    Class CleanCommand

    Visibility Function
    public setupConsole(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : void
    Set colors style definition for the formatter.
    protected configure() : void
    protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : int

    This class extends \Symfony\Component\Console\Command\Command

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\SandboxCommand

    Class SandboxCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\ServerCommand

    Class ServerCommand

    Visibility Function
    protected configure() : void
    protected portAvailable(string $ip, int $port) : bool
    Simple function test the port
    protected runProcess(string $name, array $cmd) : \Symfony\Component\Process\Process
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\ClearCacheCommand

    Class ClearCacheCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\BackupCommand

    Class BackupCommand

    Visibility Function
    public outputProgress(array $args) : void
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\CacheCleanupCommand

    Class CacheCleanupCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Cli\NewProjectCommand

    Class NewProjectCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GravCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\InfoCommand

    Class InfoCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\InstallCommand

    Class InstallCommand

    Visibility Function
    public askConfirmationIfMajorVersionUpdated(\Grav\Common\GPM\Remote\Package $package) : void
    If the package is updated from an older major release, show warning and ask confirmation
    public installDependencies(array $dependencies, string $type, string $message, bool $required=true) : void
    Given a $dependencies list, filters their type according to $type and shows $message prior to listing them to the user. Then asks the user a confirmation prior to installing them.
    public progress(array $progress) : void
    public setGpm(\Grav\Common\GPM\GPM $gpm) : void
    Allows to set the GPM object, used for testing the class
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\UninstallCommand

    Class UninstallCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\VersionCommand

    Class VersionCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\UpdateCommand

    Class UpdateCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\RollbackCommand

    Visibility Function
    protected collectSnapshots() : array<int, array>
    protected configure() : void
    protected createSafeUpgradeService() : \Grav\Common\Upgrade\SafeUpgradeService
    protected serve() : void

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\DirectInstallCommand

    Class DirectInstallCommand

    Visibility Function
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\PreflightCommand

    Visibility Function
    protected configure() : void
    protected createSafeUpgradeService() : \Grav\Common\Upgrade\SafeUpgradeService
    protected serve() : void

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\IndexCommand

    Class IndexCommand

    Visibility Function
    public filter(\Grav\Common\GPM\Remote\Packages $data) : \Grav\Common\GPM\Remote\Packages
    public sort(\Grav\Console\Gpm\AbstractPackageCollection/\Grav\Console\Gpm\Plugins/\Grav\Console\Gpm\Themes/\Grav\Common\GPM\Remote\AbstractPackageCollection $packages) : array
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Gpm\SelfupgradeCommand

    Class SelfupgradeCommand

    Visibility Function
    public formatBytes(int/float $size, int $precision=2) : string
    public progress(array $progress) : void
    protected configure() : void
    protected handlePreflightReport(array $preflight) : bool
    protected serve() : int

    This class extends \Grav\Console\GpmCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\Plugin\PluginListCommand

    Class InfoCommand

    Visibility Function
    public __construct() : void
    protected configure() : void
    protected serve() : int

    This class extends \Grav\Console\ConsoleCommand

    This class implements \Symfony\Component\Console\Command\SignalableCommandInterface


    Class: \Grav\Console\TerminalObjects\Table

    DEPRECATED 1.7 Use Symfony Console Table

    Visibility Function
    public result() : array

    This class extends \League\CLImate\TerminalObject\Basic\Table

    This class implements \League\CLImate\TerminalObject\Basic\BasicTerminalObjectInterface


    Class: \Grav\Events\SessionStartEvent

    Plugins Loaded Event This event is called from $grav['session']->start() right after successful session_start() call.

    Visibility Function
    public __construct(\Grav\Framework\Session\SessionInterface $session) : void
    public __debugInfo() : void

    This class extends \Symfony\Contracts\EventDispatcher\Event

    This class implements \Psr\EventDispatcher\StoppableEventInterface


    Class: \Grav\Events\FlexRegisterEvent

    Flex Register Event This event is called the first time $grav['flex'] is being called. Use this event to register enabled Directories to Flex.

    Visibility Function
    public __construct(\Grav\Framework\Flex\Flex $flex) : void
    FlexRegisterEvent constructor.
    public __debugInfo() : array

    This class extends \Symfony\Contracts\EventDispatcher\Event

    This class implements \Psr\EventDispatcher\StoppableEventInterface


    Class: \Grav\Events\PageEvent

    Visibility Function

    This class extends \RocketTheme\Toolbox\Event\Event

    This class implements \ArrayAccess, \Psr\EventDispatcher\StoppableEventInterface


    Class: \Grav\Events\BeforeSessionStartEvent

    Plugins Loaded Event This event is called from $grav['session']->start() right before session_start() call.

    Visibility Function
    public __construct(\Grav\Framework\Session\SessionInterface $session) : void
    public __debugInfo() : void

    This class extends \Symfony\Contracts\EventDispatcher\Event

    This class implements \Psr\EventDispatcher\StoppableEventInterface


    Class: \Grav\Events\PermissionsRegisterEvent

    Permissions Register Event This event is called the first time $grav['permissions'] is being called. Use this event to register any new permission types you use in your plugins.

    Visibility Function
    public __construct(\Grav\Framework\Acl\Permissions $permissions) : void
    PermissionsRegisterEvent constructor.
    public __debugInfo() : array

    This class extends \Symfony\Contracts\EventDispatcher\Event

    This class implements \Psr\EventDispatcher\StoppableEventInterface


    Class: \Grav\Events\TypesEvent

    Visibility Function

    This class extends \RocketTheme\Toolbox\Event\Event

    This class implements \ArrayAccess, \Psr\EventDispatcher\StoppableEventInterface


    Class: \Grav\Events\PluginsLoadedEvent

    Plugins Loaded Event This event is called from InitializeProcessor. This is the first event plugin can see. Please avoid using this event if possible.

    Visibility Function
    public __construct(\Grav\Common\Grav $grav, \Grav\Common\Plugins $plugins) : void
    PluginsLoadedEvent constructor.
    public __debugInfo() : array

    This class extends \Symfony\Contracts\EventDispatcher\Event

    This class implements \Psr\EventDispatcher\StoppableEventInterface


    Class: \Grav\Framework\Acl\Access

    Class Access

    Visibility Function
    public __construct(string/array/null $acl=null, array/null/array $rules=null, string $name='') : void
    Access constructor.
    public authorize(string $action, string/null/string $scope=null) : bool/null
    Checks user authorization to the action.
    public count() : int
    public get(string $action) : bool/null
    public getAllActions() : array
    public getInherited(string $action) : string/null
    public getIterator() : \Traversable
    public getName() : string
    public inherit(\Grav\Framework\Acl\Access $parent, string/null/string $name=null) : void
    public isInherited(string $action) : bool
    public jsonSerialize() : array
    public toArray() : array
    protected normalizeAcl(array $acl) : array
    protected resolvePermissions(string $access) : array

    This class implements \JsonSerializable, \IteratorAggregate, \Countable, \Traversable


    Class: \Grav\Framework\Acl\Action

    Class Action

    Visibility Function
    public __construct(string $name, array $action=array()) : void
    public __debugInfo() : array
    public addChild(\Grav\Framework\Acl\Action $child) : void
    public count() : int
    public getChild(string $name) : \Grav\Framework\Acl\Action/null
    public getChildren() : \Grav\Framework\Acl\Action[]
    public getIterator() : \Traversable
    public getLevels() : int
    public getParam(string $name) : mixed/null
    public getParams() : array
    public getParent() : \Grav\Framework\Acl\Action/null
    public getScope() : string
    public hasChildren() : bool
    public setParent(\Grav\Framework\Acl\Action/null/\Grav\Framework\Acl\Action $parent) : void

    This class implements \IteratorAggregate, \Countable, \Traversable


    Class: \Grav\Framework\Acl\Permissions

    Class Permissions

    Visibility Function
    public __debugInfo() : array
    public addAction(\Grav\Framework\Acl\Action $action) : void
    public addActions(\Grav\Framework\Acl\Action[] $actions) : void
    public addType(string $name, array $type) : void
    public addTypes(array $types) : void
    public count() : int
    public getAccess(array/null/array $access=null) : \Grav\Framework\Acl\Access
    public getAction(string $name) : \Grav\Framework\Acl\Action/null
    public getActions() : array
    public getInstances() : array
    public getIterator() : \Grav\Framework\Acl\ArrayIterator/\Grav\Framework\Acl\Traversable
    public getType(string $name) : \Grav\Framework\Acl\Action/null
    public getTypes() : array
    public hasAction(string $name) : bool
    public hasType(string $name) : bool
    public offsetExists(int/string $offset) : bool
    public offsetGet(int/string $offset) : \Grav\Framework\Acl\Action/null
    public offsetSet(int/string $offset, mixed $value) : void
    public offsetUnset(int/string $offset) : void
    protected getParent(string $name) : \Grav\Framework\Acl\Action/null

    This class implements \ArrayAccess, \Countable, \IteratorAggregate, \Traversable


    Class: \Grav\Framework\Acl\PermissionsReader

    Class PermissionsReader

    Visibility Function
    public static fromArray(array $actions, array $types) : \Grav\Framework\Acl\Action[]
    public static fromYaml(string $filename) : \Grav\Framework\Acl\Action[]
    public static read(array $actions, string $prefix='') : array
    protected static addDefaults(array $action) : array
    protected static getDependencies(array $dependencies) : array
    protected static initTypes(array $types) : void


    Class: \Grav\Framework\Acl\RecursiveActionIterator

    Class Action

    Visibility Function
    public __construct(array $items=array()) : void
    Constructor to initialize array.
    public count() : int
    Implements Countable interface.
    public current() : mixed Can return any type.
    Returns the current element.
    public getChildren() : \Grav\Framework\Acl\RecursiveActionIterator
    public hasChildren() : bool
    public key() : string
    public next() : void
    Moves the current position to the next element.
    public rewind() : void
    Rewinds back to the first element of the Iterator.
    public valid() : bool Returns TRUE on success or FALSE on failure.
    This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid.

    This class implements \RecursiveIterator, \Countable, \Traversable, \Iterator


    Class: \Grav\Framework\Cache\AbstractCache (abstract)

    Cache trait for PSR-16 compatible "Simple Cache" implementation

    Visibility Function
    public __construct(string $namespace='', null/int/\Grav\Framework\Cache\DateInterval $defaultLifetime=null) : void
    public clear() : bool
    public delete(string $key) : bool
    public deleteMultiple(iterable $keys) : bool
    public doDeleteMultiple(array $keys) : bool
    public doGetMultiple(array $keys, mixed $miss) : array
    public doSetMultiple(array $values, int/null $ttl) : bool
    public get(string $key, mixed/null/mixed $default=null) : mixed/null
    public getMultiple(iterable $keys, mixed/null/mixed $default=null) : \Grav\Framework\Cache\iterable
    public has(string $key) : bool
    public set(string $key, mixed $value, null/int/\Grav\Framework\Cache\DateInterval/\DateInterval/int $ttl=null) : bool
    public setMultiple(iterable $values, null/int/\Grav\Framework\Cache\DateInterval/\DateInterval/int $ttl=null) : bool
    public setValidation(bool $validation) : void
    protected convertTtl(null/int/\Grav\Framework\Cache\DateInterval/\DateInterval/int $ttl) : int/null
    protected getDefaultLifetime() : int/null
    protected getNamespace() : string
    protected init(string $namespace='', null/int/\Grav\Framework\Cache\DateInterval/\DateInterval/int $defaultLifetime=null) : void
    Always call from constructor.
    protected validateKey(string/mixed/mixed $key) : void
    protected validateKeys(array/iterable $keys) : void

    This class implements \Grav\Framework\Cache\CacheInterface, \Psr\SimpleCache\CacheInterface


    Interface: \Grav\Framework\Cache\CacheInterface

    PSR-16 compatible "Simple Cache" interface.

    Visibility Function
    public doClear() : bool
    public doDelete(string $key) : mixed
    public doDeleteMultiple(string[] $keys) : mixed
    public doGet(string $key, mixed $miss) : mixed
    public doGetMultiple(string[] $keys, mixed $miss) : mixed
    public doHas(string $key) : mixed
    public doSet(string $key, mixed $value, int/null $ttl) : mixed
    public doSetMultiple(mixed $values, int/null $ttl) : mixed

    This class implements \Psr\SimpleCache\CacheInterface


    Class: \Grav\Framework\Cache\Adapter\FileCache

    Cache class for PSR-16 compatible "Simple Cache" implementation using file backend. Defaults to 1 year TTL. Does not support unlimited TTL.

    Visibility Function
    public __construct(string $namespace='', int/null $defaultLifetime=null, string/null $folder=null) : void
    FileCache constructor.
    public __destruct() : void
    public doClear() : bool
    public doDelete(string $key) : mixed
    public doGet(string $key, mixed $miss) : mixed
    public doHas(string $key) : mixed
    public doSet(string $key, mixed $value, int/null $ttl) : mixed
    public static throwError(int $type, string $message, string $file, int $line) : bool
    protected getFile(string $key, bool $mkdir=false) : string
    protected initFileCache(string $namespace, string $directory) : void

    This class extends \Grav\Framework\Cache\AbstractCache

    This class implements \Psr\SimpleCache\CacheInterface, \Grav\Framework\Cache\CacheInterface


    Class: \Grav\Framework\Cache\Adapter\MemoryCache

    Cache class for PSR-16 compatible "Simple Cache" implementation using in memory backend. Memory backend does not use namespace or default ttl as the cache is unique to each cache object and request.

    Visibility Function
    public doClear() : bool
    public doDelete(string $key) : bool
    public doGet(string $key, mixed $miss) : mixed
    public doHas(string $key) : bool
    public doSet(string $key, mixed $value, int $ttl) : bool

    This class extends \Grav\Framework\Cache\AbstractCache

    This class implements \Psr\SimpleCache\CacheInterface, \Grav\Framework\Cache\CacheInterface


    Class: \Grav\Framework\Cache\Adapter\DoctrineCache

    Cache class for PSR-16 compatible "Simple Cache" implementation using Doctrine Cache backend.

    Visibility Function
    public __construct(\Doctrine\Common\Cache\CacheProvider $doctrineCache, string $namespace='', null/int/\Grav\Framework\Cache\Adapter\DateInterval $defaultLifetime=null) : void
    Doctrine Cache constructor.
    public doClear() : bool
    public doDelete(string $key) : mixed
    public doDeleteMultiple(array $keys) : bool
    public doGet(string $key, mixed $miss) : mixed
    public doGetMultiple(array $keys, mixed $miss) : array
    public doHas(string $key) : mixed
    public doSet(string $key, mixed $value, int/null $ttl) : mixed
    public doSetMultiple(array $values, int/null $ttl) : bool

    This class extends \Grav\Framework\Cache\AbstractCache

    This class implements \Psr\SimpleCache\CacheInterface, \Grav\Framework\Cache\CacheInterface


    Class: \Grav\Framework\Cache\Exception\InvalidArgumentException

    InvalidArgumentException class for PSR-16 compatible "Simple Cache" implementation.

    Visibility Function

    This class extends \InvalidArgumentException

    This class implements \Stringable, \Throwable, \Psr\SimpleCache\InvalidArgumentException, \Psr\SimpleCache\CacheException


    Class: \Grav\Framework\Cache\Exception\CacheException

    CacheException class for PSR-16 compatible "Simple Cache" implementation.

    Visibility Function

    This class extends \Exception

    This class implements \Stringable, \Throwable, \Psr\SimpleCache\CacheException


    Interface: \Grav\Framework\Collection\FileCollectionInterface

    Collection of objects stored into a filesystem.

    Visibility Function
    public getPath() : string

    This class implements \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\Selectable, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \JsonSerializable, \Doctrine\Common\Collections\Collection


    Class: \Grav\Framework\Collection\AbstractFileCollection

    Collection of objects stored into a filesystem.

    Visibility Function
    public getPath() : string
    public matching(\Doctrine\Common\Collections\Criteria $criteria) : \Grav\Framework\Collection\ArrayCollection
    protected __construct(string $path) : void
    protected addFilter(callable $filterFunction) : \Grav\Framework\Collection\$this
    protected createObject(\Grav\Framework\Collection\RecursiveDirectoryIterator $file) : object
    protected doInitialize() : void
    protected doInitializeByIterator(\SeekableIterator $iterator, int $nestingLimit) : array
    protected doInitializeChildren(array $children, int $nestingLimit) : array
    protected setIterator() : void

    This class extends \Grav\Framework\Collection\AbstractLazyCollection

    This class implements \Doctrine\Common\Collections\Collection, \Doctrine\Common\Collections\Selectable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable, \Grav\Framework\Collection\FileCollectionInterface


    Class: \Grav\Framework\Collection\ArrayCollection

    General JSON serializable collection.

    Visibility Function
    public chunk(int $size) : array
    Split collection into chunks.
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public reverse() : \Grav\Framework\Collection\static
    Reverse the order of the items.
    public select(\Grav\Framework\Collection\array<int,string>/array $keys) : \Grav\Framework\Collection\static
    Select items from collection. Collection is returned in the order of $keys given to the function.
    public shuffle() : \Grav\Framework\Collection\static
    Shuffle items.
    public unselect(\Grav\Framework\Collection\array<int/\Grav\Framework\Collection\string>/array $keys) : \Grav\Framework\Collection\static
    Un-select items from collection.

    This class extends \Doctrine\Common\Collections\ArrayCollection

    This class implements \Doctrine\Common\Collections\Collection, \Doctrine\Common\Collections\Selectable, \Stringable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable


    Class: \Grav\Framework\Collection\FileCollection

    Collection of objects stored into a filesystem.

    Visibility Function
    public __construct(string $path, int $flags=null) : void
    public addFilter(callable $filterFunction) : \Grav\Framework\Collection\$this
    public getFlags() : int
    public getNestingLimit() : int
    public setFilter(callable/null/callable $filterFunction=null) : \Grav\Framework\Collection\$this
    public setNestingLimit(int $limit=99) : \Grav\Framework\Collection\$this
    public setObjectBuilder(callable/null/callable $objectFunction=null) : \Grav\Framework\Collection\$this

    This class extends \Grav\Framework\Collection\AbstractFileCollection

    This class implements \Grav\Framework\Collection\FileCollectionInterface, \JsonSerializable, \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \Doctrine\Common\Collections\Selectable, \Doctrine\Common\Collections\Collection


    Class: \Grav\Framework\Collection\AbstractIndexCollection (abstract)

    Abstract Index Collection.

    Visibility Function
    public __construct(array $entries=array()) : void
    Initializes a new IndexCollection.
    public __serialize() : array
    public __toString() : string
    Returns a string representation of this object.
    public __unserialize(array $data) : void
    public add(mixed $element) : void
    public chunk(int $size) : array
    Split collection into chunks.
    public clear() : void
    public contains(mixed $element) : void
    public containsKey(mixed $key) : void
    public count() : void
    public current() : void
    public exists(\Closure $p) : void
    public filter(\Closure $p) : void
    public first() : void
    public forAll(\Closure $p) : void
    public get(mixed $key) : mixed
    public getIterator() : mixed
    Required by interface IteratorAggregate.
    public getKeys() : mixed
    public getValues() : mixed
    public indexOf(mixed $element) : void
    public isEmpty() : bool
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public key() : void
    public last() : void
    public limit(int $start, int/null $limit=null) : \Grav\Framework\Collection\static
    public map(\Closure $func) : void
    public next() : void
    public offsetExists(string/int/null $offset) : bool
    Required by interface ArrayAccess.
    public offsetGet(string/int/null $offset) : mixed
    Required by interface ArrayAccess.
    public offsetSet(string/int/null $offset, mixed $value) : void
    Required by interface ArrayAccess.
    public offsetUnset(string/int/null $offset) : void
    Required by interface ArrayAccess.
    public partition(\Closure $p) : void
    public remove(mixed $key) : void
    public removeElement(mixed $element) : void
    public reverse() : \Grav\Framework\Collection\static
    Reverse the order of the items.
    public select(array $keys) : \Grav\Framework\Collection\static
    Select items from collection. Collection is returned in the order of $keys given to the function.
    public serialize() : string
    public set(mixed $key, mixed $value) : void
    public shuffle() : \Grav\Framework\Collection\static
    Shuffle items.
    public slice(mixed $offset, mixed $length=null) : void
    public toArray() : void
    public unselect(array $keys) : \Grav\Framework\Collection\static
    Un-select items from collection.
    public unserialize(string $serialized) : void
    protected createFrom(array $entries) : \Grav\Framework\Collection\static
    Creates a new instance from the specified elements. This method is provided for derived classes to specify how a new instance should be created when constructor semantics have changed.
    protected getCurrentKey(\Grav\Framework\Collection\FlexObjectInterface $element) : string
    protected abstract getElementMeta(mixed $element) : mixed
    protected getEntries() : array
    protected getUnserializeAllowedClasses() : array/bool
    protected abstract isAllowedElement(mixed $value) : bool
    protected abstract loadCollection(array/null/array $entries=null) : \Grav\Framework\Collection\CollectionInterface
    protected abstract loadElement(string $key, mixed $value) : mixed/null
    protected abstract loadElements(array/null/array $entries=null) : array
    protected setEntries(array $entries) : void

    This class implements \Grav\Framework\Collection\CollectionInterface, \Stringable, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \JsonSerializable, \Doctrine\Common\Collections\Collection


    Interface: \Grav\Framework\Collection\CollectionInterface

    Collection Interface.

    Visibility Function
    public chunk(int $size) : array
    Split collection into chunks.
    public reverse() : \Grav\Framework\Collection\CollectionInterface
    Reverse the order of the items.
    public select(\Grav\Framework\Collection\array<int/\Grav\Framework\Collection\string>/array $keys) : \Grav\Framework\Collection\CollectionInterface
    Select items from collection. Collection is returned in the order of $keys given to the function.
    public shuffle() : \Grav\Framework\Collection\CollectionInterface
    Shuffle items.
    public unselect(\Grav\Framework\Collection\array<int/\Grav\Framework\Collection\string>/array $keys) : \Grav\Framework\Collection\CollectionInterface
    Un-select items from collection.

    This class implements \Doctrine\Common\Collections\Collection, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection


    Class: \Grav\Framework\Collection\AbstractLazyCollection (abstract)

    General JSON serializable collection.

    Visibility Function
    public chunk(mixed $size) : void
    public jsonSerialize() : array
    public reverse() : void
    public select(array $keys) : void
    public shuffle() : void
    public unselect(array $keys) : void

    This class extends \Doctrine\Common\Collections\AbstractLazyCollection

    This class implements \Doctrine\Common\Collections\Collection, \Doctrine\Common\Collections\Selectable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable


    Class: \Grav\Framework\ContentBlock\HtmlBlock

    HtmlBlock

    Visibility Function
    public addFramework(string $framework) : \Grav\Framework\ContentBlock\$this
    public addHtml(string $html, int $priority, string $location='bottom') : bool
    public addInlineModule(string/array $element, int $priority, string $location='head') : bool
    public addInlineScript(string/array $element, int $priority, string $location='head') : bool
    public addInlineStyle(string/array $element, int $priority, string $location='head') : bool
    public addLink(array $element, int $priority, string $location='head') : bool
    public addModule(string/array $element, int $priority, string $location='head') : bool
    public addScript(string/array $element, int $priority, string $location='head') : bool
    public addStyle(string/array $element, int $priority, string $location='head') : bool
    public build(array $serialized) : void
    public getAssets() : array
    public getFrameworks() : array
    public getHtml(string $location='bottom') : array
    public getLinks(string $location='head') : array
    public getScripts(string $location='head') : array
    public getStyles(string $location='head') : array
    public toArray() : array
    protected getAssetsFast() : array
    protected getAssetsInLocation(string $type, string $location) : array
    protected sortAssets(array $array) : void
    protected sortAssetsInLocation(array $items) : void
    Examples of HtmlBlock::addStyle()
    TXT
    $block->addStyle('assets/js/my.js');$block->addStyle(['href' => 'assets/js/my.js', 'media' => 'screen']);
    

    This class extends \Grav\Framework\ContentBlock\ContentBlock

    This class implements \Grav\Framework\ContentBlock\ContentBlockInterface, \Stringable, \Serializable, \Grav\Framework\ContentBlock\HtmlBlockInterface


    Interface: \Grav\Framework\ContentBlock\HtmlBlockInterface

    Interface HtmlBlockInterface

    Visibility Function
    public addFramework(string $framework) : \Grav\Framework\ContentBlock\$this
    public addHtml(string $html, int $priority, string $location='bottom') : bool
    public addInlineModule(string/array $element, int $priority, string $location='head') : bool
    Shortcut for writing addInlineScript(['type' => 'module', 'content' => ...]).
    public addInlineScript(string/array $element, int $priority, string $location='head') : bool
    public addInlineStyle(string/array $element, int $priority, string $location='head') : bool
    public addLink(array $element, int $priority, string $location='head') : bool
    public addModule(string/array $element, int $priority, string $location='head') : bool
    Shortcut for writing addScript(['type' => 'module', 'src' => ...]).
    public addScript(string/array $element, int $priority, string $location='head') : bool
    public addStyle(string/array $element, int $priority, string $location='head') : bool
    public getAssets() : array
    public getFrameworks() : array
    public getHtml(string $location='bottom') : array
    public getLinks(string $location='head') : array
    public getScripts(string $location='head') : array
    public getStyles(string $location='head') : array
    Examples of HtmlBlockInterface::addStyle()
    TXT
    $block->addStyle('assets/js/my.js');$block->addStyle(['href' => 'assets/js/my.js', 'media' => 'screen']);
    

    This class implements \Grav\Framework\ContentBlock\ContentBlockInterface, \Stringable, \Serializable


    Interface: \Grav\Framework\ContentBlock\ContentBlockInterface

    ContentBlock Interface

    Visibility Function
    public __construct(string/null $id=null) : void
    public __toString() : string
    public addBlock(\Grav\Framework\ContentBlock\ContentBlockInterface $block) : \Grav\Framework\ContentBlock\$this
    public build(array $serialized) : void
    public static create(string/null $id=null) : \Grav\Framework\ContentBlock\static
    public static fromArray(array $serialized) : \Grav\Framework\ContentBlock\ContentBlockInterface
    public getChecksum() : string
    public getId() : string
    public getToken() : string
    public setChecksum(string $checksum) : \Grav\Framework\ContentBlock\$this
    public setContent(string $content) : \Grav\Framework\ContentBlock\$this
    public toArray() : array
    public toString() : string

    This class implements \Serializable, \Stringable


    Interface: \Grav\Framework\Contracts\Media\MediaObjectInterface

    Media Object Interface

    Visibility Function
    public createResponse(array $actions) : \Psr\Http\Message\ResponseInterface
    Create media response.
    public exists() : bool
    Returns true if the object exists.
    public get(string $field) : mixed
    public getMeta() : array
    Get metadata associated to the media object.
    public getUrl() : string
    Return URL pointing to the media object.

    This class implements \Grav\Framework\Contracts\Object\IdentifierInterface, \JsonSerializable


    Interface: \Grav\Framework\Contracts\Object\IdentifierInterface

    Interface IdentifierInterface

    Visibility Function
    public getId() : string
    Get identifier's ID.
    public getType() : string
    Get identifier's type.

    This class implements \JsonSerializable


    Interface: \Grav\Framework\Contracts\Relationships\ToOneRelationshipInterface

    Interface ToOneRelationshipInterface

    Visibility Function
    public getIdentifier(string/null/string $id=null, string/null/string $type=null) : \Grav\Framework\Contracts\Relationships\T/null
    public getObject(string/null/string $id=null, string/null/string $type=null) : \Grav\Framework\Contracts\Relationships\T/null
    public replaceIdentifier(\Grav\Framework\Contracts\Relationships\T/null/\Grav\Framework\Contracts\Object\IdentifierInterface $identifier=null) : bool

    This class implements \Grav\Framework\Contracts\Relationships\RelationshipInterface, \Traversable, \Serializable, \JsonSerializable, \IteratorAggregate, \Countable


    Interface: \Grav\Framework\Contracts\Relationships\RelationshipsInterface

    Interface RelationshipsInterface

    Visibility Function
    public count() : int
    public current() : \Grav\Framework\Contracts\Relationships\RelationshipInterface<T,P>/null
    public getModified() : array
    public isModified() : bool
    public key() : string
    public offsetGet(string $offset) : \Grav\Framework\Contracts\Relationships\RelationshipInterface<T,P>/null

    This class implements \Countable, \ArrayAccess, \Iterator, \JsonSerializable, \Traversable


    Interface: \Grav\Framework\Contracts\Relationships\RelationshipIdentifierInterface

    Interface RelationshipIdentifierInterface

    Visibility Function
    public getIdentifierMeta() : \Grav\Framework\Contracts\Relationships\array<string,mixed>/\Grav\Framework\Contracts\Relationships\ArrayAccess<string,mixed>
    Get identifier meta.
    public hasIdentifierMeta() : bool
    If identifier has meta.

    This class implements \Grav\Framework\Contracts\Object\IdentifierInterface, \JsonSerializable


    Interface: \Grav\Framework\Contracts\Relationships\ToManyRelationshipInterface

    Interface ToManyRelationshipInterface

    Visibility Function
    public addIdentifiers(\Grav\Framework\Contracts\Relationships\iterable/iterable $identifiers) : bool
    public getIdentifier(string $id, string/null/string $type=null) : \Grav\Framework\Contracts\Relationships\T/null
    public getNthIdentifier(\Grav\Framework\Contracts\Relationships\positive-int/int $pos) : \Grav\Framework\Contracts\Relationships\IdentifierInterface/null
    public getObject(string $id, string/null/string $type=null) : \Grav\Framework\Contracts\Relationships\T/null
    public removeIdentifiers(\Grav\Framework\Contracts\Relationships\iterable/iterable $identifiers) : bool
    public replaceIdentifiers(\Grav\Framework\Contracts\Relationships\iterable/iterable $identifiers) : bool

    This class implements \Grav\Framework\Contracts\Relationships\RelationshipInterface, \Traversable, \Serializable, \JsonSerializable, \IteratorAggregate, \Countable


    Interface: \Grav\Framework\Contracts\Relationships\RelationshipInterface

    Interface Relationship

    Visibility Function
    public addIdentifier(\Grav\Framework\Contracts\Relationships\T/\Grav\Framework\Contracts\Object\IdentifierInterface $identifier) : bool
    public getCardinality() : string
    public getIterator() : \Grav\Framework\Contracts\Relationships\iterable
    public getName() : string
    public getParent() : \Grav\Framework\Contracts\Relationships\P
    public getType() : string
    public has(string $id, string/null/string $type=null) : bool
    public hasIdentifier(\Grav\Framework\Contracts\Relationships\T/\Grav\Framework\Contracts\Object\IdentifierInterface $identifier) : bool
    public isModified() : bool
    public removeIdentifier(\Grav\Framework\Contracts\Relationships\T/null/\Grav\Framework\Contracts\Object\IdentifierInterface $identifier=null) : bool

    This class implements \Countable, \IteratorAggregate, \JsonSerializable, \Serializable, \Traversable


    Class: \Grav\Framework\DI\Container

    Visibility Function
    public get(string $id) : mixed
    public has(string $id) : bool

    This class extends \Pimple\Container

    This class implements \ArrayAccess, \Psr\Container\ContainerInterface


    Class: \Grav\Framework\File\File

    Class File

    Visibility Function
    public save(mixed $data) : void

    This class extends \Grav\Framework\File\AbstractFile

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileInterface


    Class: \Grav\Framework\File\JsonFile

    Class JsonFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\JsonFormatter $formatter) : void
    File constructor.

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\CsvFile

    Class IniFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\CsvFormatter $formatter) : void
    File constructor.
    public load() : array

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\AbstractFile

    Class AbstractFile

    Visibility Function
    public __clone() : void
    public __construct(string $filepath, \Grav\Framework\File\Filesystem/null/\Grav\Framework\Filesystem\Filesystem $filesystem=null) : void
    public __destruct() : void
    Unlock file when the object gets destroyed.
    public __serialize() : array
    public __unserialize(array $data) : void
    public delete() : void
    public exists() : void
    public getBasename() : mixed
    public getCreationTime() : mixed
    public getExtension(bool $withDot=false) : mixed
    public getFilePath() : mixed
    public getFilename() : mixed
    public getModificationTime() : mixed
    public getPath() : mixed
    public isLocked() : bool
    public isReadable() : bool
    public isWritable() : bool
    public load() : mixed
    public lock(bool $block=true) : void
    public rename(string $path) : void
    public save(mixed $data) : void
    public serialize() : string
    public unlock() : void
    public unserialize(string $serialized) : void
    protected doSerialize() : array
    protected doUnserialize(array $serialized) : void
    protected getUnserializeAllowedClasses() : array/bool
    protected isWritablePath(string $dir) : bool
    protected mkdir(string $dir) : bool
    protected setFilepath(string $filepath) : void
    protected setPathInfo() : void
    protected tempname(string $filename, int $length=5) : string

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\DataFile

    Class DataFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Interfaces\FileFormatterInterface $formatter) : void
    File constructor.
    public load() : mixed
    public save(mixed $data) : void

    This class extends \Grav\Framework\File\AbstractFile

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileInterface


    Class: \Grav\Framework\File\MarkdownFile

    Class MarkdownFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\MarkdownFormatter $formatter) : void
    File constructor.
    public load() : array

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\YamlFile

    Class YamlFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\YamlFormatter $formatter) : void
    File constructor.
    public load() : array

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\IniFile

    Class IniFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\IniFormatter $formatter) : void
    File constructor.
    public load() : array

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\Formatter\JsonFormatter

    Class JsonFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    public decode(mixed $data) : void
    public encode(mixed $data) : void
    public getDecodeAssoc() : bool
    Returns true if JSON objects will be converted into associative arrays.
    public getDecodeDepth() : int
    Returns recursion depth used in decode() function.
    public getDecodeOptions() : int
    Returns options used in decode() function.
    public getEncodeOptions() : int
    Returns options used in encode() function.

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    Class: \Grav\Framework\File\Formatter\AbstractFormatter (abstract)

    Abstract file formatter.

    Visibility Function
    public __construct(array $config=array()) : void
    IniFormatter constructor.
    public __serialize() : array
    public __unserialize(array $data) : void
    public abstract decode(mixed $data) : void
    public abstract encode(mixed $data) : void
    public getDefaultFileExtension() : mixed
    public getMimeType() : string
    public getSupportedFileExtensions() : mixed
    public serialize() : string
    public unserialize(string $serialized) : void
    protected getConfig(string/null/string $name=null) : mixed
    Get either full configuration or a single option.
    protected getUnserializeAllowedClasses() : array/bool

    This class implements \Grav\Framework\File\Interfaces\FileFormatterInterface, \Serializable


    Interface: \Grav\Framework\File\Formatter\FormatterInterface

    DEPRECATED 1.6 Use Grav\Framework\File\Interfaces\FileFormatterInterface instead

    Visibility Function

    This class implements \Grav\Framework\File\Interfaces\FileFormatterInterface, \Serializable


    Class: \Grav\Framework\File\Formatter\CsvFormatter

    Class CsvFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    IniFormatter constructor.
    public decode(string $data, string/null $delimiter=null) : array
    public encode(array $data, string/null $delimiter=null) : string
    public getDelimiter() : string
    Returns delimiter used to both encode and decode CSV.
    protected encodeLine(array $line, string $delimiter) : string
    protected escape(string $value) : string

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    Class: \Grav\Framework\File\Formatter\SerializeFormatter

    Class SerializeFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    IniFormatter constructor.
    public decode(mixed $data) : void
    public encode(mixed $data) : void
    public getOptions() : array
    Returns options used in decode(). By default only allow stdClass class.
    protected preserveLines(mixed $data, array $search, array $replace) : mixed
    Preserve new lines, recursive function.

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    Class: \Grav\Framework\File\Formatter\IniFormatter

    Class IniFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    IniFormatter constructor.
    public decode(mixed $data) : void
    public encode(mixed $data) : void

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    Class: \Grav\Framework\File\Formatter\YamlFormatter

    Class YamlFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    YamlFormatter constructor.
    public decode(mixed $data) : void
    public encode(array $data, int/null $inline=null, int/null $indent=null) : string
    public getIndentOption() : int
    public getInlineOption() : int
    public useCompatibleDecoder() : bool
    public useNativeDecoder() : bool

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    Class: \Grav\Framework\File\Formatter\MarkdownFormatter

    Class MarkdownFormatter

    Visibility Function
    public __construct(array $config=array(), \Grav\Framework\File\Interfaces\FileFormatterInterface $headerFormatter=null) : void
    public __serialize() : void
    public __unserialize(array $data) : void
    public decode(mixed $data) : void
    public encode(mixed $data) : void
    public getBodyField() : string
    Returns body field used in both encode() and decode().
    public getHeaderField() : string
    Returns header field used in both encode() and decode().
    public getHeaderFormatter() : \Grav\Framework\File\Interfaces\FileFormatterInterface
    Returns header formatter object used in both encode() and decode().
    public getRawField() : string
    Returns raw field used in both encode() and decode().

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    Interface: \Grav\Framework\File\Interfaces\FileInterface

    Defines common interface for all file readers. File readers allow you to read and optionally write files of various file formats, such as:

    Visibility Function
    public delete() : bool Returns true if the file was successfully deleted, false otherwise.
    Delete file from filesystem.
    public exists() : bool Returns true if the filename exists and is a regular file, false otherwise.
    Check if the file exits in the filesystem.
    public getBasename() : string Returns basename of the file.
    Get basename of the file (filename without the associated file extension).
    public getCreationTime() : int Returns Unix timestamp. If file does not exist, method returns current time.
    Get file creation time.
    public getExtension(bool $withDot=false) : string Returns file extension of the file (can be empty).
    Get file extension of the file.
    public getFilePath() : string Returns path and filename in the filesystem. Can also be URI.
    Get both path and filename of the file.
    public getFilename() : string Returns name of the file.
    Get filename of the file.
    public getModificationTime() : int Returns Unix timestamp. If file does not exist, method returns current time.
    Get file modification time.
    public getPath() : string Returns path in the filesystem. Can also be URI.
    Get path of the file.
    public isLocked() : bool Returns true if the file is locked, false otherwise.
    Returns true if file has been locked by you for writing.
    public isReadable() : bool Returns true if the file can be read, false otherwise.
    Check if file exists and can be read.
    public isWritable() : bool Returns true if the file can be written, false otherwise.
    Check if file can be written.
    public load() : string/array/object/false Returns file content or false if file couldn't be read.
    (Re)Load a file and return file contents.
    public lock(bool $block=true) : bool Returns true if the file was successfully locked, false otherwise.
    Lock file for writing. You need to manually call unlock().
    public rename(string $path) : bool Returns true if the file was successfully renamed, false otherwise.
    Rename file in the filesystem if it exists. Target folder will be created if if did not exist.
    public save(mixed $data) : void
    Save file. See supported data format for each of the file format.
    public unlock() : bool Returns true if the file was successfully unlocked, false otherwise.
    Unlock file after writing.

    This class implements \Serializable


    Interface: \Grav\Framework\File\Interfaces\FileFormatterInterface

    Defines common interface for all file formatters. File formatters allow you to read and optionally write various file formats, such as:

    Visibility Function
    public decode(string $data) : mixed Returns decoded data.
    Decode a string into data.
    public encode(mixed $data) : string Returns encoded data as a string.
    Encode data into a string.
    public getDefaultFileExtension() : string Returns file extension (can be empty).
    Get default file extension from current formatter (with dot). Default file extension is the first defined extension.
    public getMimeType() : string
    public getSupportedFileExtensions() : string[] Returns list of all supported file extensions.
    Get file extensions supported by current formatter (with dot).

    This class implements \Serializable


    Class: \Grav\Framework\Filesystem\Filesystem

    Class Filesystem

    Visibility Function
    public basename(string $path, string $suffix=null) : void
    public dirname(string $path, int $levels=1) : void
    public static getInstance(bool/null/bool $normalize=null) : \Grav\Framework\Filesystem\Filesystem
    public getNormalization() : bool/null
    public normalize(string $path) : void
    public parent(string $path, int $levels=1) : void
    public pathinfo(string $path, int $options=null) : void
    public pathname(string $path, int $levels=1) : string
    Gets full path with trailing slash.
    public safe() : \Grav\Framework\Filesystem\self
    Force all paths not to be normalized (speeds up the calls if given paths are known to be normalized).
    public setNormalization(bool/null/bool $normalize=null) : \Grav\Framework\Filesystem\Filesystem
    Set path normalization. Default option enables normalization for the streams only, but you can force the normalization to be either on or off for every path. Disabling path normalization speeds up the calls, but may cause issues if paths were not normalized.
    public unsafe() : \Grav\Framework\Filesystem\self
    Force all paths to be normalized.
    protected __construct(bool/null/bool $normalize=null) : void
    Always use Filesystem::getInstance() instead.
    protected dirnameInternal(string/null/string $scheme, string $path, int $levels=1) : array
    protected getSchemeAndHierarchy(string $filename) : array
    Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> array(file, tmp)).
    protected normalizePathPart(string $path) : string
    protected pathinfoInternal(string/null/string $scheme, string $path, int/null/int $options=null) : array/string
    protected toString(string/null/string $scheme, string $path) : string

    This class implements \Grav\Framework\Filesystem\Interfaces\FilesystemInterface


    Interface: \Grav\Framework\Filesystem\Interfaces\FilesystemInterface

    Defines several stream-save filesystem actions.

    Visibility Function
    public basename(string $path, string/null/string $suffix=null) : string
    Unicode-safe and stream-safe \basename() replacement.
    public dirname(string $path, int $levels=1) : string Returns path to the directory.
    Unicode-safe and stream-safe \dirname() replacement.
    public normalize(string $path) : string Returns normalized path.
    Normalize path by cleaning up \, /./, // and /../.
    public parent(string $path, int $levels=1) : string Returns parent path.
    Get parent path. Empty path is returned if there are no segments remaining. Can be used recursively to get towards the root directory.
    public pathinfo(string $path, int/null/int $options=null) : array/string
    Unicode-safe and stream-safe \pathinfo() replacement.


    Class: \Grav\Framework\Flex\FlexDirectory

    Class FlexDirectory

    Visibility Function
    public __construct(string $type, string $blueprint_file, array $defaults=array()) : void
    FlexDirectory constructor.
    public clearCache() : \Grav\Framework\Flex\$this
    public createCollection(array $entries, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    public createIndex(array $entries, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexIndexInterface
    public createObject(array $data, string $key='', bool $validate=false) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    public getAuthorizeRule(string $scope, string $action) : string
    public getBlueprint(string $type='', string $context='') : \Grav\Common\Data\Blueprint
    Returns a new uninitialized instance of blueprint. Always use $object->getBlueprint() or $object->getForm()->getBlueprint() instead.
    public getBlueprintFile(string $view='') : string
    public getCache(string/null/string $namespace=null) : \Grav\Framework\Cache\CacheInterface
    public getCollection(array/null/array $keys=null, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    Get collection. In the site this will be filtered by the default filters (published etc). Use $directory->getIndex() if you want unfiltered collection.
    public getCollectionClass() : string
    public getConfig(string/null/string $name=null, mixed $default=null) : mixed
    public getDescription() : string
    public getDirectoryBlueprint() : \Grav\Common\Data\Blueprint
    public getDirectoryConfigUri(string/null/string $name=null) : string
    public getDirectoryForm(string/null/string $name=null, array $options=array()) : \Grav\Framework\Flex\Interfaces\FlexFormInterface
    public getFlexType() : string
    public getIndex(array/null/array $keys=null, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexIndexInterface
    Get the full collection of all stored objects. Use $directory->getCollection() if you want a filtered collection.
    public getIndexClass() : string
    public getMediaFolder(string/null/string $key=null) : string/null
    public getObject(string/null $key=null, string/null/string $keyField=null) : \Grav\Framework\Flex\FlexObjectInterface/null
    Returns an object if it exists. If no arguments are passed (or both of them are null), method creates a new empty object. Note: It is not safe to use the object without checking if the user can access it.
    public getObjectClass() : string
    public getSearchOptions(array/null/array $options=null) : array
    public getSearchProperties(string/string[]/null $properties=null) : array
    public getStorage() : \Grav\Framework\Flex\Interfaces\FlexStorageInterface
    public getStorageFolder(string/null/string $key=null) : string/null
    public getTitle() : string
    public getType() : string
    DEPRECATED - 1.6 Use ->getFlexType() method instead.
    public isAuthorized(string $action, string/null/string $scope=null, \Grav\Framework\Flex\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : bool/null
    Check if user is authorized for the action. Note: There are two deny values: denied (false), not set (null). This allows chaining multiple rules together when the previous rules were not matched. To override the default behavior, please use isAuthorizedOverride().
    public isEnabled() : bool
    public isListed() : bool
    public loadCollection(array $entries, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    public loadDirectoryConfig(string $name) : array
    public loadObjects(array $entries) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface[]
    public reloadIndex() : void
    public remove(string $key) : \Grav\Framework\Flex\FlexObjectInterface/null
    DEPRECATED - 1.7 Use $object->delete() instead.
    public saveDirectoryConfig(string $name, array $data) : void
    public update(array $data, string/null/string $key=null) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    DEPRECATED - 1.7 Use $object->update()->save() instead.
    protected createStorage() : \Grav\Framework\Flex\Interfaces\FlexStorageInterface
    protected decodeCacheKey(string $key) : string
    Decode a cache key back to the original storage key.
    protected dynamicAuthorizeField(array $field, string $property, array $call) : void
    protected dynamicDataField(array $field, string $property, array $call) : void
    protected dynamicFlexField(array $field, string $property, array $call) : void
    protected encodeCacheKey(string $key) : string
    Encode a storage key for use as a cache key. Symfony cache reserves characters: {}()/\@:
    protected getActiveUser() : \Grav\Framework\Flex\UserInterface/null
    protected getAuthorizeAction(string $action) : string
    protected getAuthorizeScope() : string
    protected getBlueprintInternal(string $type_view='', string $context='') : \Grav\Common\Data\Blueprint
    protected getDirectoryConfig(string/null/string $name=null) : array
    protected isAuthorizedAction(\Grav\Common\User\Interfaces\UserInterface $user, string $action, string $scope, bool $isMe) : bool/null
    Check if user is authorized for the action.
    protected isAuthorizedOverride(\Grav\Common\User\Interfaces\UserInterface $user, string $action, string $scope, bool $isMe) : bool/null
    Please override this method
    protected isAuthorizedSuperAdmin(\Grav\Common\User\Interfaces\UserInterface $user) : bool/null
    DEPRECATED - 1.7 Not needed for Flex Users.
    protected loadCachedObjects(array $fetch) : mixed
    protected loadIndex(string $keyField) : \Grav\Framework\Flex\Interfaces\FlexIndexInterface
    protected mergeArrays(array $array1, array $array2) : array

    This class implements \Grav\Framework\Flex\Interfaces\FlexDirectoryInterface, \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface


    Class: \Grav\Framework\Flex\Flex

    Class Flex

    Visibility Function
    public __construct(array $types, array $config) : void
    Flex constructor.
    public addDirectory(\Grav\Framework\Flex\FlexDirectory $directory) : \Grav\Framework\Flex\$this
    public addDirectoryType(string $type, string $blueprint, array $config=array()) : \Grav\Framework\Flex\$this
    public count() : int
    public getCollection(string $type, array/null/array $keys=null, string/null/string $keyField=null) : \Grav\Framework\Flex\FlexCollectionInterface/null
    public getDirectories(array/string[]/null/array $types=null, bool $keepMissing=false) : \Grav\Framework\Flex\array<FlexDirectory/\Grav\Framework\Flex\null>
    public getDirectory(string $type) : \Grav\Framework\Flex\FlexDirectory/null
    public getMixedCollection(array $keys, array $options=array()) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    collection_class: Class to be used to create the collection. Defaults to ObjectCollection.
    public getObject(string $key, string/null/string $type=null, string/null/string $keyField=null) : \Grav\Framework\Flex\FlexObjectInterface/null
    public getObjects(array $keys, array $options=array()) : array
    types: List of allowed types. type: Allowed type if types isn't defined, otherwise acts as default_type. default_type: Set default type for objects given without type (only used if key_field isn't set). keep_missing: Set to true if you want to return missing objects as null. key_field: Key field which is used to match the objects.
    public hasDirectory(string $type) : bool
    protected resolveKeyAndType(string $flexKey, string/null/string $type=null) : array
    protected resolveType(string/null/string $type=null) : string

    This class implements \Grav\Framework\Flex\Interfaces\FlexInterface, \Countable


    Class: \Grav\Framework\Flex\FlexDirectoryForm

    Class FlexForm

    Visibility Function
    public __construct(string $name, \Grav\Framework\Flex\FlexDirectory $directory, array/null/array $options=null) : void
    FlexForm constructor.
    public __get(string $name) : mixed/null
    public __isset(string $name) : bool
    public __serialize() : array
    public __set(string $name, mixed $value) : void
    public __unserialize(array $data) : void
    public __unset(string $name) : void
    public def(string $name, mixed $default=null, string/null $separator=null) : \Grav\Framework\Flex\$this
    Set default value by using dot notation for nested arrays/objects.
    public disable() : void
    public enable() : void
    public get(string $name, mixed $default=null, string/null $separator=null) : mixed
    public getAction() : string
    public getAllFlashes() : \Grav\Framework\Form\Interfaces\FormFlashInterface[]
    Get all available form flash objects for this form.
    public getBlueprint() : \Grav\Common\Data\Blueprint
    public getButtons() : array
    public getData() : \Grav\Framework\Flex\Data/object
    public getDefaultValue(string $name) : array/mixed/null
    public getDefaultValues() : array
    public getDirectory() : \Grav\Framework\Flex\FlexDirectory
    public getError() : string/null
    public getErrors() : array
    public getFields() : array
    public getFileDeleteAjaxRoute(string/null $field=null, string/null $filename=null) : \Grav\Framework\Flex\Route/null
    public getFileUploadAjaxRoute() : \Grav\Framework\Flex\Route/null
    public getFiles() : array/\Grav\Framework\Flex\UploadedFileInterface[]
    public getFlash() : \Grav\Framework\Flex\FormFlashInterface/\Grav\Framework\Flex\FlexFormFlash
    Get form flash object.
    public getFlexType() : string
    public getFormName() : string
    public getId() : string
    public getMediaTaskRoute(array $params=array(), string/null/string $extension=null) : string
    public getName() : string
    public getNonce() : string
    public getNonceAction() : string
    public getNonceName() : string
    public getTask() : string
    public getTasks() : array
    public getUniqueId() : string
    public getValue(string $name) : mixed
    Get a value from the form. Note: Used in form fields.
    public handleRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public initialize() : \Grav\Framework\Flex\$this
    public static instance(array $options=array()) : \Grav\Framework\Flex\Interfaces\FlexFormInterface
    (string) name: Form name, allows you to use custom form. (string) unique_id: Unique id for this form instance. (array) form: Custom form fields. (FlexDirectory) directory: Flex Directory, mandatory.
    public isEnabled() : bool
    public isSubmitted() : bool
    public isValid() : bool
    public jsonSerialize() : array
    public offsetExists(string $offset) : bool Returns TRUE on success or FALSE on failure.
    Whether or not an offset exists.
    public offsetGet(string $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public offsetSet(string/null $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public offsetUnset(string/null $offset) : void
    Unsets variable at specified offset.
    public render(string $layout=null, array $context=array()) : void
    public reset() : void
    public serialize() : string
    public set(string $name, mixed $value, string/null $separator=null) : \Grav\Framework\Flex\$this
    public setId(string $id) : void
    public setRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public setUniqueId(string $uniqueId) : void
    public submit(array $data, \Grav\Framework\Flex\UploadedFileInterface[]/null/array $files=null) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public undef(string $name, string/null $separator=null) : \Grav\Framework\Flex\$this
    Unset value by using dot notation for nested arrays/objects.
    public unserialize(string $serialized) : void
    public validate() : bool
    protected decodeData(array $data) : array
    Decode POST data
    protected doSerialize() : array
    protected doSubmit(array $data, array $files) : void
    protected doTraitSerialize() : array
    protected doTraitUnserialize(array $data) : void
    protected doUnserialize(array $data) : void
    protected filterData(\Grav\Framework\Flex\ArrayAccess/\Grav\Framework\Flex\Data/null $data=null) : void
    Filter validated data.
    protected getFlashFolder() : string/null
    protected getFlashId() : string/null
    protected getFlashLookupFolder() : string
    protected getSessionId() : mixed
    protected getTemplate(string $layout) : \Grav\Framework\Flex\Template/\Grav\Framework\Flex\TemplateWrapper
    protected getUnserializeAllowedClasses() : array/bool
    protected jsonDecode(array $data) : array
    Recursively JSON decode POST data.
    protected parseRequest(\Psr\Http\Message\ServerRequestInterface $request) : array
    Parse PSR-7 ServerRequest into data and files.
    protected setDirectory(\Grav\Framework\Flex\FlexDirectory $directory) : \Grav\Framework\Flex\$this
    Note: this method clones the object.
    protected setError(string $error) : void
    Set a single error.
    protected setErrors(array $errors) : void
    Set all errors.
    protected setFlashLookupFolder(string $folder) : void
    protected setName(string $type, string $name) : void
    protected setSessionId(string $sessionId) : void
    protected unsetFlash() : void
    protected validateData(\Grav\Framework\Flex\ArrayAccess/\Grav\Framework\Flex\Data/null $data=null) : void
    Validate data and throw validation exceptions if validation fails.
    protected validateUpload(\Psr\Http\Message\UploadedFileInterface $file) : void
    Validate uploaded file.
    protected validateUploads(array $files) : void
    Validate all uploaded files.
    Examples of FlexDirectoryForm::def()
    TXT
    $data->def('this.is.my.nested.variable', 'default');
    
    Examples of FlexDirectoryForm::undef()
    TXT
    $data->undef('this.is.my.nested.variable');
    

    This class implements \Grav\Framework\Flex\Interfaces\FlexDirectoryFormInterface, \JsonSerializable, \Serializable, \Grav\Framework\Form\Interfaces\FormInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Flex\Interfaces\FlexFormInterface


    Class: \Grav\Framework\Flex\FlexIdentifier

    Interface IdentifierInterface

    Visibility Function
    public __construct(string $id, string $type, string $keyField='key') : void
    IdentifierInterface constructor.
    public static createFromObject(\Grav\Framework\Flex\Interfaces\FlexObjectInterface $object) : \Grav\Framework\Flex\FlexIdentifier
    public getObject() : \Grav\Framework\Flex\T
    public setObject(\Grav\Framework\Flex\T/\Grav\Framework\Flex\Interfaces\FlexObjectInterface $object) : void

    This class extends \Grav\Framework\Object\Identifiers\Identifier

    This class implements \JsonSerializable, \Grav\Framework\Contracts\Object\IdentifierInterface


    Class: \Grav\Framework\Flex\FlexForm

    Class FlexForm

    Visibility Function
    public __construct(string $name, \Grav\Framework\Flex\Interfaces\FlexObjectInterface $object, array/null/array $options=null) : void
    FlexForm constructor.
    public __get(string $name) : mixed/null
    public __isset(string $name) : bool
    public __serialize() : array
    public __set(string $name, mixed $value) : void
    public __unserialize(array $data) : void
    public __unset(string $name) : void
    public def(string $name, mixed $default=null, string/null $separator=null) : \Grav\Framework\Flex\$this
    Set default value by using dot notation for nested arrays/objects.
    public disable() : void
    public enable() : void
    public get(string $name, mixed $default=null, string/null $separator=null) : mixed
    public getAction() : string
    public getAllFlashes() : \Grav\Framework\Form\Interfaces\FormFlashInterface[]
    Get all available form flash objects for this form.
    public getBlueprint() : \Grav\Common\Data\Blueprint
    public getButtons() : array
    public getData() : \Grav\Framework\Flex\Data/\Grav\Framework\Flex\FlexObjectInterface/object
    public getDefaultValue(string $name) : array/mixed/null
    public getDefaultValues() : array
    public getError() : string/null
    public getErrors() : array
    public getFields() : array
    public getFileDeleteAjaxRoute(string/null $field=null, string/null $filename=null) : \Grav\Framework\Flex\Route/null
    public getFileUploadAjaxRoute() : \Grav\Framework\Flex\Route/null
    public getFiles() : array/\Grav\Framework\Flex\UploadedFileInterface[]
    public getFlash() : \Grav\Framework\Flex\FormFlashInterface/\Grav\Framework\Flex\FlexFormFlash
    Get form flash object.
    public getFlexType() : string
    public getFormName() : string
    public getId() : string
    public getMediaTaskRoute(array $params=array(), string/null/string $extension=null) : string
    public getName() : string
    public getNonce() : string
    public getNonceAction() : string
    public getNonceName() : string
    public getObject() : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    public getTask() : string
    public getTasks() : array
    public getUniqueId() : string
    public getValue(string $name) : mixed
    Get a value from the form. Note: Used in form fields.
    public handleRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public initialize() : \Grav\Framework\Flex\$this
    public static instance(array $options=array()) : \Grav\Framework\Flex\Interfaces\FlexFormInterface
    (string) name: Form name, allows you to use custom form. (string) unique_id: Unique id for this form instance. (array) form: Custom form fields. (FlexObjectInterface) object: Object instance. (string) key: Object key, used only if object instance isn't given. (FlexDirectory) directory: Flex Directory, mandatory if object isn't given.
    public isEnabled() : bool
    public isSubmitted() : bool
    public isValid() : bool
    public jsonSerialize() : array
    public offsetExists(string $offset) : bool Returns TRUE on success or FALSE on failure.
    Whether or not an offset exists.
    public offsetGet(string $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public offsetSet(string/null $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public offsetUnset(string/null $offset) : void
    Unsets variable at specified offset.
    public render(string $layout=null, array $context=array()) : void
    public reset() : void
    public serialize() : string
    public set(string $name, mixed $value, string/null $separator=null) : \Grav\Framework\Flex\FlexForm
    public setId(string $id) : void
    public setRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public setSubmitMethod(callable/null/callable $submitMethod) : void
    public setUniqueId(string $uniqueId) : void
    public submit(array $data, \Grav\Framework\Flex\UploadedFileInterface[]/null/array $files=null) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public undef(string $name, string/null $separator=null) : \Grav\Framework\Flex\$this
    Unset value by using dot notation for nested arrays/objects.
    public unserialize(string $serialized) : void
    public updateObject() : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    public validate() : bool
    protected decodeData(array $data) : array
    Decode POST data
    protected doSerialize() : array
    protected doSubmit(array $data, array $files) : void
    protected doTraitSerialize() : array
    protected doTraitUnserialize(array $data) : void
    protected doUnserialize(array $data) : void
    protected filterData(\Grav\Framework\Flex\ArrayAccess/\Grav\Framework\Flex\Data/null $data=null) : void
    Filter validated data.
    protected getFlashFolder() : string/null
    protected getFlashId() : string/null
    protected getFlashLookupFolder() : string
    protected getSessionId() : mixed
    protected getTemplate(string $layout) : \Grav\Framework\Flex\Template/\Grav\Framework\Flex\TemplateWrapper
    protected getUnserializeAllowedClasses() : array/bool
    protected jsonDecode(array $data) : array
    Recursively JSON decode POST data.
    protected parseRequest(\Psr\Http\Message\ServerRequestInterface $request) : array
    Parse PSR-7 ServerRequest into data and files.
    protected setError(string $error) : void
    Set a single error.
    protected setErrors(array $errors) : void
    Set all errors.
    protected setFlashLookupFolder(string $folder) : void
    protected setName(string $type, string $name) : void
    protected setObject(\Grav\Framework\Flex\Interfaces\FlexObjectInterface $object) : \Grav\Framework\Flex\$this
    Note: this method clones the object.
    protected setSessionId(string $sessionId) : void
    protected unsetFlash() : void
    protected validateData(\Grav\Framework\Flex\ArrayAccess/\Grav\Framework\Flex\Data/null $data=null) : void
    Validate data and throw validation exceptions if validation fails.
    protected validateUpload(\Psr\Http\Message\UploadedFileInterface $file) : void
    Validate uploaded file.
    protected validateUploads(array $files) : void
    Validate all uploaded files.
    Examples of FlexForm::def()
    TXT
    $data->def('this.is.my.nested.variable', 'default');
    
    Examples of FlexForm::undef()
    TXT
    $data->undef('this.is.my.nested.variable');
    

    This class implements \Grav\Framework\Flex\Interfaces\FlexObjectFormInterface, \JsonSerializable, \Serializable, \Grav\Framework\Form\Interfaces\FormInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Flex\Interfaces\FlexFormInterface


    Class: \Grav\Framework\Flex\FlexFormFlash

    Class FlexFormFlash

    Visibility Function
    public __construct(array $config) : void
    public addFile(string $filename, string $field, array/null/array $crop=null) : bool
    Add existing file to the form flash.
    public addUploadedFile(\Psr\Http\Message\UploadedFileInterface $upload, string/null/string $field=null, array/null/array $crop=null) : string Return name of the file
    Add uploaded file to the form flash.
    public clearFiles() : void
    Clear form flash from all uploaded files.
    public delete() : \Grav\Framework\Form\Interfaces\$this
    Delete this form flash.
    public exists() : bool
    Check if this form flash exists.
    public getCreatedTimestamp() : int
    Get creation timestamp for this form flash.
    public getData() : array/null
    Get raw form data.
    public getDirectory() : \Grav\Framework\Flex\FlexDirectory/null
    public getFilesByField(string $field) : array
    Get all files associated to a form field.
    public getFilesByFields(bool $includeOriginal=false) : array
    Get all files grouped by the associated form fields.
    public getFormName() : string
    Get form name associated to this form instance.
    public getId() : string
    Get unique form flash id if set.
    public getObject() : \Grav\Framework\Flex\FlexObjectInterface/null
    public getSessionId() : string
    Get session Id associated to this form instance.
    public getUniqueId() : string
    Get unique identifier associated to this form instance.
    public getUpdatedTimestamp() : int
    Get last updated timestamp for this form flash.
    public getUrl() : string
    Get URL associated to this form instance.
    public getUserEmail() : string
    Get email from the user who was associated to this form instance.
    public getUsername() : string
    Get username from the user who was associated to this form instance.
    public jsonSerialize() : array
    public removeFile(string $name, string/null/string $field=null) : bool
    Remove any file from form flash.
    public save() : \Grav\Framework\Form\Interfaces\$this
    Save this form flash.
    public setData(array/null/array $data) : void
    Set raw form data.
    public setDirectory(\Grav\Framework\Flex\FlexDirectory $directory) : void
    public static setFlex(\Grav\Framework\Flex\Interfaces\FlexInterface $flex) : void
    public setObject(\Grav\Framework\Flex\Interfaces\FlexObjectInterface $object) : void
    protected init(array/null/array $data, array $config) : void

    This class extends \Grav\Framework\Form\FormFlash

    This class implements \JsonSerializable, \Grav\Framework\Form\Interfaces\FormFlashInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexCollectionInterface

    Defines a collection of Flex Objects.

    Visibility Function
    public __construct(array/\Grav\Framework\Flex\Interfaces\FlexObjectInterface[] $entries=array(), \Grav\Framework\Flex\Interfaces\FlexDirectory/null/\Grav\Framework\Flex\FlexDirectory $directory=null) : void
    Creates a new Flex Collection.
    public static createFromArray(\Grav\Framework\Flex\Interfaces\FlexObjectInterface[] $entries, \Grav\Framework\Flex\FlexDirectory $directory, string/null/string $keyField=null) : static Returns a new Flex Collection.
    Creates a Flex Collection from an array.
    public filterBy(array $filters) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    Filter collection by filter array with keys and values.
    public getCollection() : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    Load all the objects into memory,
    public getFlexKeys() : string[] Returns[key => flex_key, ...] pairs.
    Get Flex keys from all the objects in the collection.
    public getIndex() : FlexIndexInterface Returns a Flex Index from the current collection.
    Get Flex Index from the Flex Collection.
    public getMetaData(string $key) : array
    Get metadata associated to the object
    public getStorageKeys() : string[] Returns [key => storage_key, ...] pairs.
    Get storage keys from all the objects in the collection.
    public getTimestamps() : int[] Returns [key => timestamp, ...] pairs.
    Get timestamps from all the objects in the collection. This method can be used for example in caching.
    public search(string $search, string/string[]/null $properties=null, array/null/array $options=null) : FlexCollectionInterface Returns a Flex Collection with only matching objects.
    Search a string from the collection.
    public sort(array $orderings) : FlexCollectionInterface Returns a sorted version from the collection.
    Sort the collection.
    public withKeyField(string/null/string $keyField=null) : FlexCollectionInterface Returns a new Flex Collection with new key field.
    Return new collection with a different key.

    This class implements \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Doctrine\Common\Collections\Collection, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Serializable, \Doctrine\Common\Collections\Selectable, \Grav\Framework\Collection\CollectionInterface, \Grav\Framework\Object\Interfaces\ObjectInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface

    Defines authorization checks for Flex Objects.

    Visibility Function
    public isAuthorized(string $action, string/null/string $scope=null, \Grav\Framework\Flex\Interfaces\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : bool/null
    Check if user is authorized for the action. Note: There are two deny values: denied (false), not set (null). This allows chaining multiple rules together when the previous rules were not matched.


    Interface: \Grav\Framework\Flex\Interfaces\FlexFormInterface

    Defines Forms for Flex Objects.

    Visibility Function
    public getFileDeleteAjaxRoute(string/null $field, string/null $filename) : \Grav\Framework\Flex\Interfaces\Route/null Returns Route object or null if file uploads are not enabled.
    Get route for deleting files by AJAX.
    public getFileUploadAjaxRoute() : \Grav\Framework\Flex\Interfaces\Route/null Returns Route object or null if file uploads are not enabled.
    Get route for uploading files by AJAX.
    public getMediaTaskRoute() : string Returns admin route for media tasks.
    Get media task route.

    This class implements \Serializable, \Grav\Framework\Form\Interfaces\FormInterface, \Grav\Framework\Interfaces\RenderInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexStorageInterface

    Defines Flex Storage layer.

    Visibility Function
    public __construct(array $options) : void
    StorageInterface constructor.
    public copyRow(string $src, string $dst) : bool
    public createRows(array $rows) : array Returns created rows as `[key => row, ...] pairs.
    Create new rows into the storage. New keys will be assigned when the objects are created.
    public deleteRows(array $rows) : array Returns deleted rows. Note that non-existing rows have null as their value.
    Delete rows from the storage.
    public getExistingKeys() : array Returns all existing keys as [key => [storage_key => key, storage_timestamp => timestamp], ...].
    Returns associated array of all existing storage keys with a timestamp.
    public getKeyField() : string
    public getMediaPath(string/null/string $key=null) : string/null Path in the filesystem. Can be URI or null if media isn't supported.
    Get filesystem path for the collection or object media.
    public getMetaData(string[] $keys, bool $reload=false) : array
    public getStoragePath(string/null/string $key=null) : string/null Path in the filesystem. Can be URI or null if storage is not filesystem based.
    Get filesystem path for the collection or object storage.
    public hasKey(string $key) : bool Returns true if the key exists in the storage, false otherwise.
    Check if the key exists in the storage.
    public hasKeys(string[] $keys) : bool[] Returns keys with true if the key exists in the storage, false otherwise.
    Check if the key exists in the storage.
    public readRows(array $rows, array/null/array $fetched=null) : array Returns rows. Note that non-existing rows will have null as their value.
    Read rows from the storage. If you pass object or array as value, that value will be used to save I/O.
    public renameRow(string $src, string $dst) : bool
    public replaceRows(array $rows) : array Returns both created and updated rows.
    Replace rows regardless if they exist or not. All rows should have a specified key for replace to work properly.
    public updateRows(array $rows) : array Returns updated rows. Note that non-existing rows will not be saved and have null as their value.
    Update existing rows in the storage.


    Interface: \Grav\Framework\Flex\Interfaces\FlexDirectoryInterface

    Interface FlexDirectoryInterface

    Visibility Function
    public clearCache() : \Grav\Framework\Flex\Interfaces\$this
    public createCollection(array $entries, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    public createIndex(array $entries, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexIndexInterface
    public createObject(array $data, string $key='', bool $validate=false) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    public getAuthorizeRule(string $scope, string $action) : string
    public getBlueprint(string $type='', string $context='') : \Grav\Common\Data\Blueprint
    Returns a new uninitialized instance of blueprint. Always use $object->getBlueprint() or $object->getForm()->getBlueprint() instead.
    public getBlueprintFile(string $view='') : string
    public getCache(string/null/string $namespace=null) : \Grav\Framework\Cache\CacheInterface
    public getCollection(array/null/array $keys=null, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    Get collection. In the site this will be filtered by the default filters (published etc). Use $directory->getIndex() if you want unfiltered collection.
    public getCollectionClass() : string
    public getConfig(string/null/string $name=null, mixed $default=null) : mixed
    public getDescription() : string
    public getDirectoryBlueprint() : \Grav\Common\Data\Blueprint
    public getDirectoryConfigUri(string/null/string $name=null) : string
    public getDirectoryForm(string/null/string $name=null, array $options=array()) : \Grav\Framework\Flex\Interfaces\FlexFormInterface
    public getFlexType() : string
    public getIndex(array/null/array $keys=null, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexIndexInterface
    Get the full collection of all stored objects. Use $directory->getCollection() if you want a filtered collection.
    public getIndexClass() : string
    public getMediaFolder(string/null/string $key=null) : string/null
    public getObject(string/null $key=null, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface/null
    Returns an object if it exists. If no arguments are passed (or both of them are null), method creates a new empty object. Note: It is not safe to use the object without checking if the user can access it.
    public getObjectClass() : string
    public getStorage() : \Grav\Framework\Flex\Interfaces\FlexStorageInterface
    public getStorageFolder(string/null/string $key=null) : string/null
    public getTitle() : string
    public isEnabled() : bool
    public isListed() : bool
    public loadCollection(array $entries, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    public loadObjects(array $entries) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface[]
    public reloadIndex() : void
    public saveDirectoryConfig(string $name, array $data) : void

    This class implements \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexTranslateInterface

    Implements PageTranslateInterface

    Visibility Function
    public getLanguage() : string
    Get used language.
    public getLanguages(bool $includeDefault=false) : array
    Returns all translated languages.
    public getTranslation(string/null/string $languageCode=null, bool/null/bool $fallback=null) : \Grav\Framework\Flex\Interfaces\static/null
    Get translation.
    public hasTranslation(string/null/string $languageCode=null, bool/null/bool $fallback=null) : bool
    Returns true if object has a translation in given language (or any of its fallback languages).


    Interface: \Grav\Framework\Flex\Interfaces\FlexObjectFormInterface

    Defines Forms for Flex Objects.

    Visibility Function
    public getObject() : FlexObjectInterface Returns Flex Object associated to the form.
    Get object associated to the form.

    This class implements \Grav\Framework\Flex\Interfaces\FlexFormInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Form\Interfaces\FormInterface, \Serializable


    Interface: \Grav\Framework\Flex\Interfaces\FlexInterface

    Interface FlexInterface

    Visibility Function
    public addDirectory(\Grav\Framework\Flex\FlexDirectory $directory) : \Grav\Framework\Flex\Interfaces\$this
    public addDirectoryType(string $type, string $blueprint, array $config=array()) : \Grav\Framework\Flex\Interfaces\$this
    public count() : int
    public getCollection(string $type, array/null/array $keys=null, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface/null
    public getDirectories(array/string[]/null/array $types=null, bool $keepMissing=false) : \Grav\Framework\Flex\Interfaces\array<FlexDirectory/\Grav\Framework\Flex\Interfaces\null>
    public getDirectory(string $type) : \Grav\Framework\Flex\Interfaces\FlexDirectory/null
    public getMixedCollection(array $keys, array $options=array()) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    collection_class: Class to be used to create the collection. Defaults to ObjectCollection.
    public getObject(string $key, string/null/string $type=null, string/null/string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface/null
    public getObjects(array $keys, array $options=array()) : array
    types: List of allowed types. type: Allowed type if types isn't defined, otherwise acts as default_type. default_type: Set default type for objects given without type (only used if key_field isn't set). keep_missing: Set to true if you want to return missing objects as null. key_field: Key field which is used to match the objects.
    public hasDirectory(string $type) : bool

    This class implements \Countable


    Interface: \Grav\Framework\Flex\Interfaces\FlexObjectInterface

    Defines Flex Objects.

    Visibility Function
    public __construct(array $elements, string $key, \Grav\Framework\Flex\FlexDirectory $directory, bool $validate=false) : void
    Construct a new Flex Object instance.
    public create(string/null/string $key=null) : \Grav\Framework\Flex\Interfaces\static
    Create new object into the storage.
    public delete() : \Grav\Framework\Flex\Interfaces\static
    Delete object from the storage.
    public exists() : bool Returns true if the object exists, false otherwise.
    Returns true if the object exists in the storage.
    public getBlueprint(string $name='') : Blueprint Returns a Blueprint.
    Returns the blueprint of the object.
    public getDefaultValue(string $name, string/null/string $separator=null) : mixed/null Returns default value of the field, null if there is no default value.
    Returns default value suitable to be used in a form for the given property.
    public getDefaultValues() : array Returns default values.
    Returns default values suitable to be used in a form for the given property.
    public getFlexKey() : string Returns Flex Key of the object.
    Get a unique key for the object. Flex Keys can be used without knowing the Directory the Object belongs into. NOTE: Please do not override the method!
    public getForm(string $name='', array/null/array $options=null) : FlexFormInterface Returns a Form.
    Returns a form instance for the object.
    public getFormValue(string $name, mixed $default=null, string/null/string $separator=null) : mixed Returns value of the field.
    Returns raw value suitable to be used in a form for the given property.
    public getMetaData() : array Returns metadata of the object.
    Get index data associated to the object.
    public getStorageKey() : string Returns storage key of the Object.
    Get an unique storage key (within the directory) which is used for figuring out the filename or database id.
    public hasKey() : bool
    Returns true if object has a key.
    public prepareStorage() : array Returns an array of object properties containing only scalars and arrays.
    Prepare object for saving into the storage.
    public save() : \Grav\Framework\Flex\Interfaces\static
    Save object into the storage.
    public search(string $search, string/string[]/null $properties=null, array/null/array $options=null) : float Returns a weight between and 1.
    Search a string from the object, returns weight between 0 and 1. Note: If you override this function, make sure you return value in range 0...1!
    public update(array $data, array/array/\Grav\Framework\Flex\Interfaces\UploadedFileInterface[] $files=array()) : \Grav\Framework\Flex\Interfaces\static
    Updates object in the memory.

    This class implements \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Grav\Framework\Interfaces\RenderInterface, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexCommonInterface

    Defines common interface shared with both Flex Objects and Collections.

    Visibility Function
    public getCacheChecksum() : string Returns cache checksum.
    Get cache checksum for the object / collection. If checksum changes, cache gets invalided.
    public getCacheKey() : string Returns cache key.
    Get a cache key which is used for caching the object / collection.
    public getFlexDirectory() : FlexDirectory Returns associated Flex Directory.
    Get Flex Directory for the object / collection.
    public getFlexFeatures() : array
    Get full list of features the object / collection implements.
    public getFlexType() : string Returns Flex Type of the collection.
    Get Flex Type of the object / collection.
    public getTimestamp() : int Returns Unix timestamp.
    Get last updated timestamp for the object / collection.
    public hasFlexFeature(string $name) : bool
    Test whether the feature is implemented in the object / collection.

    This class implements \Grav\Framework\Interfaces\RenderInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexIndexInterface

    Defines Indexes for Flex Objects. Flex indexes are similar to database indexes, they contain indexed fields which can be used to quickly look up or find the objects without loading them.

    Visibility Function
    public static createFromStorage(\Grav\Framework\Flex\FlexDirectory $directory) : static Returns a new Flex Index.
    Helper method to create Flex Index.
    public getIndexMap(string/null/string $indexKey=null) : array
    public static loadEntriesFromStorage(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : array Returns a list of existing objects [storage_key => [storage_key => xxx, storage_timestamp => 123456, ...]]
    Method to load index from the object storage, usually filesystem.
    public withKeyField(string/null/string $keyField=null) : static Returns a new Flex Collection with new key field.
    Return new collection with a different key.

    This class implements \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\Selectable, \Serializable, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \JsonSerializable, \Doctrine\Common\Collections\Collection, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexDirectoryFormInterface

    Defines Forms for Flex Objects.

    Visibility Function
    public getDirectory() : FlexObjectInterface Returns Flex Object associated to the form.
    Get object associated to the form.

    This class implements \Grav\Framework\Flex\Interfaces\FlexFormInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Form\Interfaces\FormInterface, \Serializable


    Class: \Grav\Framework\Flex\Pages\FlexPageObject

    Class FlexPageObject

    Visibility Function
    public __clone() : void
    Clone page.
    public __debugInfo() : array
    public active() : bool True if it is active
    Returns whether or not this page is the currently active page requested via the URL.
    public activeChild() : bool True if active child exists
    Returns whether or not this URI's URL contains the URL of the active page. Or in other words, is this page's URL in the current URL
    public addContentMeta(string $name, string $value) : void
    Add an entry to the page's contentMeta array
    public addForms(array $new, bool $override=true) : \Grav\Framework\Flex\Pages\$this
    Add forms to this page.
    public adjacentSibling(int $direction=1) : \Grav\Framework\Flex\Pages\PageInterface/false the sibling page
    Returns the adjacent sibling based on a direction.
    public ancestor(string/null $lookup=null) : \Grav\Framework\Flex\Pages\PageInterface/null page you were looking for if it exists
    Helper method to return an ancestor page.
    public blueprintName() : string
    Get the blueprint name for this page. Use the blueprint form field if set
    public cacheControl(string/null $var=null) : string/null
    Gets and sets the cache-control property. If not set it will return the default value (null) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control for more details on valid options
    public cachePageContent() : void
    Fires the onPageContentProcessed event, and caches the page content using a unique ID for the page
    public canonical(bool $include_lang=true) : string
    Returns the canonical URL for a page
    public checkMediaFilename(string $filename) : void
    DEPRECATED - 1.7 Use Media class that implements MediaUploadInterface instead.
    public checkUploadedMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string/null/string $filename=null, string/null/string $field=null) : void
    public childType() : string
    Returns child page type.
    public children() : \Grav\Framework\Flex\Pages\PageCollectionInterface/\Grav\Framework\Flex\Pages\FlexIndexInterface
    Returns children of this page.
    public collection(string/string/array $params='content', bool $pagination=true) : \Grav\Framework\Flex\Pages\PageCollectionInterface/\Grav\Framework\Flex\Pages\Collection
    Get a collection of pages in the current context.
    public content(string/null $var=null) : string Content
    Gets and Sets the content based on content portion of the .md file
    public contentMeta() : array
    Get the contentMeta array and initialize content first if it's not already
    public copy(\Grav\Framework\Flex\Pages\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $parent=null) : \Grav\Framework\Flex\Pages\$this
    Prepare a copy from the page. Copies also everything that's under the current page. Returns a new Page object for the copy. You need to call $this->save() in order to perform the move.
    public createCopy(string/null/string $key=null) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    public currentPosition() : int/null the index of the current page.
    Returns the item in the current position.
    public date(string/null $var=null) : int Unix timestamp representation of the date
    Gets and sets the date for this Page object. This is typically passed in via the page headers
    public dateformat(string/null $var=null) : string String representation of a date format
    Gets and sets the date format for this Page object. This is typically passed in via the page headers using typical PHP date string structure - http://php.net/manual/en/function.date.php
    public debugger() : bool
    Returns the state of the debugger override setting for this page
    public deleteMediaFile(string $filename) : void
    public eTag(bool/null $var=null) : bool show etag header
    Gets and sets the option to show the etag header for the page.
    public evaluate(string/array $value, bool $only_published=true) : \Grav\Framework\Flex\Pages\PageCollectionInterface/\Grav\Framework\Flex\Pages\Collection
    public expires(int/null $var=null) : int The expires value
    Gets and sets the expires field. If not set will return the default
    public extension(string/null $var=null) : string
    Gets and sets the extension field.
    public extra() : array
    Get unknown header variables.
    public file() : \Grav\Framework\Flex\Pages\MarkdownFile/null
    Get file object to the page.
    public filePath(string/null $var=null) : string/null the file path
    Gets and sets the path to the .md file for this Page object.
    public filePathClean() : string/null The relative file path
    Gets the relative path to the .md file
    public filter() : void
    Filter page header from illegal contents.
    public find(string $url, bool $all=false) : \Grav\Framework\Flex\Pages\PageInterface/null page you were looking for if it exists
    Helper method to return a page.
    public findTranslation(string/null/string $languageCode=null, bool/null/bool $fallback=null) : string/null
    public folder(string/null $var=null) : string/null
    Get/set the folder.
    public folderExists() : bool
    Returns whether or not the current folder exists
    public forms() : array
    Alias of $this->getForms();
    public frontmatter(string/null $var=null) : string
    Gets and Sets the page frontmatter
    public getAction() : string/null The Action string.
    Gets the action.
    public getAllLanguages(bool $includeDefault=false) : array
    public getAuthors() : \Grav\Framework\Flex\Pages\array<int,UserInterface>
    Get list of all author objects.
    public getCacheKey() : mixed
    public static getCachedMethods() : array
    public getContentMeta(string/null $name=null) : string/array/null
    Return the whole contentMeta array as it currently stands
    public getCreated_Timestamp() : int
    public getFieldSettings(string $field) : array/null
    public getFormValue(string $name, mixed $default=null, string $separator=null) : mixed
    public getForms() : array
    Return all the forms which are associated to this page. Forms are returned as [name => blueprint, ...], where blueprint follows the regular form blueprint format.
    public getLanguage() : string
    public getLanguages(bool $includeDefault=false) : array
    Returns all translated languages.
    public getMasterKey() : string
    Get master storage key.
    public getMedia() : \Grav\Framework\Flex\Pages\MediaCollectionInterface
    public getMediaField(string $field) : \Grav\Framework\Flex\Pages\MediaCollectionInterface/null
    public getMediaFolder() : string/null
    public getMediaOrder() : array
    Get display order for the associated media.
    public getMediaUri() : string/null
    Get URI ot the associated media. Method will return null if path isn't URI.
    public getOriginal() : \Grav\Framework\Flex\Pages\FlexPageObject/null The original version of the page.
    Gets the Page Unmodified (original) version of the page. Assumes that object has been cloned before modifying it.
    public getPermissions(bool $inherit=false) : array
    public getProperty(string $property, mixed $default=null) : mixed
    public getPublish_Timestamp() : int
    public getRawContent() : string the current page content
    Needed by the onPageContentProcessed event to get the raw page content
    public getStorageFolder() : string/null
    public getTranslation(string/null/string $languageCode=null, bool/null/bool $fallback=null) : \Grav\Framework\Flex\Pages\FlexObjectInterface/\Grav\Framework\Flex\Pages\PageInterface/null
    public getUnpublish_Timestamp() : int/null
    public getUpdated_Timestamp() : int
    public hasAuthor(string $username) : bool
    Returns true if object has the named author.
    public hasTranslation(string/null/string $languageCode=null, bool/null/bool $fallback=null) : bool
    public header(object/array/null $var=null) : \stdClass/Header The current YAML configuration
    Gets and Sets the header based on the YAML configuration at the top of the .md file
    public home() : bool True if it is the homepage
    Returns whether or not this page is the currently configured home page.
    public httpHeaders() : array
    public httpResponseCode() : int
    public id(string/null $var=null) : string The identifier
    Gets and sets the identifier for this Page object.
    public inherited(string $field) : \Grav\Framework\Flex\Pages\PageInterface/null
    Helper method to return an ancestor page to inherit from. The current page object is returned.
    public inheritedField(string $field) : array
    Helper method to return an ancestor field only to inherit from. The first occurrence of an ancestor field will be returned if at all.
    public init(\SplFileInfo $file, string/null $extension=null) : \Grav\Framework\Flex\Pages\$this
    Initializes the page instance variables based on a file
    public isDir() : bool True if its a directory
    Returns whether or not this Page object is a directory or a page.
    public isFirst() : bool True if item is first.
    Check to see if this item is the first in an array of sub-pages.
    public isLast() : bool True if item is last
    Check to see if this item is the last in an array of sub-pages.
    public isModule() : bool
    public isOrdered(bool $test=true) : bool
    public isPage() : bool True if its a page with a .md file associated
    Returns whether or not this Page object has a .md file associated with it or if its just a directory.
    public isParentAuthorized(string $action, string/null/string $scope=null, \Grav\Framework\Flex\Pages\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null, bool $isAuthor=false) : bool/null
    public isPublished(bool $test=true) : bool
    public isRoutable(bool $test=true) : bool
    public isVisible(bool $test=true) : bool
    public language(string/null $var=null) : string/null
    Get page language
    public lastModified(bool/null $var=null) : bool Show last_modified header
    Gets and sets the option to show the last_modified header for the page.
    public link(bool $include_host=false) : string the permalink
    Gets the URL for a page - alias of url().
    public maxCount(int/null $var=null) : int the maximum number of sub-pages
    Gets and sets the maxCount field which describes how many sub-pages should be displayed if the sub_pages header property is set for this page object.
    public media(\Grav\Common\Page\Interfaces\MediaCollectionInterface/null $var=null) : MediaCollectionInterface Representation of associated media.
    Gets and sets the associated media as found in the page folder.
    public menu(string/null $var=null) : string The menu field for the page
    Gets and sets the menu name for this Page. This is the text that can be used specifically for navigation. If no menu field is set, it will use the title()
    public metadata(array/null $var=null) : array an Array of metadata values for the page
    Function to merge page metadata tags and build an array of Metadata objects that can then be rendered in the page.
    public modified(int/null $var=null) : int Modified unix timestamp
    Gets and sets the modified timestamp.
    public modifyHeader(string $key, string/array $value) : void
    Modify a header value directly
    public modular(bool/null $var=null) : bool true if modular_twig
    DEPRECATED - 1.7 Use ->isModule() or ->modularTwig() method instead.
    public modularTwig(bool/null $var=null) : bool true if modular_twig
    Gets and sets the modular_twig var that helps identify this page as a modular child page that will need twig processing handled differently from a regular page.
    public move(\Grav\Common\Page\Interfaces\PageInterface $parent) : \Grav\Framework\Flex\Pages\$this
    Prepare move page to new location. Moves also everything that's under the current page. You need to call $this->save() in order to perform the move.
    public name(string/null $var=null) : string The name of this page.
    Gets and sets the name field. If no name field is set, it will return 'default.md'.
    public nextSibling() : \Grav\Framework\Flex\Pages\PageInterface/false the next Page item
    Gets the next sibling based on current position.
    public static normalizeRoute(string $route) : string
    Method to normalize the route.
    public order(int/null $var=null) : string/bool Order in a form of '02.' or false if not set
    Get/set order number of this page.
    public orderBy(string/null $var=null) : string supported options include "default", "title", "date", and "folder"
    Gets and sets the order by which the sub-pages should be sorted. default - is the order based on the file system, ie 01.Home before 02.Advark title - is the order based on the title set in the pages date - is the order based on the date set in the pages folder - is the order based on the name of the folder with any numerics omitted
    public orderDir(string/null $var=null) : string the order, either "asc" or "desc"
    Gets and sets the order by which any sub-pages should be sorted.
    public orderManual(string/null $var=null) : array
    Gets the manual order set in the header.
    public parent(\Grav\Framework\Flex\Pages\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $var=null) : \Grav\Framework\Flex\Pages\PageInterface/null the parent page object if it exists.
    Gets and Sets the parent object for this page
    public parentStorageKey(string/null $var=null) : string/null
    Get/set the folder.
    public path(string/null $var=null) : string/null the path
    Gets and sets the path to the folder where the .md for this Page object resides. This is equivalent to the filePath but without the filename.
    public permalink() : string The permalink.
    Gets the URL with host information, aka Permalink.
    public prevSibling() : \Grav\Framework\Flex\Pages\PageInterface/false the previous Page item
    Gets the previous sibling based on current position.
    public process(array/null $var=null) : array Array of name value pairs where the name is the process and value is true or false
    Gets and Sets the process setup for this Page. This is multi-dimensional array that consists of a simple array of arrays with the form array("markdown"=>true) for example
    public publishDate(string/null $var=null) : int Unix timestamp representation of the date
    Gets and Sets the Page publish date
    public published(bool/null $var=null) : bool True if the page is published
    Gets and Sets whether or not this Page is considered published
    public raw(string/null $var=null) : string Raw content string
    Gets and Sets the raw data
    public rawMarkdown(string/null $var=null) : string
    Gets and Sets the Page raw content
    public rawRoute(string/null $var=null) : string/null
    Gets and Sets the page raw route
    public redirect(string/null $var=null) : string/null
    Gets the redirect set in the header.
    public relativePagePath() : void
    Returns the clean path to the page file Needed in admin for Page Media.
    public resetMetadata() : void
    Reset the metadata and pull from header again
    public root(bool/null $var=null) : bool True if it is the root
    Returns whether or not this page is the root node of the pages tree.
    public routable(bool/null $var=null) : bool true if the page is routable
    Gets and Sets whether or not this Page is routable, ie you can reach it via a URL. The page must be routable and published
    public route(string $var=null) : string/null The route for the Page.
    Gets the route for the page based on the route headers if available, else from the parents route and the current Page's slug.
    public routeAliases(array/null $var=null) : array The route aliases for the Page.
    Gets the route aliases for the page based on page headers.
    public routeCanonical(string/null $var=null) : string/null
    Gets the canonical route for this page if its set. If provided it will use that value, else if it's true it will use the default route.
    public save(bool/array/bool $reorder=true) : \Grav\Framework\Flex\Pages\FlexObject/\Grav\Framework\Flex\Pages\FlexObjectInterface
    public setContentMeta(array $content_meta) : array
    Sets the whole content meta array in one shot
    public setNestedProperty(string $property, mixed $value, string/null $separator=null) : \Grav\Framework\Flex\Pages\$this
    public setProperty(string $property, mixed $value) : \Grav\Framework\Flex\Pages\$this
    public setRawContent(string/null $content) : void
    Needed by the onPageContentProcessed event to set the raw page content
    public setSummary(string $summary) : void
    Sets the summary of the page
    public shouldProcess(string $process) : bool Whether or not the processing method is enabled for this Page
    Gets the configured state of the processing method.
    public slug(string/null $var=null) : string The slug
    Gets and Sets the slug for the Page. The slug is used in the URL routing. If not set it uses the parent folder from the path
    public ssl(bool/null $var=null) : bool/null
    public storeOriginal() : void
    Store the Page Unmodified (original) version of the page. Can be called multiple times, only the first call matters.
    public summary(int/null $size=null, bool $textOnly=false) : string
    Get the summary.
    public taxonomy(array/null $var=null) : array An array of taxonomies
    Gets and sets the taxonomy array which defines which taxonomies this page identifies itself with.
    public template(string/null $var=null) : string the template name
    Gets and sets the template field. This is used to find the correct Twig template file to render. If no field is set, it will return the name without the .md extension
    public templateFormat(string/null $var=null) : string
    Allows a page to override the output render format, usually the extension provided in the URL. (e.g. html, json, xml, etc).
    public title(string/null $var=null) : string The title of the Page
    Gets and sets the title for this Page. If no title is set, it will use the slug() to get a name
    public toArray() : array
    Convert page to an array.
    public toJson() : string
    Convert page to JSON encoded string.
    public toYaml() : string
    Convert page to YAML encoded string.
    public topParent() : PageInterface The top parent page object.
    Gets the top parent object for this page. Can return page itself.
    public translated() : bool
    public translatedLanguages(bool $onlyPublished=false) : array the page translated languages
    Return an array with the routes of other translated languages
    public unpublishDate(string/null $var=null) : int/null Unix timestamp representation of the date
    Gets and Sets the Page unpublish date
    public unsetNestedProperty(string $property, string/null $separator=null) : \Grav\Framework\Flex\Pages\$this
    public unsetRouteSlug() : void
    Helper method to clear the route out so it regenerates next time you use it
    public untranslatedLanguages(bool $includeUnpublished=false) : array the page untranslated languages
    Return an array listing untranslated languages available
    public uploadMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, string/null/string $filename=null, string/null/string $field=null) : void
    public url(bool $include_host=false, bool $canonical=false, bool $include_base=true, bool $raw_route=false) : string The url.
    Gets the url for the Page.
    public urlExtension() : string The extension of this page. For example .html
    Returns the page extension, got from the page url_extension config and falls back to the system config system.pages.append_url_extension.
    public validate() : void
    Validate page header.
    public visible(bool/null $var=null) : bool True if the page is visible
    Gets and Sets whether or not this Page is visible for navigation
    protected addUpdatedMedia(\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : void
    protected buildMediaList(string/null/string $field) : array
    protected buildMediaObject(string/null/string $field, string $filename, \Grav\Framework\Flex\Pages\MediaObjectInterface/null/\Grav\Framework\Media\Interfaces\MediaObjectInterface $image=null) : \Grav\Framework\Flex\Pages\MediaObject/\Grav\Framework\Flex\Pages\UploadedMediaObject
    protected clearMediaCache() : void
    Clear media cache.
    protected createMedium(string $uri) : \Grav\Framework\Flex\Pages\Medium/null
    protected filterElements(array $elements, bool $extended=false) : void
    protected freeMedia() : void
    protected getExistingMedia() : \Grav\Framework\Flex\Pages\MediaCollectionInterface/Media Representation of associated media.
    Gets the associated media collection.
    protected getFallbackLanguages(string/null/string $languageCode=null, bool/null/bool $fallback=null) : array
    protected getFieldDateTime(string $field) : \Grav\Framework\Flex\Pages\DateTime/null
    protected getFieldTimestamp(string $field) : int/null
    protected getInheritedParams(string $field) : array
    Method that contains shared logic for inherited() and inheritedField()
    protected getLanguageTemplates() : array
    protected getMediaCache() : \Grav\Framework\Flex\Pages\CacheInterface
    protected getMediaFieldSettings(string $field) : array
    protected getMediaFields() : array
    protected getUpdatedMedia() : \Grav\Framework\Flex\Pages\array<string,UploadedFileInterface/array/\Grav\Framework\Flex\Pages\null>
    protected isAuthorizedByGroup(\Grav\Common\User\Interfaces\UserInterface $user, string $action, string $scope, bool $isMe, bool $isAuthor) : bool/null
    Group authorization works as follows: 1. if any of the groups deny access, return false 2. else if any of the groups allow access, return true 3. else return null
    protected isAuthorizedOverride(\Grav\Common\User\Interfaces\UserInterface $user, string $action, string $scope, bool $isMe) : bool/null
    protected loadAccounts() : \Grav\Framework\Flex\Pages\UserCollectionInterface/null
    protected loadAuthors(iterable $authors) : \Grav\Framework\Flex\Pages\array<int,UserInterface>
    protected loadHeaderProperty(string $property, mixed $var, callable $filter) : mixed/null
    Common logic to load header properties.
    protected loadPermissions(array $parent=array()) : array
    protected loadProperty(string $property, mixed $var, callable $filter) : mixed/null
    Common logic to load header properties.
    protected normalizeForm(array/null $form, string/null $name=null, array $rules=array()) : array/null
    protected offsetLoad_header(\Grav\Framework\Flex\Pages\Header/\Grav\Framework\Flex\Pages\stdClass/array/null $value) : \Grav\Framework\Flex\Pages\Header
    protected offsetLoad_media() : \Grav\Framework\Flex\Pages\MediaCollectionInterface
    protected offsetPrepare_header(\Grav\Framework\Flex\Pages\Header/\Grav\Framework\Flex\Pages\stdClass/array/null $value) : \Grav\Framework\Flex\Pages\Header
    protected offsetSerialize_header(\Grav\Framework\Flex\Pages\Header/null/\Grav\Common\Page\Header $value) : array
    protected offsetSerialize_media() : null
    protected pageContentValue(string $name, mixed/null $default=null) : mixed
    protected parseFileProperty(array/mixed $value, array $settings=array()) : array/mixed
    protected processContent(string $content) : string
    Gets and Sets the content based on content portion of the .md file
    protected processMarkdown(string $content, array $options=array()) : string
    Process the Markdown content. Uses Parsedown or Parsedown Extra depending on configuration.
    protected processSummary(int/null $size=null, bool $textOnly=false) : string
    protected processTwig(string $content) : string
    Process the Twig page content.
    protected routeInternal() : string/null
    protected saveUpdatedMedia() : void
    protected setMedia(\Grav\Framework\Flex\Pages\MediaCollectionInterface/\Grav\Framework\Flex\Pages\Media/\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : \Grav\Framework\Flex\Pages\$this
    Sets the associated media collection.
    protected setUpdatedMedia(array $files) : void

    This class extends \Grav\Framework\Flex\FlexObject

    This class implements \Grav\Framework\Flex\Interfaces\FlexObjectInterface, \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface, \Stringable, \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable, \Grav\Framework\Interfaces\RenderInterface, \ArrayAccess, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Common\Page\Interfaces\PageInterface, \Grav\Framework\Flex\Interfaces\FlexTranslateInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\Page\Interfaces\PageLegacyInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Common\Page\Interfaces\PageTranslateInterface, \Grav\Common\Page\Interfaces\PageRoutableInterface, \Grav\Common\Page\Interfaces\PageFormInterface, \Grav\Common\Page\Interfaces\PageContentInterface


    Class: \Grav\Framework\Flex\Pages\FlexPageCollection

    Class FlexPageCollection

    Visibility Function
    public adjacentSibling(string $path, int $direction=1) : \Grav\Framework\Flex\Pages\PageInterface/false The sibling item.
    Returns the adjacent sibling based on a direction.
    public currentPosition(string $path) : int/null The index of the current page, null if not found.
    Returns the item in the current position.
    public static getCachedMethods() : array
    public getNextOrder() : string
    public isFirst(string $path) : bool True if item is first.
    Check to see if this item is the first in the collection.
    public isLast(string $path) : bool True if item is last.
    Check to see if this item is the last in the collection.
    public nextSibling(string $path) : \Grav\Framework\Flex\Pages\PageInterface/false The next item.
    Gets the next sibling based on current position.
    public prevSibling(string $path) : \Grav\Framework\Flex\Pages\PageInterface/false The previous item.
    Gets the previous sibling based on current position.
    public withPublished(bool $bool=true) : \Grav\Framework\Flex\Pages\static
    public withRoutable(bool $bool=true) : \Grav\Framework\Flex\Pages\static
    public withVisible(bool $bool=true) : \Grav\Framework\Flex\Pages\static

    This class extends \Grav\Framework\Flex\FlexCollection

    This class implements \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \JsonSerializable, \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \Stringable, \Doctrine\Common\Collections\Selectable, \Doctrine\Common\Collections\Collection


    Class: \Grav\Framework\Flex\Pages\FlexPageIndex

    Class FlexPageObject

    Visibility Function
    public static normalizeRoute(string $route) : string

    This class extends \Grav\Framework\Flex\FlexIndex

    This class implements \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Flex\Interfaces\FlexIndexInterface, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Doctrine\Common\Collections\Selectable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Doctrine\Common\Collections\Collection, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Stringable, \Grav\Framework\Collection\CollectionInterface


    Class: \Grav\Framework\Flex\Storage\SimpleStorage

    Class SimpleStorage

    Visibility Function
    public __construct(array $options) : void
    public clearCache() : void
    public copyRow(string $src, string $dst) : bool
    public createRows(array $rows) : mixed
    public deleteRows(array $rows) : void
    public getExistingKeys() : mixed
    public getMediaPath(string $key=null) : mixed
    public getMetaData(string[] $keys, bool $reload=false) : array
    public getStoragePath(string $key=null) : mixed
    public hasKey(string $key) : bool
    public parseKey(string $key, bool $variations=true) : array
    public readRows(array $rows, array $fetched=null) : void
    public renameRow(string $src, string $dst) : void
    public replaceRows(array $rows) : void
    public updateRows(array $rows) : void
    protected buildIndex() : array
    Returns list of all stored keys in [key => timestamp] pairs.
    protected getKeyFromPath(string $path) : string
    Get key from the filesystem path.
    protected getNewKey() : string
    protected getObjectMeta(string $key, bool $reload=false) : array
    protected loadRow(string $key) : array
    protected prepareRow(array $row) : void
    Prepares the row for saving and returns the storage key for the record.
    protected save() : void
    protected saveRow(string $key, array $row) : array

    This class extends \Grav\Framework\Flex\Storage\AbstractFilesystemStorage

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Framework\Flex\Storage\FolderStorage

    Class FolderStorage

    Visibility Function
    public __construct(array $options) : void
    public clearCache() : void
    public copyRow(string $src, string $dst) : bool
    public createRows(array $rows) : mixed
    public deleteRows(array $rows) : void
    public getExistingKeys() : mixed
    public getMediaPath(string $key=null) : mixed
    public getMetaData(string[] $keys, bool $reload=false) : array
    public getPathFromKey(string $key) : string
    Get filesystem path from the key.
    public getStoragePath(string $key=null) : mixed
    public hasKey(string $key) : bool
    public isIndexed() : bool
    public parseKey(string $key, bool $variations=true) : array
    public readRows(array $rows, array $fetched=null) : void
    public renameRow(string $src, string $dst) : void
    public replaceRows(array $rows) : void
    public updateRows(array $rows) : void
    protected buildIndex() : array
    Returns list of all stored keys in [key => timestamp] pairs.
    protected buildIndexFromFilesystem(string $path) : array
    protected buildPrefixedIndexFromFilesystem(string $path) : array
    protected canDeleteFolder(string $key) : bool
    protected copyFolder(string $src, string $dst) : bool
    protected deleteFile(\RocketTheme\Toolbox\File\File $file) : array/string
    protected deleteFolder(string $path, bool $include_target=false) : bool
    protected getKeyFromPath(string $path) : string
    Get key from the filesystem path.
    protected getNewKey() : string
    protected getObjectMeta(string $key, bool $reload=false) : array
    protected initOptions(array $options) : void
    protected loadRow(string $key) : array
    protected moveFolder(string $src, string $dst) : bool
    protected prepareRow(array $row) : void
    Prepares the row for saving and returns the storage key for the record.
    protected saveRow(string $key, array $row) : array

    This class extends \Grav\Framework\Flex\Storage\AbstractFilesystemStorage

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Framework\Flex\Storage\FileStorage

    Class FileStorage

    Visibility Function
    public __construct(array $options) : void
    public copyRow(string $src, string $dst) : bool
    public getMediaPath(string $key=null) : mixed
    public renameRow(string $src, string $dst) : void
    protected buildIndex() : void
    protected canDeleteFolder(string $key) : bool
    protected copyFolder(string $src, string $dst) : bool
    protected getKeyFromPath(string $path) : mixed
    protected moveFolder(string $src, string $dst) : bool

    This class extends \Grav\Framework\Flex\Storage\FolderStorage

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Framework\Flex\Storage\AbstractFilesystemStorage (abstract)

    Class AbstractFilesystemStorage

    Visibility Function
    public assertValidKey(string $key) : void
    Validates a key and throws an exception if invalid.
    public buildStorageKey(array $keys, bool $includeParams=true) : string
    public buildStorageKeyParams(array $keys) : string
    public extractKeysFromRow(array $row) : array
    public extractKeysFromStorageKey(string $key) : array
    public getKeyField() : mixed
    public hasKeys(array $keys) : bool
    public isIndexed() : bool
    public normalizeKey(string $key) : string
    protected detectDataFormatter(string $filename) : string/null
    protected generateKey() : string
    Generates a random, unique key for the row.
    protected getFile(string $filename) : \Grav\Framework\Flex\Storage\CompiledJsonFile/\Grav\Framework\Flex\Storage\CompiledYamlFile/\Grav\Framework\Flex\Storage\CompiledMarkdownFile
    protected initDataFormatter(string/array $formatter) : void
    protected resolvePath(string $path) : string
    protected validateKey(string $key) : bool
    Checks if a key is valid.

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Framework\Form\FormFlash

    Class FormFlash

    Visibility Function
    public __construct(array $config) : void
    public addFile(string $filename, string $field, array/null/array $crop=null) : bool
    Add existing file to the form flash.
    public addUploadedFile(\Psr\Http\Message\UploadedFileInterface $upload, string/null/string $field=null, array/null/array $crop=null) : string Return name of the file
    Add uploaded file to the form flash.
    public clearFiles() : void
    Clear form flash from all uploaded files.
    public delete() : \Grav\Framework\Form\Interfaces\$this
    Delete this form flash.
    public exists() : bool
    Check if this form flash exists.
    public getCreatedTimestamp() : int
    Get creation timestamp for this form flash.
    public getData() : array/null
    Get raw form data.
    public getFilesByField(string $field) : array
    Get all files associated to a form field.
    public getFilesByFields(bool $includeOriginal=false) : array
    Get all files grouped by the associated form fields.
    public getFormName() : string
    Get form name associated to this form instance.
    public getId() : string
    Get unique form flash id if set.
    public getSessionId() : string
    Get session Id associated to this form instance.
    public getTmpDir() : string
    public getUniqieId() : string
    DEPRECATED - 1.6.11 Use '->getUniqueId()' method instead.
    public getUniqueId() : string
    Get unique identifier associated to this form instance.
    public getUpdatedTimestamp() : int
    Get last updated timestamp for this form flash.
    public getUrl() : string
    Get URL associated to this form instance.
    public getUserEmail() : string
    Get email from the user who was associated to this form instance.
    public getUsername() : string
    Get username from the user who was associated to this form instance.
    public jsonSerialize() : array
    public removeFile(string $name, string/null/string $field=null) : bool
    Remove any file from form flash.
    public save() : \Grav\Framework\Form\Interfaces\$this
    Save this form flash.
    public setData(array/null/array $data) : void
    Set raw form data.
    public setUrl(string $url) : \Grav\Framework\Form\$this
    public setUser(\Grav\Framework\Form\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : \Grav\Framework\Form\$this
    public setUserEmail(string/null/string $email=null) : \Grav\Framework\Form\$this
    public setUserName(string/null/string $username=null) : \Grav\Framework\Form\$this
    protected addFileInternal(string/null/string $field, string $name, array $data, array/null/array $crop=null) : void
    protected getTmpIndex() : \Grav\Framework\Form\?YamlFile
    protected init(array/null/array $data, array $config) : void
    protected loadStoredForm() : array/null
    Load raw flex flash data from the filesystem.
    protected removeTmpDir() : void
    protected removeTmpFile(string $name) : void

    This class implements \Grav\Framework\Form\Interfaces\FormFlashInterface, \JsonSerializable


    Class: \Grav\Framework\Form\FormFlashFile

    Class FormFlashFile

    Visibility Function
    public __construct(string $field, array $upload, \Grav\Framework\Form\FormFlash $flash) : void
    FormFlashFile constructor.
    public __debugInfo() : array
    public checkXss() : void
    public getClientFilename() : string/null
    public getClientMediaType() : string/null
    public getDestination() : string
    public getError() : int
    public getField() : string
    public getId() : mixed
    public getMetaData() : array
    public getSize() : int/null
    public getStream() : \Psr\Http\Message\StreamInterface
    public getTmpFile() : string/null
    public isMoved() : bool
    public jsonSerialize() : array
    public moveTo(string $targetPath) : void

    This class implements \Psr\Http\Message\UploadedFileInterface, \JsonSerializable


    Interface: \Grav\Framework\Form\Interfaces\FormFactoryInterface

    Interface FormFactoryInterface

    Visibility Function
    public createPageForm(\Grav\Common\Page\Page $page, string $name, array $form) : \Grav\Framework\Form\Interfaces\FormInterface/null
    DEPRECATED - 1.6 Use FormFactory::createFormByPage() instead.


    Interface: \Grav\Framework\Form\Interfaces\FormInterface

    Interface FormInterface

    Visibility Function
    public getAction() : string
    Get form action (URL). If action is empty, it points to the current page.
    public getBlueprint() : \Grav\Common\Data\Blueprint
    Get blueprint used in the form.
    public getData() : \Grav\Framework\Form\Interfaces\Data/object
    Get current data passed to the form.
    public getError() : string
    public getErrors() : array
    public getFields() : array
    Get form fields as an array. Note: Used in form fields.
    public getFiles() : array/\Grav\Framework\Form\Interfaces\UploadedFileInterface[]
    Get files which were passed to the form.
    public getFlash() : \Grav\Framework\Form\Interfaces\FormFlashInterface
    Get form flash object.
    public getFormName() : string
    Get form name.
    public getId() : string
    Get HTML id="..." attribute.
    public getName() : string
    public getNonce() : string
    Get the nonce value for a form
    public getNonceAction() : string
    Get nonce action.
    public getNonceName() : string
    Get nonce name.
    public getTask() : string
    Get task for the form if set in blueprints.
    public getUniqueId() : string
    Get unique id for the current form instance. By default regenerated on every page reload. This id is used to load the saved form state, if available.
    public getValue(string $name) : mixed
    Get a value from the form. Note: Used in form fields.
    public handleRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Grav\Framework\Form\Interfaces\$this
    public isSubmitted() : bool
    public isValid() : bool
    public reset() : void
    Reset form.
    public setId(string $id) : void
    Sets HTML id="" attribute.
    public setUniqueId(string $uniqueId) : void
    Sets unique form id.
    public submit(array $data, \Grav\Framework\Form\Interfaces\UploadedFileInterface[]/null/array $files=null) : \Grav\Framework\Form\Interfaces\$this

    This class implements \Grav\Framework\Interfaces\RenderInterface, \Serializable


    Interface: \Grav\Framework\Form\Interfaces\FormFlashInterface

    Interface FormFlashInterface

    Visibility Function
    public __construct(array $config) : void
    public addFile(string $filename, string $field, array/null/array $crop=null) : bool
    Add existing file to the form flash.
    public addUploadedFile(\Psr\Http\Message\UploadedFileInterface $upload, string/null/string $field=null, array/null/array $crop=null) : string Return name of the file
    Add uploaded file to the form flash.
    public clearFiles() : void
    Clear form flash from all uploaded files.
    public delete() : \Grav\Framework\Form\Interfaces\$this
    Delete this form flash.
    public exists() : bool
    Check if this form flash exists.
    public getCreatedTimestamp() : int
    Get creation timestamp for this form flash.
    public getData() : array/null
    Get raw form data.
    public getFilesByField(string $field) : array
    Get all files associated to a form field.
    public getFilesByFields(bool $includeOriginal=false) : array
    Get all files grouped by the associated form fields.
    public getFormName() : string
    Get form name associated to this form instance.
    public getId() : string
    Get unique form flash id if set.
    public getSessionId() : string
    Get session Id associated to this form instance.
    public getUniqueId() : string
    Get unique identifier associated to this form instance.
    public getUpdatedTimestamp() : int
    Get last updated timestamp for this form flash.
    public getUrl() : string
    Get URL associated to this form instance.
    public getUserEmail() : string
    Get email from the user who was associated to this form instance.
    public getUsername() : string
    Get username from the user who was associated to this form instance.
    public jsonSerialize() : array
    public removeFile(string $name, string/null/string $field=null) : bool
    Remove any file from form flash.
    public save() : \Grav\Framework\Form\Interfaces\$this
    Save this form flash.
    public setData(array/null/array $data) : void
    Set raw form data.

    This class implements \JsonSerializable


    Interface: \Grav\Framework\Interfaces\RenderInterface

    Defines common interface to render any object.

    Visibility Function
    public render(string/null/string $layout=null, array $context=array()) : \Grav\Framework\Interfaces\ContentBlockInterface/HtmlBlock Returns HtmlBlock containing the rendered output.
    Renders the object.
    Examples of RenderInterface::render()
    TXT
    $block = $object->render('custom', ['variable' => 'value']);{% render object layout 'custom' with { variable: 'value' } %}
    


    Class: \Grav\Framework\Media\MediaIdentifier

    Interface IdentifierInterface

    Visibility Function
    public __construct(string $id) : void
    public static createFromObject(\Grav\Framework\Contracts\Media\MediaObjectInterface $object) : \Grav\Framework\Media\MediaIdentifier
    public getObject() : \Grav\Framework\Media\T
    public setObject(\Grav\Framework\Media\T/\Grav\Framework\Contracts\Media\MediaObjectInterface $object) : void
    protected findFlash(array $parts) : mixed
    protected getFlash(string $folder, string $uniqueId) : mixed
    protected getFlexObject(string $type, string $key) : mixed

    This class extends \Grav\Framework\Object\Identifiers\Identifier

    This class implements \JsonSerializable, \Grav\Framework\Contracts\Object\IdentifierInterface


    Class: \Grav\Framework\Media\MediaObject

    Class MediaObject

    Visibility Function
    public __construct(string/null/string $field, string $filename, \Grav\Framework\Media\GravMediaObjectInterface/null/\Grav\Framework\Media\Interfaces\MediaObjectInterface $media, \Grav\Framework\Flex\Interfaces\FlexObjectInterface $object) : void
    MediaObject constructor.
    public __debugInfo() : string[]
    public createResponse(array $actions) : \Grav\Framework\Psr7\Response
    Create media response.
    public exists() : bool
    public get(string $field) : mixed/null
    public getId() : string
    public getMeta() : array
    public getType() : string
    public getUrl() : string
    public jsonSerialize() : array
    protected create404Response(array $actions) : \Grav\Framework\Psr7\Response
    protected processMediaActions(\Grav\Framework\Media\GravMediaObjectInterface/\Grav\Framework\Media\Interfaces\MediaObjectInterface $medium, array $actions) : \Grav\Framework\Media\GravMediaObjectInterface
    Process media actions

    This class implements \Grav\Framework\Contracts\Media\MediaObjectInterface, \JsonSerializable, \Grav\Framework\Contracts\Object\IdentifierInterface


    Class: \Grav\Framework\Media\UploadedMediaObject

    Class UploadedMediaObject

    Visibility Function
    public __construct(string $id, string/null/string $field, string $filename, \Grav\Framework\Media\UploadedFileInterface/null/\Psr\Http\Message\UploadedFileInterface $uploadedFile=null) : void
    public __debugInfo() : string[]
    public static createFromFlash(\Grav\Framework\Flex\FlexFormFlash $flash, string/null/string $field, string $filename, \Grav\Framework\Media\UploadedFileInterface/null/\Psr\Http\Message\UploadedFileInterface $uploadedFile=null) : \Grav\Framework\Media\static
    public createResponse(array $actions) : \Grav\Framework\Psr7\Response
    public exists() : bool
    public get(string $field) : mixed/null
    public getId() : string
    public getMeta() : array
    public getType() : string
    public getUploadedFile() : \Grav\Framework\Media\UploadedFileInterface/null
    public getUrl() : string
    public jsonSerialize() : array

    This class implements \Grav\Framework\Contracts\Media\MediaObjectInterface, \JsonSerializable, \Grav\Framework\Contracts\Object\IdentifierInterface


    Interface: \Grav\Framework\Media\Interfaces\MediaObjectInterface

    Class implements media object interface.

    Visibility Function
    public get(string $name, mixed $default=null, string/null $separator=null) : mixed Value.
    Get value by using dot notation for nested arrays/objects.
    public getMeta() : array
    Returns an array containing the file metadata
    public url(bool $reset=true) : string
    Return URL to file.
    Examples of MediaObjectInterface::get()
    TXT
    $value = $this->get('this.is.my.nested.variable');
    


    Interface: \Grav\Framework\Media\Interfaces\MediaManipulationInterface

    DEPRECATED 1.7 Not used currently

    Visibility Function
    public deleteMediaFile(string $filename) : void
    public uploadMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile) : void

    This class implements \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Framework\Media\Interfaces\MediaInterface


    Interface: \Grav\Framework\Media\Interfaces\MediaInterface

    Class implements media interface.

    Visibility Function
    public getMedia() : MediaCollectionInterface Collection of associated media.
    Gets the associated media collection.
    public getMediaFolder() : string/null Media path or null if the object doesn't have media folder.
    Get filesystem path to the associated media.
    public getMediaOrder() : array Empty array means default ordering.
    Get display order for the associated media.


    Interface: \Grav\Framework\Media\Interfaces\MediaCollectionInterface

    Class implements media collection interface.

    Visibility Function

    This class implements \ArrayAccess, \Countable, \Iterator, \Traversable


    Class: \Grav\Framework\Mime\MimeTypes

    Class to handle mime-types.

    Visibility Function
    public static createFromMimes(array $mimes) : mixed
    Create a new mime types instance with the given mappings.
    public getExtension(string $mime) : string/null
    public getExtensions(string $mime) : array
    public getMimeType(string $extension) : string/null
    public getMimeTypes(string $extension) : array
    protected __construct(array $extensions, array $mimes) : void
    protected cleanInput(string $input) : string


    Class: \Grav\Framework\Object\PropertyObject

    Property Objects keep their data in protected object properties.

    Visibility Function
    public __construct(array $elements=array(), string/null $key=null) : void
    public __get(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public __isset(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Checks whether or not an offset exists.
    public __serialize() : array
    public __set(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public __toString() : string
    Returns a string representation of this object.
    public __unserialize(array $data) : void
    public __unset(mixed $offset) : void
    Magic method to unset the attribute
    public defNestedProperty(string $property, mixed $default, string/null $separator=null) : \Grav\Framework\Object\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public getKey() : string
    public getNestedProperty(string $property, mixed/null $default=null, string/null $separator=null) : mixed Property value.
    public getProperty(string $property, mixed $default=null) : mixed Property value.
    public getType(bool $prefix=true) : string
    public hasKey() : bool
    public hasNestedProperty(string $property, string/null $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Whether or not an offset exists.
    public offsetGet(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public offsetSet(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public offsetUnset(mixed $offset) : void
    Unsets an offset.
    public serialize() : string
    public setNestedProperty(string $property, mixed $value, string/null $separator=null) : \Grav\Framework\Object\$this
    public setProperty(string $property, mixed $value) : \Grav\Framework\Object\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string/null $separator=null) : \Grav\Framework\Object\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\$this
    protected doGetProperty(string $property, mixed $default=null, bool/callable/bool $doCreate=false) : mixed Property value.
    protected doHasProperty(string $property) : bool True if property has been defined (can be null).
    protected doSerialize() : array
    protected doSetProperty(string $property, mixed $value) : void
    protected doUnserialize(array $serialized) : void
    protected doUnsetProperty(string $property) : void
    protected getElement(string $property, mixed/null $default=null) : mixed/null
    protected getElements() : array
    protected getTypePrefix() : string
    protected getUnserializeAllowedClasses() : array/bool
    protected initObjectProperties() : void
    protected isPropertyLoaded(string $property) : bool True if property has been loaded.
    protected offsetLoad(string $offset, mixed $value) : mixed
    protected offsetPrepare(string $offset, mixed $value) : mixed
    protected offsetSerialize(string $offset, mixed $value) : mixed
    protected setElements(array $elements) : void
    protected setKey(string $key) : \Grav\Framework\Object\$this

    This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


    Class: \Grav\Framework\Object\ObjectCollection

    Class contains a collection of objects.

    Visibility Function
    public __construct(array $elements=array(), string/null $key=null) : void
    public __serialize() : array
    public __toString() : string
    Returns a string representation of this object.
    public __unserialize(array $data) : void
    public call(string $method, array $arguments=array()) : mixed[] Return values.
    public collectionGroup(string $property) : \Grav\Framework\Object\static[]
    Group items in the collection by a field and return them as associated array of collections.
    public copy() : \Grav\Framework\Object\static<TKey,T>
    Create a copy from this collection by cloning all objects in the collection.
    public defNestedProperty(string $property, string $default, string/null $separator=null) : \Grav\Framework\Object\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public doDefProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public doGetProperty(string $property, mixed $default=null, bool $doCreate=false) : mixed[] Key/Value pairs of the properties.
    public doHasProperty(string $property) : bool[] Key/Value pairs of the properties.
    public doSetProperty(string $property, mixed $value) : \Grav\Framework\Object\$this
    public doUnsetProperty(string $property) : \Grav\Framework\Object\$this
    public getKey() : string
    public getNestedProperty(string $property, mixed $default=null, string/null $separator=null) : array Key/Value pairs of the properties.
    public getObjectKeys() : string[]
    public getProperty(string $property, mixed $default=null) : mixed[] Property values.
    public getType(bool $prefix=true) : string
    public group(string $property, string/null $separator=null) : array
    Group items in the collection by a field.
    public hasKey() : bool
    public hasNestedProperty(string $property, string/null $separator=null) : array Key/Value pairs of the properties.
    public hasProperty(string $property) : bool[] True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public limit(int $start, int/null $limit=null) : \Grav\Framework\Object\static
    public matching(\Doctrine\Common\Collections\Criteria $criteria) : \Grav\Framework\Object\static
    public orderBy(array $ordering) : \Grav\Framework\Object\static
    public serialize() : string
    public setKey(string $key) : \Grav\Framework\Object\$this
    public setNestedProperty(string $property, mixed $value, string/null $separator=null) : \Grav\Framework\Object\$this
    public setProperty(string $property, mixed $value) : \Grav\Framework\Object\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string/null $separator=null) : \Grav\Framework\Object\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\$this
    protected doSerialize() : array
    protected doUnserialize(array $data) : void
    protected getElements() : array
    protected getTypePrefix() : string
    protected getUnserializeAllowedClasses() : array/bool
    protected setElements(array $elements) : array

    This class extends \Grav\Framework\Collection\ArrayCollection

    This class implements \Doctrine\Common\Collections\Collection, \Doctrine\Common\Collections\Selectable, \Stringable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable, \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface, \Serializable, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface


    Class: \Grav\Framework\Object\ArrayObject

    Array Objects keep the data in private array property.

    Visibility Function
    public __construct(array $elements=array(), string/null $key=null) : void
    public __get(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public __isset(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Checks whether or not an offset exists.
    public __serialize() : array
    public __set(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public __toString() : string
    Returns a string representation of this object.
    public __unserialize(array $data) : void
    public __unset(mixed $offset) : void
    Magic method to unset the attribute
    public defNestedProperty(string $property, mixed $default, string/null $separator=null) : \Grav\Framework\Object\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public getKey() : string
    public getNestedProperty(string $property, mixed/null $default=null, string/null $separator=null) : mixed Property value.
    public getProperty(string $property, mixed $default=null) : mixed Property value.
    public getType(bool $prefix=true) : string
    public hasKey() : bool
    public hasNestedProperty(string $property, string/null $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Whether or not an offset exists.
    public offsetGet(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public offsetSet(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public offsetUnset(mixed $offset) : void
    Unsets an offset.
    public serialize() : string
    public setNestedProperty(string $property, mixed $value, string/null $separator=null) : \Grav\Framework\Object\$this
    public setProperty(string $property, mixed $value) : \Grav\Framework\Object\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string/null $separator=null) : \Grav\Framework\Object\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\$this
    protected doGetProperty(string $property, mixed $default=null, bool $doCreate=false) : mixed Property value.
    protected doHasProperty(string $property) : bool True if property has been defined (can be null).
    protected doSerialize() : array
    protected doSetProperty(string $property, mixed $value) : void
    protected doUnserialize(array $serialized) : void
    protected doUnsetProperty(string $property) : void
    protected getElement(string $property, mixed/null $default=null) : mixed/null
    protected getElements() : array
    protected getTypePrefix() : string
    protected getUnserializeAllowedClasses() : array/bool
    protected setElements(array $elements) : void
    protected setKey(string $key) : \Grav\Framework\Object\$this

    This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


    Class: \Grav\Framework\Object\LazyObject

    Lazy Objects keep their data in both protected object properties and falls back to a stored array if property does not exist or is not initialized.

    Visibility Function
    public __construct(array $elements=array(), string/null $key=null) : void
    public __get(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public __isset(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Checks whether or not an offset exists.
    public __serialize() : array
    public __set(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public __toString() : string
    Returns a string representation of this object.
    public __unserialize(array $data) : void
    public __unset(mixed $offset) : void
    Magic method to unset the attribute
    public defNestedProperty(string $property, mixed $default, string/null $separator=null) : \Grav\Framework\Object\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public getKey() : string
    public getNestedProperty(string $property, mixed/null $default=null, string/null $separator=null) : mixed Property value.
    public getProperty(string $property, mixed $default=null) : mixed Property value.
    public getType(bool $prefix=true) : string
    public hasKey() : bool
    public hasNestedProperty(string $property, string/null $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Whether or not an offset exists.
    public offsetGet(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public offsetSet(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public offsetUnset(mixed $offset) : void
    Unsets an offset.
    public serialize() : string
    public setNestedProperty(string $property, mixed $value, string/null $separator=null) : \Grav\Framework\Object\$this
    public setProperty(string $property, mixed $value) : \Grav\Framework\Object\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string/null $separator=null) : \Grav\Framework\Object\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\$this
    protected doGetProperty(string $property, mixed $default=null, bool $doCreate=false) : mixed Property value.
    protected doHasProperty(string $property) : bool True if property has been defined (can be null).
    protected doSerialize() : array
    protected doSetProperty(string $property, mixed $value) : void
    protected doUnserialize(array $serialized) : void
    protected doUnsetProperty(string $property) : void
    protected getArrayElement(string $property, mixed/null $default=null) : mixed/null
    protected getArrayElements() : array
    protected getArrayProperty(string $property, mixed $default=null, bool $doCreate=false) : mixed Property value.
    protected getElement(string $property, mixed/null $default=null) : mixed/null
    protected getElements() : array
    protected getObjectElement(string $property, mixed/null $default=null) : mixed/null
    protected getObjectElements() : array
    protected getObjectProperty(string $property, mixed $default=null, bool/callable/bool $doCreate=false) : mixed Property value.
    protected getTypePrefix() : string
    protected getUnserializeAllowedClasses() : array/bool
    protected hasArrayProperty(string $property) : bool True if property has been defined (can be null).
    protected hasObjectProperty(string $property) : bool True if property has been defined (can be null).
    protected initObjectProperties() : void
    protected isPropertyLoaded(string $property) : bool True if property has been loaded.
    protected offsetLoad(string $offset, mixed $value) : mixed
    protected offsetPrepare(string $offset, mixed $value) : mixed
    protected offsetSerialize(string $offset, mixed $value) : mixed
    protected setArrayProperty(string $property, mixed $value) : void
    protected setElements(array $elements) : void
    protected setKey(string $key) : \Grav\Framework\Object\$this
    protected setObjectProperty(string $property, mixed $value) : void
    protected unsetArrayProperty(string $property) : void
    protected unsetObjectProperty(string $property) : void

    This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \ArrayAccess, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Stringable


    Class: \Grav\Framework\Object\Collection\ObjectExpressionVisitor

    Class ObjectExpressionVisitor

    Visibility Function
    public static filterLength(string $str) : int
    public static filterLower(string $str) : string
    public static filterLtrim(string $str) : string
    public static filterRtrim(string $str) : string
    public static filterTrim(string $str) : string
    public static filterUpper(string $str) : string
    public static getObjectFieldValue(object $object, string $field) : mixed
    Accesses the field of a given object.
    public static sortByField(string $name, int $orientation=1, \Grav\Framework\Object\Collection\Closure/null/\Closure $next=null) : \Grav\Framework\Object\Collection\Closure
    Helper for sorting arrays of objects based on multiple fields + orientations. Comparison between two strings is natural and case insensitive.
    public walkComparison(\Doctrine\Common\Collections\Expr\Comparison $comparison) : void

    This class extends \Doctrine\Common\Collections\Expr\ClosureExpressionVisitor


    Class: \Grav\Framework\Object\Identifiers\Identifier

    Interface IdentifierInterface

    Visibility Function
    public __construct(string $id, string $type) : void
    IdentifierInterface constructor.
    public __debugInfo() : array
    public getId() : string
    public getType() : string
    public jsonSerialize() : array

    This class implements \Grav\Framework\Contracts\Object\IdentifierInterface, \JsonSerializable


    Interface: \Grav\Framework\Object\Interfaces\NestedObjectInterface

    Common Interface for both Objects and Collections

    Visibility Function
    public defNestedProperty(string $property, mixed $default, string/null $separator=null) : \Grav\Framework\Object\Interfaces\$this
    public getNestedProperty(string $property, mixed/null $default=null, string/null $separator=null) : mixed/mixed[] Property value.
    public hasNestedProperty(string $property, string/null $separator=null) : bool/bool[] True if property has been defined (can be null).
    public setNestedProperty(string $property, mixed $value, string/null $separator=null) : \Grav\Framework\Object\Interfaces\$this
    public unsetNestedProperty(string $property, string/null $separator=null) : \Grav\Framework\Object\Interfaces\$this

    This class implements \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable


    Interface: \Grav\Framework\Object\Interfaces\NestedObjectCollectionInterface

    Common Interface for both Objects and Collections

    Visibility Function
    public defNestedProperty(string $property, mixed $default, string/null $separator=null) : \Grav\Framework\Object\Interfaces\$this
    public getNestedProperty(string $property, mixed/null $default=null, string/null $separator=null) : mixed[] List of [key => value] pairs.
    public hasNestedProperty(string $property, string/null $separator=null) : bool[] List of [key => bool] pairs.
    public setNestedProperty(string $property, mixed $value, string/null $separator=null) : \Grav\Framework\Object\Interfaces\$this
    public unsetNestedProperty(string $property, string/null $separator=null) : \Grav\Framework\Object\Interfaces\$this

    This class implements \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Doctrine\Common\Collections\Collection, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\ReadableCollection, \Serializable, \Doctrine\Common\Collections\Selectable, \Grav\Framework\Collection\CollectionInterface


    Interface: \Grav\Framework\Object\Interfaces\ObjectCollectionInterface

    ObjectCollection Interface

    Visibility Function
    public call(string $name, array $arguments=array()) : array Return values.
    public collectionGroup(string $property) : \Grav\Framework\Object\Interfaces\static[]
    Group items in the collection by a field and return them as associated array of collections.
    public copy() : \Grav\Framework\Object\Interfaces\static
    Create a copy from this collection by cloning all objects in the collection.
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\Interfaces\$this
    public getKey() : string
    public getObjectKeys() : array
    public getProperty(string $property, mixed/null $default=null) : mixed[] List of [key => value] pairs.
    public getType() : string
    public group(string $property) : array
    Group items in the collection by a field and return them as associated array.
    public hasProperty(string $property) : bool[] List of [key => bool] pairs.
    public limit(int $start, int/null $limit=null) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public orderBy(array $ordering) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public setKey(string $key) : \Grav\Framework\Object\Interfaces\$this
    public setProperty(string $property, mixed $value) : \Grav\Framework\Object\Interfaces\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\Interfaces\$this

    This class implements \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\Selectable, \Serializable, \Doctrine\Common\Collections\ReadableCollection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \JsonSerializable, \Doctrine\Common\Collections\Collection


    Interface: \Grav\Framework\Object\Interfaces\ObjectInterface

    Object Interface

    Visibility Function
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\Interfaces\$this
    public getKey() : string
    public getProperty(string $property, mixed/null $default=null) : mixed Property value.
    public getType() : string
    public hasProperty(string $property) : bool True if property has been defined (property can be null).
    public setProperty(string $property, mixed $value) : \Grav\Framework\Object\Interfaces\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\Interfaces\$this

    This class implements \Serializable, \JsonSerializable


    Class: \Grav\Framework\Pagination\PaginationPage

    Class PaginationPage

    Visibility Function
    public __construct(array $options=array()) : void
    PaginationPage constructor.

    This class extends \Grav\Framework\Pagination\AbstractPaginationPage

    This class implements \Grav\Framework\Pagination\Interfaces\PaginationPageInterface


    Class: \Grav\Framework\Pagination\Pagination

    Class Pagination

    Visibility Function
    public __construct(\Grav\Framework\Route\Route $route, int $total, int/null/int $pos=null, int/null/int $limit=null, array/null/array $options=null) : void
    Pagination constructor.

    This class extends \Grav\Framework\Pagination\AbstractPagination

    This class implements \Countable, \IteratorAggregate, \Traversable, \Grav\Framework\Pagination\Interfaces\PaginationInterface


    Class: \Grav\Framework\Pagination\AbstractPaginationPage (abstract)

    Class AbstractPaginationPage

    Visibility Function
    public getLabel() : string
    public getNumber() : int/null
    public getOptions() : array
    public getUrl() : string/null
    public isActive() : bool
    public isEnabled() : bool
    protected setOptions(array $options) : void

    This class implements \Grav\Framework\Pagination\Interfaces\PaginationPageInterface


    Class: \Grav\Framework\Pagination\AbstractPagination

    Class AbstractPagination

    Visibility Function
    public count() : int
    public getFirstPage(string/null/string $label=null, int $count) : \Grav\Framework\Pagination\PaginationPage/null
    public getIterator() : \Grav\Framework\Pagination\ArrayIterator
    public getLastPage(string/null/string $label=null, int $count) : \Grav\Framework\Pagination\PaginationPage/null
    public getLimit() : int
    public getNextNumber(int $count=1) : int/null
    public getNextPage(string/null/string $label=null, int $count=1) : \Grav\Framework\Pagination\PaginationPage/null
    public getOptions() : array
    public getPage(int $page, string/null/string $label=null) : \Grav\Framework\Pagination\PaginationPage/null
    public getPageNumber() : int
    public getPages() : array
    public getPrevNumber(int $count=1) : int/null
    public getPrevPage(string/null/string $label=null, int $count=1) : \Grav\Framework\Pagination\PaginationPage/null
    public getRoute() : \Grav\Framework\Pagination\Route/null
    public getStart() : int
    public getTotal() : int
    public getTotalPages() : int
    public isEnabled() : bool
    protected calculateLimits() : void
    protected calculateRange() : void
    protected initialize(\Grav\Framework\Route\Route $route, int $total, int/null/int $pos=null, int/null/int $limit=null, array/null/array $options=null) : void
    protected loadItems() : void
    protected setLimit(int/null/int $limit=null) : \Grav\Framework\Pagination\$this
    protected setOptions(array/null/array $options=null) : \Grav\Framework\Pagination\$this
    protected setPage(int/null/int $page=null) : \Grav\Framework\Pagination\$this
    protected setRoute(\Grav\Framework\Route\Route $route) : \Grav\Framework\Pagination\$this
    protected setStart(int/null/int $start=null) : \Grav\Framework\Pagination\$this
    protected setTotal(int $total) : \Grav\Framework\Pagination\$this

    This class implements \Grav\Framework\Pagination\Interfaces\PaginationInterface, \Traversable, \IteratorAggregate, \Countable


    Interface: \Grav\Framework\Pagination\Interfaces\PaginationInterface

    Interface PaginationInterface

    Visibility Function
    public count() : int
    public getFirstPage(string/null/string $label=null, int $count) : \Grav\Framework\Pagination\Interfaces\PaginationPage/null
    public getLastPage(string/null/string $label=null, int $count) : \Grav\Framework\Pagination\Interfaces\PaginationPage/null
    public getLimit() : int
    public getNextNumber(int $count=1) : int/null
    public getNextPage(string/null/string $label=null, int $count=1) : \Grav\Framework\Pagination\Interfaces\PaginationPage/null
    public getOptions() : array
    public getPage(int $page, string/null/string $label=null) : \Grav\Framework\Pagination\Interfaces\PaginationPage/null
    public getPageNumber() : int
    public getPrevNumber(int $count=1) : int/null
    public getPrevPage(string/null/string $label=null, int $count=1) : \Grav\Framework\Pagination\Interfaces\PaginationPage/null
    public getStart() : int
    public getTotal() : int
    public getTotalPages() : int

    This class implements \Countable, \IteratorAggregate, \Traversable


    Interface: \Grav\Framework\Pagination\Interfaces\PaginationPageInterface

    Interface PaginationPageInterface

    Visibility Function
    public getLabel() : string
    public getNumber() : int/null
    public getOptions() : array
    public getUrl() : string/null
    public isActive() : bool
    public isEnabled() : bool


    Class: \Grav\Framework\Psr7\AbstractUri (abstract)

    DEPRECATED 1.6 Using message PSR-7 decorators instead.

    Visibility Function
    public abstract __construct() : void
    Please define constructor which calls $this->init().
    public __toString() : string
    public abstract getAuthority() : string The URI authority, in "[user-info@]host[:port]" format.
    Retrieve the authority component of the URI. If no authority information is present, this method MUST return an empty string. The authority syntax of the URI is:
    public abstract getFragment() : string The URI fragment.
    Retrieve the fragment component of the URI. If no fragment is present, this method MUST return an empty string. The leading "#" character is not part of the fragment and MUST NOT be added. The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.5.
    public abstract getHost() : string The URI host.
    Retrieve the host component of the URI. If no host is present, this method MUST return an empty string. The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.2.2.
    public abstract getPath() : string The URI path.
    Retrieve the path component of the URI. The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes. Normally, the empty path "" and absolute path "/" are considered equal as defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically do this normalization because in contexts with a trimmed base path, e.g. the front controller, this difference becomes significant. It's the task of the user to handle both "" and "/". The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.3. As an example, if the value should include a slash ("/") not intended as delimiter between path segments, that value MUST be passed in encoded form (e.g., "%2F") to the instance.
    public abstract getPort() : null/int The URI port.
    Retrieve the port component of the URI. If a port is present, and it is non-standard for the current scheme, this method MUST return it as an integer. If the port is the standard port used with the current scheme, this method SHOULD return null. If no port is present, and no scheme is present, this method MUST return a null value. If no port is present, but a scheme is present, this method MAY return the standard port for that scheme, but SHOULD return null.
    public abstract getQuery() : string The URI query string.
    Retrieve the query string of the URI. If no query string is present, this method MUST return an empty string. The leading "?" character is not part of the query and MUST NOT be added. The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.4. As an example, if a value in a key/value pair of the query string should include an ampersand ("&") not intended as a delimiter between values, that value MUST be passed in encoded form (e.g., "%26") to the instance.
    public abstract getScheme() : string The URI scheme.
    Retrieve the scheme component of the URI. If no scheme is present, this method MUST return an empty string. The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.1. The trailing ":" character is not part of the scheme and MUST NOT be added.
    public abstract getUserInfo() : string The URI user information, in "username[:password]" format.
    Retrieve the user information component of the URI. If no user information is present, this method MUST return an empty string. If a user is present in the URI, this will return that value; additionally, if the password is also present, it will be appended to the user value, with a colon (":") separating the values. The trailing "@" character is not part of the user information and MUST NOT be added.
    public abstract withFragment(string $fragment) : static A new instance with the specified fragment.
    Return an instance with the specified URI fragment. This method MUST retain the state of the current instance, and return an instance that contains the specified URI fragment. Users can provide both encoded and decoded fragment characters. Implementations ensure the correct encoding as outlined in getFragment(). An empty fragment value is equivalent to removing the fragment.
    public abstract withHost(string $host) : static A new instance with the specified host.
    Return an instance with the specified host. This method MUST retain the state of the current instance, and return an instance that contains the specified host. An empty host value is equivalent to removing the host.
    public abstract withPath(string $path) : static A new instance with the specified path.
    Return an instance with the specified path. This method MUST retain the state of the current instance, and return an instance that contains the specified path. The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes. If the path is intended to be domain-relative rather than path relative then it must begin with a slash ("/"). Paths not starting with a slash ("/") are assumed to be relative to some base path known to the application or consumer. Users can provide both encoded and decoded path characters. Implementations ensure the correct encoding as outlined in getPath().
    public abstract withPort(null/int/int $port) : static A new instance with the specified port.
    Return an instance with the specified port. This method MUST retain the state of the current instance, and return an instance that contains the specified port. Implementations MUST raise an exception for ports outside the established TCP and UDP port ranges. A null value provided for the port is equivalent to removing the port information. removes the port information.
    public abstract withQuery(string $query) : static A new instance with the specified query string.
    Return an instance with the specified query string. This method MUST retain the state of the current instance, and return an instance that contains the specified query string. Users can provide both encoded and decoded query characters. Implementations ensure the correct encoding as outlined in getQuery(). An empty query string value is equivalent to removing the query string.
    public abstract withScheme(string $scheme) : static A new instance with the specified scheme.
    Return an instance with the specified scheme. This method MUST retain the state of the current instance, and return an instance that contains the specified scheme. Implementations MUST support the schemes "http" and "https" case insensitively, and MAY accommodate other schemes if required. An empty scheme is equivalent to removing the scheme.
    public abstract withUserInfo(string $user, null/string/string $password=null) : static A new instance with the specified user information.
    Return an instance with the specified user information. This method MUST retain the state of the current instance, and return an instance that contains the specified user information. Password is optional, but the user information MUST include the user; an empty string for the user is equivalent to removing user information.
    protected getBaseUrl() : string
    Return the fully qualified base URL ( like http://getgrav.org ). Note that this method never includes a trailing /
    protected getParts() : array
    protected getPassword() : string
    protected getUrl() : string
    protected getUser() : string
    protected initParts(array $parts) : void
    protected isDefaultPort() : bool

    This class implements \Psr\Http\Message\UriInterface, \Stringable


    Class: \Grav\Framework\Psr7\Response

    Class Response

    Visibility Function
    public __construct(int $status=200, array $headers=array(), string/null/\Grav\Framework\Psr7\resource/\Grav\Framework\Psr7\StreamInterface $body=null, string $version='1.1', string/null/string $reason=null) : void
    public __toString() : string
    Convert response to string. Note: This method is not part of the PSR-7 standard.
    public getBody() : mixed
    public getHeader(mixed $header) : mixed
    public getHeaderLine(mixed $header) : mixed
    public getHeaders() : mixed
    public getProtocolVersion() : mixed
    public getReasonPhrase() : mixed
    public getResponse() : \Psr\Http\Message\ResponseInterface
    Returns the decorated response. Since the underlying Response is immutable as well exposing it is not an issue, because it's state cannot be altered
    public getStatusCode() : mixed
    public hasHeader(mixed $header) : bool
    public isClientError() : bool
    Is this response a client error? Note: This method is not part of the PSR-7 standard.
    public isEmpty() : bool
    Is this response empty? Note: This method is not part of the PSR-7 standard.
    public isForbidden() : bool
    Is this response forbidden? Note: This method is not part of the PSR-7 standard.
    public isInformational() : bool
    Is this response informational? Note: This method is not part of the PSR-7 standard.
    public isNotFound() : bool
    Is this response not Found? Note: This method is not part of the PSR-7 standard.
    public isOk() : bool
    Is this response OK? Note: This method is not part of the PSR-7 standard.
    public isRedirect() : bool
    Is this response a redirect? Note: This method is not part of the PSR-7 standard.
    public isRedirection() : bool
    Is this response a redirection? Note: This method is not part of the PSR-7 standard.
    public isServerError() : bool
    Is this response a server error? Note: This method is not part of the PSR-7 standard.
    public isSuccessful() : bool
    Is this response successful? Note: This method is not part of the PSR-7 standard.
    public withAddedHeader(mixed $header, mixed $value) : void
    public withBody(\Psr\Http\Message\StreamInterface $body) : void
    public withHeader(mixed $header, mixed $value) : void
    public withJson(mixed $data, int/null/int $status=null, int $options, int $depth=512) : \Grav\Framework\Psr7\static
    Json. Note: This method is not part of the PSR-7 standard. This method prepares the response object to return an HTTP Json response to the client.
    public withProtocolVersion(mixed $version) : void
    public withRedirect(string $url, int/null $status=null) : \Grav\Framework\Psr7\static
    Redirect. Note: This method is not part of the PSR-7 standard. This method prepares the response object to return an HTTP Redirect response to the client.
    public withResponse(\Psr\Http\Message\ResponseInterface $response) : \Grav\Framework\Psr7\self
    Exchanges the underlying response with another.
    public withStatus(mixed $code, string $reasonPhrase='') : void
    public withoutHeader(mixed $header) : void

    This class implements \Psr\Http\Message\ResponseInterface, \Stringable, \Psr\Http\Message\MessageInterface


    Class: \Grav\Framework\Psr7\Stream

    Class Stream

    Visibility Function
    public __construct(string/string/\Grav\Framework\Psr7\resource/\Grav\Framework\Psr7\StreamInterface $body='') : void
    Stream constructor.
    public __destruct() : void
    public __toString() : void
    public close() : void
    public static create(string/string/\Grav\Framework\Psr7\resource/\Grav\Framework\Psr7\StreamInterface $body='') : \Grav\Framework\Psr7\static
    public detach() : void
    public eof() : void
    public getContents() : mixed
    public getMetadata(mixed $key=null) : mixed
    public getSize() : mixed
    public isReadable() : bool
    public isSeekable() : bool
    public isWritable() : bool
    public read(mixed $length) : void
    public rewind() : void
    public seek(mixed $offset, mixed $whence) : void
    public tell() : void
    public write(mixed $string) : void

    This class implements \Psr\Http\Message\StreamInterface, \Stringable


    Class: \Grav\Framework\Psr7\Request

    Visibility Function
    public __construct(string $method, string/\Grav\Framework\Psr7\UriInterface $uri, array $headers=array(), string/null/\Grav\Framework\Psr7\resource/\Grav\Framework\Psr7\StreamInterface $body=null, string $version='1.1') : void
    public getBody() : mixed
    public getHeader(mixed $header) : mixed
    public getHeaderLine(mixed $header) : mixed
    public getHeaders() : mixed
    public getMethod() : mixed
    public getProtocolVersion() : mixed
    public getRequest() : \Psr\Http\Message\RequestInterface
    Returns the decorated request. Since the underlying Request is immutable as well exposing it is not an issue, because it's state cannot be altered
    public getRequestTarget() : mixed
    public getUri() : mixed
    public hasHeader(mixed $header) : bool
    public withAddedHeader(mixed $header, mixed $value) : void
    public withBody(\Psr\Http\Message\StreamInterface $body) : void
    public withHeader(mixed $header, mixed $value) : void
    public withMethod(mixed $method) : void
    public withProtocolVersion(mixed $version) : void
    public withRequest(\Psr\Http\Message\RequestInterface $request) : \Grav\Framework\Psr7\self
    Exchanges the underlying request with another.
    public withRequestTarget(mixed $requestTarget) : void
    public withUri(\Psr\Http\Message\UriInterface $uri, bool $preserveHost=false) : void
    public withoutHeader(mixed $header) : void

    This class implements \Psr\Http\Message\RequestInterface, \Psr\Http\Message\MessageInterface


    Class: \Grav\Framework\Psr7\Uri

    Class Uri

    Visibility Function
    public __construct(string $uri='') : void
    public __toString() : string
    public getAuthority() : string
    public getFragment() : string
    public getHost() : string
    public getPath() : string
    public getPort() : int/null
    public getQuery() : string
    public getQueryParams() : array
    public getScheme() : string
    public getUserInfo() : string
    public isAbsolute() : bool
    Whether the URI is absolute, i.e. it has a scheme. An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, the base URI. Relative references can be divided into several forms: - network-path references, e.g. '//example.com/path' - absolute-path references, e.g. '/path' - relative-path references, e.g. 'subpath'
    public isAbsolutePathReference() : bool
    Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is termed an absolute-path reference.
    public isDefaultPort() : bool
    Whether the URI has the default port of the current scheme. $uri->getPort() may return the standard port. This method can be used for some non-http/https Uri.
    public isNetworkPathReference() : bool
    Whether the URI is a network-path reference. A relative reference that begins with two slash characters is termed an network-path reference.
    public isRelativePathReference() : bool
    Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is termed a relative-path reference.
    public isSameDocumentReference(\Grav\Framework\Psr7\UriInterface/null/\Psr\Http\Message\UriInterface $base=null) : bool
    Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its fragment component, identical to the base URI. When no base URI is given, only an empty URI reference (apart from its fragment) is considered a same-document reference.
    public withFragment(string $fragment) : \Psr\Http\Message\UriInterface
    public withHost(string $host) : \Psr\Http\Message\UriInterface
    public withPath(string $path) : \Psr\Http\Message\UriInterface
    public withPort(int/null $port) : \Psr\Http\Message\UriInterface
    public withQuery(string $query) : \Psr\Http\Message\UriInterface
    public withQueryParams(array $params) : \Psr\Http\Message\UriInterface
    public withScheme(string $scheme) : \Psr\Http\Message\UriInterface
    public withUserInfo(string $user, string/null $password=null) : \Psr\Http\Message\UriInterface

    This class implements \Psr\Http\Message\UriInterface, \Stringable


    Class: \Grav\Framework\Psr7\UploadedFile

    Class UploadedFile

    Visibility Function
    public __construct(\Grav\Framework\Psr7\StreamInterface/string/\Grav\Framework\Psr7\resource $streamOrFile, int $size, int $errorStatus, string/null $clientFilename=null, string/null $clientMediaType=null) : void
    public addMeta(array $meta) : \Grav\Framework\Psr7\$this
    public getClientFilename() : string/null
    public getClientMediaType() : string/null
    public getError() : int
    public getMeta() : array
    public getSize() : int/null
    public getStream() : \Psr\Http\Message\StreamInterface
    public moveTo(string $targetPath) : void
    public setMeta(array $meta) : \Grav\Framework\Psr7\$this

    This class implements \Psr\Http\Message\UploadedFileInterface


    Class: \Grav\Framework\Relationships\Relationships

    Class Relationships

    Visibility Function
    public __construct(\Grav\Framework\Relationships\P/\Grav\Framework\Contracts\Object\IdentifierInterface $parent, array $options) : void
    Relationships constructor.
    public count() : int
    public current() : \Grav\Framework\Relationships\RelationshipInterface<T,P>/null
    public getModified() : \Grav\Framework\Relationships\RelationshipInterface<T,P>[]
    public isModified() : bool
    public jsonSerialize() : array
    public key() : string
    public next() : void
    public offsetExists(string $offset) : bool
    public offsetGet(string $offset) : \Grav\Framework\Relationships\RelationshipInterface<T,P>/null
    public offsetSet(string $offset, mixed $value) : \Grav\Framework\Relationships\never-return
    public offsetUnset(string $offset) : \Grav\Framework\Relationships\never-return
    public rewind() : void
    public valid() : bool

    This class implements \Grav\Framework\Contracts\Relationships\RelationshipsInterface, \Traversable, \JsonSerializable, \Iterator, \ArrayAccess, \Countable


    Class: \Grav\Framework\Relationships\ToManyRelationship

    Class ToManyRelationship

    Visibility Function
    public __construct(\Grav\Framework\Contracts\Object\IdentifierInterface $parent, string $name, array $options, array/\Grav\Framework\Relationships\iterable/iterable $identifiers=array()) : void
    ToManyRelationship constructor.
    public __serialize() : array
    public __unserialize(array $data) : void
    public addIdentifier(\Grav\Framework\Contracts\Object\IdentifierInterface $identifier) : bool
    public addIdentifiers(\Grav\Framework\Relationships\iterable/iterable $identifiers) : bool
    public check() : void
    public count() : int
    public fetch() : array
    public getCardinality() : string
    public getIdentifier(string $id, string/null/string $type=null) : \Grav\Framework\Relationships\IdentifierInterface/null
    public getIterator() : \Grav\Framework\Relationships\iterable
    public getName() : string
    public getNthIdentifier(\Grav\Framework\Relationships\positive-int/int $pos) : \Grav\Framework\Relationships\IdentifierInterface/null
    public getObject(string $id, string/null/string $type=null) : \Grav\Framework\Relationships\T/null
    public getParent() : \Grav\Framework\Contracts\Object\IdentifierInterface
    public getType() : string
    public has(string $id, string/null/string $type=null) : bool
    public hasIdentifier(\Grav\Framework\Contracts\Object\IdentifierInterface $identifier) : bool
    public isModified() : bool
    public jsonSerialize() : array
    public removeIdentifier(\Grav\Framework\Relationships\IdentifierInterface/null/\Grav\Framework\Contracts\Object\IdentifierInterface $identifier=null) : bool
    public removeIdentifiers(\Grav\Framework\Relationships\iterable/iterable $identifiers) : bool
    public replaceIdentifiers(\Grav\Framework\Relationships\iterable/iterable $identifiers) : bool
    public serialize() : string
    public unserialize(string $serialized) : void
    protected getUnserializeAllowedClasses() : array/bool

    This class implements \Grav\Framework\Contracts\Relationships\ToManyRelationshipInterface, \Countable, \IteratorAggregate, \JsonSerializable, \Serializable, \Traversable, \Grav\Framework\Contracts\Relationships\RelationshipInterface


    Class: \Grav\Framework\Relationships\ToOneRelationship

    Class ToOneRelationship

    Visibility Function
    public __construct(\Grav\Framework\Contracts\Object\IdentifierInterface $parent, string $name, array $options, \Grav\Framework\Contracts\Object\IdentifierInterface $identifier=null) : void
    public __serialize() : array
    public __unserialize(array $data) : void
    public addIdentifier(\Grav\Framework\Contracts\Object\IdentifierInterface $identifier) : bool
    public check() : void
    public count() : int
    public fetch() : object/null
    public getCardinality() : string
    public getIdentifier(string/null/string $id=null, string/null/string $type=null) : \Grav\Framework\Relationships\IdentifierInterface/null
    public getIterator() : \Grav\Framework\Relationships\iterable
    public getName() : string
    public getObject(string/null/string $id=null, string/null/string $type=null) : \Grav\Framework\Relationships\T/null
    public getParent() : \Grav\Framework\Contracts\Object\IdentifierInterface
    public getType() : string
    public has(string/null/string $id=null, string/null/string $type=null) : bool
    public hasIdentifier(\Grav\Framework\Contracts\Object\IdentifierInterface $identifier) : bool
    public isModified() : bool
    public jsonSerialize() : array/null
    public removeIdentifier(\Grav\Framework\Relationships\IdentifierInterface/null/\Grav\Framework\Contracts\Object\IdentifierInterface $identifier=null) : bool
    public replaceIdentifier(\Grav\Framework\Relationships\IdentifierInterface/null/\Grav\Framework\Contracts\Object\IdentifierInterface $identifier=null) : bool
    public serialize() : string
    public unserialize(string $serialized) : void
    protected getUnserializeAllowedClasses() : array/bool

    This class implements \Grav\Framework\Contracts\Relationships\ToOneRelationshipInterface, \Countable, \IteratorAggregate, \JsonSerializable, \Serializable, \Traversable, \Grav\Framework\Contracts\Relationships\RelationshipInterface


    Class: \Grav\Framework\RequestHandler\RequestHandler

    Class RequestHandler

    Visibility Function
    public __construct(array $middleware, callable $default, \Grav\Framework\RequestHandler\ContainerInterface/null/\Psr\Container\ContainerInterface $container=null) : void
    Delegate constructor.
    public addCallable(string $name, callable $callable) : \Grav\Framework\RequestHandler\$this
    Add callable initializing Middleware that will be executed as soon as possible.
    public addMiddleware(string $name, \Psr\Http\Server\MiddlewareInterface $middleware) : \Grav\Framework\RequestHandler\$this
    Add Middleware that will be executed as soon as possible.
    public handle(\Psr\Http\Message\ServerRequestInterface $request) : void

    This class implements \Psr\Http\Server\RequestHandlerInterface


    Class: \Grav\Framework\RequestHandler\Exception\NotFoundException

    Class NotFoundException

    Visibility Function
    public __construct(\Psr\Http\Message\ServerRequestInterface $request, \Grav\Framework\RequestHandler\Exception\Throwable/null/\Throwable $previous=null) : void
    NotFoundException constructor.

    This class extends \Grav\Framework\RequestHandler\Exception\RequestException

    This class implements \Throwable, \Stringable


    Class: \Grav\Framework\RequestHandler\Exception\PageExpiredException

    Class PageExpiredException

    Visibility Function
    public __construct(\Psr\Http\Message\ServerRequestInterface $request, \Grav\Framework\RequestHandler\Exception\Throwable/null/\Throwable $previous=null) : void
    PageExpiredException constructor.

    This class extends \Grav\Framework\RequestHandler\Exception\RequestException

    This class implements \Throwable, \Stringable


    Class: \Grav\Framework\RequestHandler\Exception\NotHandledException

    Class NotHandledException

    Visibility Function

    This class extends \Grav\Framework\RequestHandler\Exception\NotFoundException

    This class implements \Stringable, \Throwable


    Class: \Grav\Framework\RequestHandler\Exception\InvalidArgumentException

    Class InvalidArgumentException

    Visibility Function
    public __construct(string $message='', mixed/null $invalidMiddleware=null, int $code, \Grav\Framework\RequestHandler\Exception\Throwable/null/\Throwable $previous=null) : void
    InvalidArgumentException constructor.
    public getInvalidMiddleware() : mixed/null
    Return the invalid middleware

    This class extends \InvalidArgumentException

    This class implements \Throwable, \Stringable


    Class: \Grav\Framework\RequestHandler\Exception\RequestException

    Class RequestException

    Visibility Function
    public __construct(\Psr\Http\Message\ServerRequestInterface $request, string $message, int $code=500, \Grav\Framework\RequestHandler\Exception\Throwable/null/\Throwable $previous=null) : void
    public getHttpCode() : mixed
    public getHttpReason() : mixed
    public getRequest() : \Psr\Http\Message\ServerRequestInterface

    This class extends \RuntimeException

    This class implements \Stringable, \Throwable


    Class: \Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport

    Multipart request support for PUT and PATCH.

    Visibility Function
    public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : \Psr\Http\Message\ResponseInterface
    protected addFile(array $files, string $name, \Psr\Http\Message\UploadedFileInterface $file) : void
    protected processPart(array $params, array $files, string $part) : void

    This class implements \Psr\Http\Server\MiddlewareInterface


    Class: \Grav\Framework\Route\Route

    Implements Grav Route.

    Visibility Function
    public __construct(array $parts=array()) : void
    You can use RouteFactory functions to create new Route objects.
    public __toString() : string
    DEPRECATED - 1.6 Use ->toString(true) or ->getUri() instead.
    public getBase(string/null/string $language=null) : string
    public getExtension() : string
    public getGravParam(string $param) : string/null
    public getGravParams() : array
    public getLanguage() : string
    public getLanguagePrefix() : string
    public getParam(string $param) : string/array/null
    Return value of the parameter, looking into both Grav parameters and query parameters. If the parameter exists in both, return Grav parameter.
    public getParams() : array
    Return array of both query and Grav parameters. If a parameter exists in both, prefer Grav parameter.
    public getParts() : array
    public getQueryParam(string $param) : string/array/null
    public getQueryParams() : array
    public getRootPrefix() : string
    public getRoute(int $offset, int/null $length=null) : string
    public getRouteParts(int $offset, int/null $length=null) : array
    public getUri() : \Grav\Framework\Uri\Uri
    public toString(bool $includeRoot=false) : string
    public withAddedPath(string $path) : \Grav\Framework\Route\Route
    public withExtension(string $extension) : \Grav\Framework\Route\Route
    public withGravParam(string $param, mixed $value) : \Grav\Framework\Route\Route
    public withLanguage(string/null $language) : \Grav\Framework\Route\Route
    public withQueryParam(string $param, mixed $value) : \Grav\Framework\Route\Route
    public withRoot(string $root) : \Grav\Framework\Route\Route
    Allow the ability to set the root to something else
    public withRoute(string $route) : \Grav\Framework\Route\Route
    Allow the ability to set the route to something else
    public withoutGravParams() : \Grav\Framework\Route\Route
    public withoutParams() : \Grav\Framework\Route\Route
    public withoutQueryParams() : \Grav\Framework\Route\Route
    protected copy() : \Grav\Framework\Route\Route
    protected getUriPath(bool $includeRoot=false) : string
    protected getUriQuery() : string
    protected initParts(array $parts) : void
    protected withParam(string $type, string $param, mixed $value) : \Grav\Framework\Route\Route

    This class implements \Stringable


    Class: \Grav\Framework\Route\RouteFactory

    Class RouteFactory

    Visibility Function
    public static buildParams(array $params) : string
    public static createFromLegacyUri(\Grav\Common\Uri $uri) : \Grav\Framework\Route\Route
    public static createFromParts(array $parts) : \Grav\Framework\Route\Route
    public static createFromString(string $path) : \Grav\Framework\Route\Route
    public static getLanguage() : string
    public static getParamValueDelimiter() : string
    public static getParams(string $path) : array
    public static getRoot() : string
    public static parseParams(string $str) : array
    public static setLanguage(string $language) : void
    public static setParamValueDelimiter(string $delimiter) : void
    public static setRoot(string $root) : void
    public static stripParams(string $path, bool $decode=false) : string
    public static trimParams(string $str) : string


    Class: \Grav\Framework\Session\Session

    Class Session

    Visibility Function
    public __construct(array $options=array()) : void
    Session constructor.
    public __get(string $name) : mixed
    Returns session variable.
    public __isset(string $name) : bool
    Checks if session variable is defined.
    public __set(string $name, mixed $value) : void
    Sets session variable.
    public __unset(string $name) : void
    Removes session variable.
    public clear() : \Grav\Framework\Session\$this
    Free all session variables.
    public close() : \Grav\Framework\Session\$this
    Force the session to be saved and closed
    public getAll() : array
    Returns all session variables.
    public getCookieOptions(int/null/int $lifetime=null) : array
    Store something in cookie temporarily.
    public getId() : string/null Session ID
    Get session ID
    public static getInstance() : \Grav\Framework\Session\Session
    Get current session instance.
    public getIterator() : ArrayIterator Return an ArrayIterator of $_SESSION
    Retrieve an external iterator
    public getName() : string/null
    Get session name
    public invalidate() : \Grav\Framework\Session\$this
    Invalidates the current session.
    public isStarted() : bool
    Checks if the session was started.
    public regenerateId() : \Grav\Framework\Session\$this
    Regenerate session id but keep the current session information. Session id must be regenerated on login, logout or after long time has been passed.
    public setId(string $id) : \Grav\Framework\Session\$this
    Set session ID
    public setName(string $name) : \Grav\Framework\Session\$this
    Set session name
    public setOptions(array $options) : void
    Sets session.* ini variables.
    public start(bool $readonly=false) : \Grav\Framework\Session\$this
    Starts the session storage
    protected isSessionStarted() : bool
    http://php.net/manual/en/function.session-status.php#113468 Check if session is started nicely.
    protected onBeforeSessionStart() : void
    protected onSessionStart() : void
    protected removeCookie() : void
    protected setCookie() : void
    protected setOption(string $key, mixed $value) : void

    This class implements \Grav\Framework\Session\SessionInterface, \Traversable, \IteratorAggregate


    Interface: \Grav\Framework\Session\SessionInterface

    Class Session

    Visibility Function
    public __get(string $name) : mixed
    Returns session variable.
    public __isset(string $name) : bool
    Checks if session variable is defined.
    public __set(string $name, mixed $value) : void
    Sets session variable.
    public __unset(string $name) : void
    Removes session variable.
    public clear() : \Grav\Framework\Session\$this
    Free all session variables.
    public close() : \Grav\Framework\Session\$this
    Force the session to be saved and closed
    public getAll() : array
    Returns all session variables.
    public getId() : string/null Session ID
    Get session ID
    public static getInstance() : \Grav\Framework\Session\Session
    Get current session instance.
    public getIterator() : ArrayIterator Return an ArrayIterator of $_SESSION
    Retrieve an external iterator
    public getName() : string/null
    Get session name
    public invalidate() : \Grav\Framework\Session\$this
    Invalidates the current session.
    public isStarted() : bool
    Checks if the session was started.
    public setId(string $id) : \Grav\Framework\Session\$this
    Set session ID
    public setName(string $name) : \Grav\Framework\Session\$this
    Set session name
    public setOptions(array $options) : void
    Sets session.* ini variables.
    public start(bool $readonly=false) : \Grav\Framework\Session\$this
    Starts the session storage

    This class implements \IteratorAggregate, \Traversable


    Class: \Grav\Framework\Session\Messages

    Implements session messages.

    Visibility Function
    public __serialize() : array
    public __unserialize(array $data) : void
    public add(string $message, string $scope='default') : \Grav\Framework\Session\$this
    Add message to the queue.
    public all(string/null/string $scope=null) : array
    Fetch all messages.
    public clear(string/null/string $scope=null) : \Grav\Framework\Session\$this
    Clear message queue.
    public fetch(string/null/string $scope=null) : array
    Fetch and clear message queue.
    public isCleared() : bool
    public serialize() : string
    public unserialize(string $serialized) : void
    protected getUnserializeAllowedClasses() : array/bool

    This class implements \Serializable


    Class: \Grav\Framework\Session\Exceptions\SessionException

    Class SessionException

    Visibility Function

    This class extends \RuntimeException

    This class implements \Stringable, \Throwable


    Class: \Grav\Framework\Uri\UriFactory

    Class Uri

    Visibility Function
    public static buildQuery(array $params) : string
    Build query string from variables.
    public static createFromEnvironment(array $env) : \Grav\Framework\Uri\Uri
    public static createFromParts(array $parts) : \Grav\Framework\Uri\Uri
    Creates a URI from a array of parse_url() components.
    public static createFromString(string $uri) : \Grav\Framework\Uri\Uri
    public static parseQuery(string $query) : mixed
    Parse query string and return it as an array.
    public static parseUrl(string $url) : array
    UTF-8 aware parse_url() implementation.
    public static parseUrlFromEnvironment(array $env) : array


    Class: \Grav\Framework\Uri\Uri

    Implements PSR-7 UriInterface.

    Visibility Function
    public __construct(array $parts=array()) : void
    You can use UriFactory functions to create new Uri objects.
    public getAuthority() : string The URI authority, in "[user-info@]host[:port]" format.
    Retrieve the authority component of the URI. If no authority information is present, this method MUST return an empty string. The authority syntax of the URI is:
    public getBaseUrl() : string
    public getFragment() : string The URI fragment.
    Retrieve the fragment component of the URI. If no fragment is present, this method MUST return an empty string. The leading "#" character is not part of the fragment and MUST NOT be added. The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.5.
    public getHost() : string The URI host.
    Retrieve the host component of the URI. If no host is present, this method MUST return an empty string. The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.2.2.
    public getParts() : array
    public getPassword() : string
    public getPath() : string The URI path.
    Retrieve the path component of the URI. The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes. Normally, the empty path "" and absolute path "/" are considered equal as defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically do this normalization because in contexts with a trimmed base path, e.g. the front controller, this difference becomes significant. It's the task of the user to handle both "" and "/". The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.3. As an example, if the value should include a slash ("/") not intended as delimiter between path segments, that value MUST be passed in encoded form (e.g., "%2F") to the instance.
    public getPort() : null/int The URI port.
    Retrieve the port component of the URI. If a port is present, and it is non-standard for the current scheme, this method MUST return it as an integer. If the port is the standard port used with the current scheme, this method SHOULD return null. If no port is present, and no scheme is present, this method MUST return a null value. If no port is present, but a scheme is present, this method MAY return the standard port for that scheme, but SHOULD return null.
    public getQuery() : string The URI query string.
    Retrieve the query string of the URI. If no query string is present, this method MUST return an empty string. The leading "?" character is not part of the query and MUST NOT be added. The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.4. As an example, if a value in a key/value pair of the query string should include an ampersand ("&") not intended as a delimiter between values, that value MUST be passed in encoded form (e.g., "%26") to the instance.
    public getQueryParam(string $key) : string/null
    public getQueryParams() : array
    public getScheme() : string The URI scheme.
    Retrieve the scheme component of the URI. If no scheme is present, this method MUST return an empty string. The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.1. The trailing ":" character is not part of the scheme and MUST NOT be added.
    public getUrl() : string
    public getUser() : string
    public getUserInfo() : string The URI user information, in "username[:password]" format.
    Retrieve the user information component of the URI. If no user information is present, this method MUST return an empty string. If a user is present in the URI, this will return that value; additionally, if the password is also present, it will be appended to the user value, with a colon (":") separating the values. The trailing "@" character is not part of the user information and MUST NOT be added.
    public isAbsolute() : bool
    Whether the URI is absolute, i.e. it has a scheme. An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, the base URI. Relative references can be divided into several forms: - network-path references, e.g. '//example.com/path' - absolute-path references, e.g. '/path' - relative-path references, e.g. 'subpath'
    public isAbsolutePathReference() : bool
    Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is termed an absolute-path reference.
    public isDefaultPort() : bool
    Whether the URI has the default port of the current scheme. $uri->getPort() may return the standard port. This method can be used for some non-http/https Uri.
    public isNetworkPathReference() : bool
    Whether the URI is a network-path reference. A relative reference that begins with two slash characters is termed an network-path reference.
    public isRelativePathReference() : bool
    Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is termed a relative-path reference.
    public isSameDocumentReference(\Grav\Framework\Uri\UriInterface/null/\Psr\Http\Message\UriInterface $base=null) : bool
    Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its fragment component, identical to the base URI. When no base URI is given, only an empty URI reference (apart from its fragment) is considered a same-document reference.
    public withFragment(string $fragment) : static A new instance with the specified fragment.
    Return an instance with the specified URI fragment. This method MUST retain the state of the current instance, and return an instance that contains the specified URI fragment. Users can provide both encoded and decoded fragment characters. Implementations ensure the correct encoding as outlined in getFragment(). An empty fragment value is equivalent to removing the fragment.
    public withHost(string $host) : static A new instance with the specified host.
    Return an instance with the specified host. This method MUST retain the state of the current instance, and return an instance that contains the specified host. An empty host value is equivalent to removing the host.
    public withPath(string $path) : static A new instance with the specified path.
    Return an instance with the specified path. This method MUST retain the state of the current instance, and return an instance that contains the specified path. The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes. If the path is intended to be domain-relative rather than path relative then it must begin with a slash ("/"). Paths not starting with a slash ("/") are assumed to be relative to some base path known to the application or consumer. Users can provide both encoded and decoded path characters. Implementations ensure the correct encoding as outlined in getPath().
    public withPort(null/int/int $port) : static A new instance with the specified port.
    Return an instance with the specified port. This method MUST retain the state of the current instance, and return an instance that contains the specified port. Implementations MUST raise an exception for ports outside the established TCP and UDP port ranges. A null value provided for the port is equivalent to removing the port information. removes the port information.
    public withQuery(string $query) : static A new instance with the specified query string.
    Return an instance with the specified query string. This method MUST retain the state of the current instance, and return an instance that contains the specified query string. Users can provide both encoded and decoded query characters. Implementations ensure the correct encoding as outlined in getQuery(). An empty query string value is equivalent to removing the query string.
    public withQueryParam(string $key, string/null $value) : \Psr\Http\Message\UriInterface
    public withQueryParams(array $params) : \Psr\Http\Message\UriInterface
    public withScheme(string $scheme) : static A new instance with the specified scheme.
    Return an instance with the specified scheme. This method MUST retain the state of the current instance, and return an instance that contains the specified scheme. Implementations MUST support the schemes "http" and "https" case insensitively, and MAY accommodate other schemes if required. An empty scheme is equivalent to removing the scheme.
    public withUserInfo(string $user, null/string/string $password=null) : static A new instance with the specified user information.
    Return an instance with the specified user information. This method MUST retain the state of the current instance, and return an instance that contains the specified user information. Password is optional, but the user information MUST include the user; an empty string for the user is equivalent to removing user information.
    public withoutQueryParam(string $key) : \Psr\Http\Message\UriInterface

    This class extends \Grav\Framework\Psr7\AbstractUri

    This class implements \Stringable, \Psr\Http\Message\UriInterface


    Class: \Grav\Framework\Uri\UriPartsFilter

    Class Uri

    Visibility Function
    public static filterHost(string $host) : string
    public static filterPath(string $path) : string The RFC 3986 percent-encoded uri path.
    Filter Uri path. This method percent-encodes all reserved characters in the provided path string. This method will NOT double-encode characters that are already percent-encoded.
    public static filterPort(int/null $port=null) : int/null
    Filter Uri port. This method
    public static filterQueryOrFragment(string $query) : string The percent-encoded query string.
    Filters the query string or fragment of a URI.
    public static filterScheme(string $scheme) : string
    public static filterUserInfo(string $info) : string The percent-encoded user or password string.
    Filters the user info string.


    Class: \Grav\Installer\Versions

    Grav Versions NOTE: This class can be initialized during upgrade from an older version of Grav. Make sure it runs there!

    Visibility Function
    public getAll() : array
    public getExtension(string $extension) : array/null
    public getGrav() : array/null
    public getHistory(string $extension) : array
    public getPlugin(string $name) : array/null
    public getPlugins() : array
    public getSchema(string $extension) : string/null
    public getTheme(string $name) : array/null
    public getThemes() : array
    public getVersion(string $extension) : string/null
    public static instance(string/null/string $filename=null) : \Grav\Installer\self
    public removeHistory(string $extension) : void
    Clears extension history. Useful when creating skeletons.
    public save() : bool True if the file was updated.
    public setExtension(string $extension, array/null/array $value) : void
    public setSchema(string $extension, string/null/string $schema) : void
    public setVersion(string $extension, string/null/string $version) : void
    public updateHistory(string $extension, string/null/string $version) : void
    public updateVersion(string $extension, string/null/string $version) : void
    NOTE: Updates also history.


    Class: \Grav\Installer\VersionUpdater

    Class VersionUpdater

    Visibility Function
    public __construct(string $name, string $path, string $version, \Grav\Installer\Versions $versions) : void
    VersionUpdater constructor.
    public getExtensionHistory(string/null/string $name=null) : array
    public getExtensionSchema(string/null/string $name=null) : string/null
    public getExtensionVersion(string/null/string $name=null) : string/null
    public getVersions() : \Grav\Installer\Versions
    public install() : void
    Install method.
    public postflight() : void
    Post-installation method.
    public preflight() : void
    Pre-installation method.
    protected loadUpdates() : mixed


    Class: \Grav\Installer\YamlUpdater

    Grav YAML updater. NOTE: This class can be initialized during upgrade from an older version of Grav. Make sure it runs there!

    Visibility Function
    public define(string $variable, mixed $value) : void
    public exists(string $variable) : void
    Check if a value exists by using dot notation for nested arrays/objects.
    public get(string $name, mixed $default=null) : mixed Value.
    Get value by using dot notation for nested arrays/objects.
    public getComments() : array
    public static instance(string $filename) : void
    public isHandWritten() : bool
    public save() : bool
    public set(string $name, mixed $value) : void
    Set value by using dot notation for nested arrays/objects.
    public undefine(string $variable) : void


    Class: \Grav\Installer\InstallException

    Class InstallException

    Visibility Function
    public __construct(string $message, \Throwable $previous) : void
    InstallException constructor.

    This class extends \RuntimeException

    This class implements \Stringable, \Throwable


    Class: \Grav\Installer\VersionUpdate

    Class VersionUpdate

    Visibility Function
    public __construct(string $file, \Grav\Installer\VersionUpdater $updater) : void
    public getDate() : mixed
    public getPatch() : mixed
    public getRevision() : mixed
    public getUpdater() : mixed
    public getVersion() : mixed
    public postflight(\Grav\Installer\VersionUpdater $updater) : void
    Runs right after installation.
    public preflight(\Grav\Installer\VersionUpdater $updater) : void
    Run right before installation.


    Class: \Pimple\Container

    Container main class.

    Visibility Function
    public __construct(array $values=array()) : void
    Instantiates the container. Objects and parameters can be passed as argument to the constructor.
    public extend(string $id, callable/object $callable) : callable The wrapped callable
    Extends an object definition. Useful when you want to extend an existing object definition, without necessarily loading that object.
    public factory(callable/object $callable) : callable The passed callable
    Marks a callable as being a factory service.
    public keys() : array An array of value names
    Returns all defined value names.
    public offsetExists(string/mixed $id) : bool
    Checks if a parameter or an object is set.
    public offsetGet(string/mixed $id) : mixed The value of the parameter or an object
    Gets a parameter or an object.
    public offsetSet(string/mixed $id, mixed $value) : void
    Sets a parameter or an object. Objects must be defined as Closures. Allowing any PHP callable leads to difficult to debug problems as function names (strings) are callable (creating a function with the same name as an existing parameter would break your container).
    public offsetUnset(string/mixed $id) : void
    Unsets a parameter or an object.
    public protect(callable/object $callable) : callable The passed callable
    Protects a callable from being interpreted as a service. This is useful when you want to store a callable as a parameter.
    public raw(string $id) : mixed The value of the parameter or the closure defining an object
    Gets a parameter or the closure defining an object.
    public register(\Pimple\ServiceProviderInterface $provider, array $values=array()) : \Pimple\static
    Registers a service provider.

    This class implements \ArrayAccess


    Interface: \Pimple\ServiceProviderInterface

    Pimple service provider interface.

    Visibility Function
    public register(\Pimple\Container $pimple) : void
    Registers services on the given container. This method should only be used to configure services and parameters. It should not get services.


    Class: \Pimple\ServiceIterator

    Lazy service iterator.

    Visibility Function
    public __construct(\Pimple\Container $container, array $ids) : void
    public current() : void
    public key() : void
    public next() : void
    public rewind() : void
    public valid() : void

    This class implements \Iterator, \Traversable


    Class: \Pimple\Exception\FrozenServiceException

    An attempt to modify a frozen service was made.

    Visibility Function
    public __construct(string $id) : void

    This class extends \RuntimeException

    This class implements \Throwable, \Stringable, \Psr\Container\ContainerExceptionInterface


    Class: \Pimple\Exception\UnknownIdentifierException

    The identifier of a valid service or parameter was expected.

    Visibility Function
    public __construct(string $id) : void

    This class extends \InvalidArgumentException

    This class implements \Stringable, \Throwable, \Psr\Container\NotFoundExceptionInterface, \Psr\Container\ContainerExceptionInterface


    Class: \Pimple\Exception\InvalidServiceIdentifierException

    An attempt to perform an operation that requires a service identifier was made.

    Visibility Function
    public __construct(string $id) : void

    This class extends \InvalidArgumentException

    This class implements \Stringable, \Throwable, \Psr\Container\NotFoundExceptionInterface, \Psr\Container\ContainerExceptionInterface


    Class: \Pimple\Exception\ExpectedInvokableException

    A closure or invokable object was expected.

    Visibility Function

    This class extends \InvalidArgumentException

    This class implements \Stringable, \Throwable, \Psr\Container\ContainerExceptionInterface


    Class: \Pimple\Psr11\Container

    PSR-11 compliant wrapper.

    Visibility Function
    public __construct(\Pimple\Container $pimple) : void
    public get(string $id) : mixed
    public has(string $id) : bool

    This class implements \Psr\Container\ContainerInterface


    Class: \Pimple\Psr11\ServiceLocator

    Pimple PSR-11 service locator.

    Visibility Function
    public __construct(\Pimple\Psr11\PimpleContainer/\Pimple\Container $container, array $ids) : void
    public get(string $id) : mixed
    public has(string $id) : bool

    This class implements \Psr\Container\ContainerInterface


    Interface: \RocketTheme\Toolbox\Event\EventSubscriberInterface

    DEPRECATED Event classes will be removed in the future. Use PSR-14 implementation instead.

    Visibility Function

    This class implements \Symfony\Component\EventDispatcher\EventSubscriberInterface


    Class: \Twig\DeferredExtension\DeferredResolveNode

    Visibility Function
    public compile(\Twig\Compiler $compiler) : void

    This class extends \Twig\Node\Node

    This class implements \Traversable, \Stringable, \IteratorAggregate, \Countable


    Class: \Twig\DeferredExtension\DeferredTokenParser

    Visibility Function
    public decideBlockEnd(\Twig\Token $token) : void
    public getTag() : mixed
    public parse(\Twig\Token $token) : void

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Twig\DeferredExtension\DeferredNode

    Visibility Function
    public compile(\Twig\Compiler $compiler) : void

    This class extends \Twig\Node\Node

    This class implements \Traversable, \Stringable, \IteratorAggregate, \Countable


    Class: \Twig\DeferredExtension\DeferredDeclareNode

    Visibility Function
    public compile(\Twig\Compiler $compiler) : void

    This class extends \Twig\Node\Node

    This class implements \Traversable, \Stringable, \IteratorAggregate, \Countable


    Class: \Twig\DeferredExtension\DeferredInitializeNode

    Visibility Function
    public compile(\Twig\Compiler $compiler) : void

    This class extends \Twig\Node\Node

    This class implements \Traversable, \Stringable, \IteratorAggregate, \Countable


    Class: \Twig\DeferredExtension\DeferredExtension

    Visibility Function
    public defer(\Twig\Template $template, string $blockName) : void
    public getNodeVisitors() : mixed
    public getTokenParsers() : mixed
    public resolve(\Twig\Template $template, array $context, array $blocks) : void

    This class extends \Twig\Extension\AbstractExtension

    This class implements \Twig\Extension\ExtensionInterface, \Twig\Extension\LastModifiedExtensionInterface


    Class: \Twig\DeferredExtension\DeferredNodeVisitor

    Visibility Function
    public enterNode(\Twig\Node\Node $node, \Twig\Environment $env) : void
    public getPriority() : mixed
    public leaveNode(\Twig\Node\Node $node, \Twig\Environment $env) : void

    This class implements \Twig\NodeVisitor\NodeVisitorInterface


    Class: \Twig\DeferredExtension\DeferredBlockNode

    Visibility Function
    public compile(\Twig\Compiler $compiler) : void

    This class extends \Twig\Node\BlockNode

    This class implements \Countable, \IteratorAggregate, \Stringable, \Traversable