Elgg  Version 3.0
Namespaces | Classes | Functions | Variables
Elgg Namespace Reference

Configuration exception. More...

Namespaces

 Admin
 Represents an upgrade that runs outside of the upgrade.php script.
 
 Ajax
 
 Amd
 
 Application
 
 Assets
 
 Cache
 
 Cli
 
 Collections
 
 Composer
 
 Config
 
 Controllers
 
 Core
 Updates the advanced settings for the primary site object.
 
 Database
 
 Debug
 
 Di
 
 Email
 
 Export
 
 FileService
 
 Filesystem
 
 Forms
 
 Groups
 
 HooksRegistrationService
 
 Http
 
 I18n
 
 Json
 
 Logger
 
 Menu
 
 Notifications
 
 Project
 
 Queue
 
 Router
 
 Search
 
 Security
 
 Services
 
 Structs
 
 SystemMessages
 
 Upgrade
 
 Upgrades
 
 Users
 
 Validation
 
 Views
 

Classes

class  ActionsService
 WARNING: API IN FLUX. More...
 
class  Application
 Load, boot, and implement a front controller for an Elgg application. More...
 
class  AutoloadManager
 Manages core autoloading and caching of class maps. More...
 
class  BadRequestException
 Thrown when request is malformatted. More...
 
interface  BatchResult
 Specifies a countable iterator, usually of result rows from a DB. More...
 
class  BootData
 Serializable collection of data used to boot Elgg. More...
 
class  BootService
 Boots Elgg and manages a cache of data needed during boot. More...
 
class  ClassLoader
 A class/interface/trait autoloader for PHP. More...
 
class  ClassMap
 A map of class names to absolute file paths. More...
 
class  Cli
 CLI bootstrap. More...
 
class  CommitMessage
 
class  Config
 
class  Context
 Manages a global stack of strings for sharing information about the current execution context. More...
 
class  Cron
 Cron. More...
 
class  CsrfException
 Thrown when CSRF tokens mismatch. More...
 
class  Database
 The Elgg database. More...
 
class  DefaultPluginBootstrap
 Null plugin boostrap for plugins not defining 'bootstrap' in their elgg-plugin.php Can also be extended by plugin developers when only needing a limited subset of the bootstrap functions. More...
 
class  DeprecationService
 WARNING: API IN FLUX. More...
 
class  DeprecationWrapper
 Wrap an object and display warnings whenever the object's variables are accessed or a method is used. More...
 
class  Email
 Email message. More...
 
class  EmailService
 WARNING: API IN FLUX. More...
 
class  EntityDirLocator
 Locate the relative path of an entity's data dir. More...
 
interface  EntityIcon
 Entities that support icons should implement this interface. More...
 
class  EntityIconService
 WARNING: API IN FLUX. More...
 
class  EntityNotFoundException
 Thrown when entity can not be found. More...
 
class  EntityPermissionsException
 Thrown when entity can not be edited or container permissions do not allow it to be written. More...
 
class  EntityPreloader
 Preload entities based on properties of fetched objects. More...
 
interface  Event
 Models an event passed to event handlers. More...
 
class  EventsService
 Events service. More...
 
class  FormsService
 WARNING: API IN FLUX. More...
 
class  Gatekeeper
 Gatekeeper. More...
 
class  GatekeeperException
 Thrown when one of the gatekeepers prevents access. More...
 
class  GroupGatekeeperException
 Thrown when one of the gatekeepers prevents access. More...
 
class  GroupItemVisibility
 
class  HandlersService
 Helpers for providing callable-based APIs. More...
 
interface  Hook
 Models an event passed to hook handlers. More...
 
class  HooksRegistrationService
 Base class for events and hooks. More...
 
class  HttpException
 Generic HTTP exception. More...
 
class  ImageService
 Image manipulation service. More...
 
class  Includer
 Allow executing scripts without $this context or local vars. More...
 
class  Invoker
 Invocation service. More...
 
class  Logger
 Logger. More...
 
class  MethodMatcher
 Identify a static/dynamic method callable, even if contains an object to which you don't have a reference. More...
 
interface  ObjectEvent
 Models an object event passed to event handlers. More...
 
class  PageNotFoundException
 Thrown when page is not accessible. More...
 
class  PasswordService
 
class  PersistentLoginService
 
class  PluginBootstrap
 Plugin bootstrap. More...
 
interface  PluginBootstrapInterface
 Plugin bootstrap interface. More...
 
class  PluginHooksService
 Plugin Hooks. More...
 
class  Profiler
 Analyzes duration of functions, queries, and processes. More...
 
class  RedirectService
 Handles common tasks when redirecting a request. More...
 
class  Request
 Request container. More...
 
class  Router
 
class  SystemMessagesService
 System messages service. More...
 
class  Timer
 Capture timing info for profiling. More...
 
class  Translit
 
class  UpgradeService
 Upgrade service for Elgg. More...
 
class  UploadService
 WARNING: API IN FLUX. More...
 
class  UserCapabilities
 WARNING: API IN FLUX. More...
 
interface  UserEvent
 Models a user event passed to event handlers. More...
 
class  ValidationException
 Action validation exception. More...
 
class  Values
 Functions for use as plugin hook/event handlers or other situations where you need a globally accessible callable. More...
 
class  ViewsService
 WARNING: API IN FLUX. More...
 
class  WalledGardenException
 Thrown when walled garden gatekeeper prevents access. More...
 
class  WidgetDefinition
 WidgetDefinition. More...
 
class  WidgetsService
 WARNING: API IN FLUX. More...
 

Functions

 setCache (ElggCache $cache)
 Set cache. More...
 
 getCache ()
 Get cache. More...
 
 setLogger (LoggerInterface $logger=null)
 Set (or remove) the logger. More...
 
 getLogger ()
 Returns logger. More...
 
 log ($level, $message, array $context=[])
 Log a message. More...
 
 setTimer (Timer $timer)
 Set a timer that should collect begin/end times for events. More...
 
 getCurrentTime ($modifier= '')
 Get the (cloned) time. More...
 
 setCurrentTime (DateTime $time=null)
 Set the current time. More...
 

Variables

trait Cacheable
 Utility trait for injecting cache. More...
 
trait Loggable
 Enables adding a logger. More...
 
trait Profilable
 Make an object accept a timer. More...
 
trait TimeUsing
 Adds methods for setting the current time (for testing) More...
 

Detailed Description

Configuration exception.

RSS user view.

RSS object view.

RSS group view.

Elgg RSS view for a generic_comment annotation.

JSON user view.

JSON site view.

Elgg JSON output pageshell.

JSON object view.

Elgg JSON exception Displays a single exception.

JSON group view.

Elgg failsafe pageshell Special viewtype for rendering exceptions.

Elgg exception (failsafe mode) Displays a single exception.

ElggSite default view.

Elgg user tools settings.

Elgg user statistics.

Elgg user account settings.

Elgg Admin Area Canvas.

Elgg owner block Displays page ownership information.

Elgg global system message list Lists all system messages.

Elgg footer The standard HTML footer that displays across the site.

View a list of items.

Elgg pageshell for the admin area.

Elgg URL display Displays a URL as a link.

Elgg text output Displays some text that was input using a standard text field.

Display a page in an embedded window.

Elgg email output Displays an email address that was entered using an email input field.

Elgg dropdown display Displays a value that was entered into the system via a dropdown.

ElggObject default view.

Elgg pagination.

User Picker.

This view provides a hook for third parties to provide a URL shortener.

Elgg URL input Displays a URL input field.

Elgg text input Displays a text input field.

Elgg select input Displays a select input field.

CSRF security token view for use with secure forms.

Elgg radio input Displays a radio input field.

Elgg long text input (plaintext) Displays a long text input field that should not be overridden by wysiwyg editors.

Elgg password input Displays a password input field.

Elgg number input Displays a number input field.

Elgg long text input Displays a long text input field that can use WYSIWYG editor.

Create a hidden data field.

Create a form for data submission.

Elgg file input Displays a file input field.

Elgg email input Displays an email input field.

Elgg checkbox input Displays a checkbox input field.

Elgg checkbox input Displays a checkbox input tag.

This view provides a hook for third parties to provide a CAPTCHA.

Displays an autocomplete text input.

Generic icon view.

ElggGroup default view.

Elgg AJAX loader.

Elgg add user form.

Elgg forgotten password.

Elgg register form.

Elgg login form.

Form for adding and editing comments.

Statistics about this user.

Account settings form wrapper.

Provide a way of setting your password.

User settings for notifications.

Provide a way of setting your full name.

Provide a way of setting your language prefs.

Provide a way of setting your email.

Provide a way of setting your default access.

Elgg ajax edit comment form.

Elgg login box.

Elgg statistics screen.

Elgg administration site basic settings.

Elgg administration site advanced settings.

Elgg administration menu items.

Elgg version number.

Output functions Processing text for output such as pulling out URLs and extracting excerpts.

Elgg UTF-8 string functions.

Cron exception.

A generic parent class for Configuration exceptions

Exceptions.Stub

A generic parent class for cron exceptions

Exceptions.Stub

Core

This file defines the current version of the core Elgg code being used. This is compared against the values stored in the database to determine whether upgrades should be performed.

Core

Core

$vars['module'] The module name. Default: aside

ElggEntity $vars['entity'] The entity being commented ElggComment $vars['comment'] The comment being edited bool $vars['inline'] Show a single line version of the form?

Core

$vars['id'] CSS id $vars['class'] Optional additional CSS class $vars['hidden'] Begin hidden? (true)

Core

$vars['entity'] The entity the icon represents - uses getIconURL() method $vars['size'] topbar, tiny, small, medium (default), large, master $vars['use_link'] Hyperlink the icon $vars['href'] Optional override for link $vars['img_class'] Optional CSS class added to img $vars['link_class'] Optional CSS class for the link

Core

$vars['handler'] Data source URL, defaults to /livesearch handler $vars['options'] Options to be passed to the handler with the URL query If using custom options, make sure to impose a signed request gatekeeper in the resource view $vars['value'] Current value for the text input $vars['match_on'] users|groups|friends $vars['match_owner'] Restrict search results to owned entities Applies to group search. Owner will default to logged in user, unless match_target is set $vars['match_membership'] Restrict search results to entities that user is a member of Applies to group search. Unless match_target is set, will default to currently logge din user $vars['match_target'] Restrict search results to a specific target Applies to friends search Applies to group search with match_owner Applies to group search with match_membership Note that current user must be able to edit the target user for the results to show $vars['class'] Additional CSS class

Core

Pass input tag attributes as key value pairs. For a list of allowable attributes, see http://www.w3schools.com/tags/tag_input.asp

$vars['name'] Name of the checkbox $vars['value'] Value of the checkbox $vars['default'] The default value to submit if not checked. Optional, defaults to 0. Set to false for no default. $vars['checked'] Whether this checkbox is checked $vars['switch'] Whether this checkbox is styled as a toggle switch $vars['label'] Optional label string $vars['class'] Additional CSS class $vars['label_class'] Optional class for the label $vars['label_tag'] HTML tag that wraps concatinated label and input. Defaults to 'label'.

Note
This also includes a hidden input with the same name as the checkboxes to make sure something is sent to the server. The default value is 0. If using JS, be specific to avoid selecting the hidden default value: $('input[type=checkbox][name=name]')
Warning
Passing integers as labels does not currently work due to a deprecated hack that will be removed in Elgg 1.9. To use integer labels, the labels must be character codes: 1 would be 1

Core

string $vars['name'] The name of the input fields (Forced to an array by appending []) array $vars['options'] An array of strings representing the label => option for the each checkbox field array $vars['options_values'] An associative array of 'value' => ['text' => 'option'] string $vars['default'] The default value to send if nothing is checked. Optional, defaults to 0. Set to FALSE for no default. bool $vars['disabled'] Make all input elements disabled. Optional. string $vars['value'] The current value. Single value or array. Optional. string $vars['class'] Additional class of the list. Optional. string $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'

Core

$vars['class'] Additional CSS class

Core

$vars['value'] The current value if any $vars['class'] Additional CSS class

Use this view for forms as it provides protection against CSRF attacks.

Core

$vars['body'] The body of the form (made up of other input/xxx views and html $vars['action'] The action URL of the form $vars['action_name'] The name of the action (for targeting particular forms while extending) $vars['method'] The submit method: post (default) or get $vars['enctype'] Set to 'multipart/form-data' if uploading a file $vars['disable_security'] turn off CSRF security by setting to true $vars['class'] Additional class for the form $vars['ignore_empty_body'] Boolean (default true) to determine if an empty body should return continue

Core

$vars['value'] The current value, if any

Core

$vars['value'] The current value, if any - will be html encoded $vars['disabled'] Is the input field disabled? $vars['class'] Additional CSS class $vars['visual'] Activate WYSIWYG editor immediately If disabled, will display a plaintext input with a link to activate the visual editor

$vars['editor'] Enable WYSIWYG support Requires a plugin that implements a WYWIWYG library (e.g. bundled ckeditor plugin) $vars['editor_type'] The type of editor eg. 'simple'. It determines the style of the editor (if supported). $vars['editor_options'] Additional options to pass to the editor

Core

$vars['value'] The current value, if any $vars['name'] The name of the input field $vars['class'] Additional CSS class $vars['always_empty'] If for some reason you want to set a value to a password field, set this field to false. Best practice is to not populate password fields.

Core

$vars['value'] The current value, if any $vars['name'] The name of the input field $vars['class'] Additional CSS class $vars['disabled']

Warning
Passing integers as labels does not currently work due to a deprecated hack that will be removed in Elgg 1.9. To use integer labels, the labels must be character codes: 1 would be 1

Core

$vars['value'] The current value, if any $vars['name'] The name of the input field $vars['options'] An array of strings representing the options for the $vars['options_values'] An associative array of 'value' => ['text' => 'option'] $vars['class'] Additional class of the list. Optional. $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'

It is still recommended that you use input/form.

Core

Warning
Values of FALSE or NULL will match '' (empty string) but not 0.

Core

$vars['value'] The current value or an array of current values if multiple is true $vars['options'] An array of strings or arrays representing the options for the dropdown field. If an array is passed, the "text" key is used as its text, all other elements in the array are used as attributes. $vars['options_values'] An associative array of "value" => "option" where "value" is the name and "option" is the value displayed on the button. Replaces $vars['options'] when defined. When "option" is passed as an array, the same behaviour is used as when the $vars['options'] is passed an array to. If the array contains an array of 'options' an optgroup will be drawn with 'label' as the optgroup label. $vars['multiple'] If true, multiselect of values will be allowed in the select box $vars['class'] Additional CSS class

Sends an array of user guids.

Core

$vars['values'] Array of user guids for already selected users or null $vars['limit'] Limit number of users (default 0 = no limit) $vars['name'] Name of the returned data array (default "members") $vars['handler'] Name of page handler used to power search (default "livesearch") $vars['options'] Additional options to pass to the handler with the URL query If using custom options, make sure to impose a signed request gatekeeper in the resource view $vars['only_friends'] If enabled, will turn the input into a friends picker (default: false) $vars['show_friends'] Show the option to limit the search to friends (default: true) $vars['include_banned'] Include banned users in the search results (default: false)

Defaults to lazy load user lists in alphabetical order. User needs to type two characters before seeing the user popup list.

As users are selected they move down to a "users" box. When this happens, a hidden input is created to return the GUID in the array with the form

Core

int $vars['offset'] The offset in the list int $vars['limit'] Number of items per page int $vars['count'] Number of items in list string $vars['base_url'] Base URL to use in links string $vars['url_fragment'] URL fragment to add to links if not present in base_url (optional) string $vars['offset_key'] The string to use for offet in the URL

Warning
This view may be used for other ElggEntity objects

Core

Core

$vars['text'] The text to display

Core

$vars['value'] The email address to display

Core

$vars['src'] Source URL of the page

Core

$vars['value'] The text to display

Core

string $vars['text'] The HTML between the tags. string $vars['href'] The raw, un-encoded URL. "" = current URL. "/" = site home page. bool $vars['encode_text'] Run $vars['text'] through htmlspecialchars() (false) bool $vars['is_action'] Is this a link to an action (default: false, unless 'confirm' parameter is set) bool $vars['is_trusted'] Is this link trusted (false) mixed $vars['confirm'] Confirmation dialog text | (bool) true Note that if 'confirm' is set to true or a dialog text, 'is_action' parameter will default to true string $vars['icon'] Name of the Elgg icon, or icon HTML, appended before the text label string $vars['icon_alt'] Name of the Elgg icon, or icon HTML, appended after the text label string $vars['badge'] HTML content of the badge appended after the text label int $vars['excerpt_length'] Length of the URL excerpt if text is not given.

Core

$vars['head'] Parameters for the <head> element $vars['body'] The main content of the page $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()

$vars['items'] Array of ElggEntity, ElggAnnotation or ElggRiverItem objects $vars['offset'] Index of the first list item in complete list $vars['limit'] Number of items per page. Only used as input to pagination. $vars['count'] Number of items in the complete list $vars['base_url'] Base URL of list (optional) $vars['url_fragment'] URL fragment to add to links if not present in base_url (optional) $vars['pagination'] Show pagination? (default: true) $vars['position'] Position of the pagination: before, after, or both $vars['full_view'] Show the full view of the items (default: false) $vars['list_class'] Additional CSS class for the

$vars['item_class'] Additional CSS class for the elements $vars['item_view'] Alternative view to render list items content $vars['list_item_view'] Alternative view to render list items $vars['no_results'] Message to display if no results (string|true|Closure)

Core

$vars['object'] The array of message registers

$vars['show_owner_block_menu'] (bool) Show the owner_block menu for the current page owner (default: true)

Core

Core

$vars['content'] Content string $vars['sidebar'] Optional sidebar content $vars['title'] Optional title string

Enable "developers" to give admins a stacktrace view.

Core

$vars['object'] An exception

Core

$vars['object'] An exception

Includes minimal code so as not to create a "Exception thrown without a stack frame in Unknown on line 0" error

Core

$vars['title'] The page title $vars['body'] The main content of the page

Core

$vars['body']

Function Documentation

Elgg\getCache ( )

Get cache.

Returns
ElggCache

Definition at line 33 of file Cacheable.php.

Elgg\getCurrentTime (   $modifier = '')

Get the (cloned) time.

If setCurrentTime() has not been set, this will return a new DateTime().

See also
DateTime::modify
Parameters
string$modifierTime modifier
Returns
DateTime

Definition at line 27 of file TimeUsing.php.

Elgg\getLogger ( )

Returns logger.

Returns
LoggerInterface

Definition at line 34 of file Loggable.php.

Elgg\log (   $level,
  $message,
array  $context = [] 
)

Log a message.

Parameters
string$levelSeverity
mixed$messageMessage
array$contextContext
Returns
bool

Definition at line 55 of file Loggable.php.

Elgg\setCache ( ElggCache  $cache)

Set cache.

Parameters
ElggCache$cacheCache
Returns
void

Definition at line 25 of file Cacheable.php.

Elgg\setCurrentTime ( DateTime  $time = null)

Set the current time.

Parameters
DateTime$timeCurrent time (empty for now)
Returns
void

Definition at line 42 of file TimeUsing.php.

Elgg\setLogger ( LoggerInterface  $logger = null)

Set (or remove) the logger.

Parameters
LoggerInterface$loggerLogger or null
Returns
void

Definition at line 26 of file Loggable.php.

Elgg\setTimer ( Timer  $timer)

Set a timer that should collect begin/end times for events.

Parameters
Timer$timerTimer
Returns
void

Definition at line 23 of file Profilable.php.

Variable Documentation

trait Elgg\Cacheable
Initial value:
{
protected $cache

Utility trait for injecting cache.

Definition at line 11 of file Cacheable.php.

trait Elgg\Loggable
Initial value:
{
private $logger

Enables adding a logger.

Users should not assume $this->logger is set: use Loggable::getLogger()

Examples:
/root/Elgg/engine/classes/Elgg/FormsService.php.

Definition at line 12 of file Loggable.php.

trait Elgg\Profilable
Initial value:
{
private $timer
$timer
Definition: pending.php:29

Make an object accept a timer.

Definition at line 10 of file Profilable.php.

trait Elgg\TimeUsing
Initial value:
{
private $time
if(!$entity instanceof ElggEntity) $time
Definition: time.php:21

Adds methods for setting the current time (for testing)

Definition at line 12 of file TimeUsing.php.