Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • ElggExtender
  • Overview
  • Package
  • Class
  • Tree

Class ElggExtender

The base class for ElggEntity extenders.

Extenders allow you to attach extended information to an ElggEntity. Core supports two: ElggAnnotation and ElggMetadata.

Saving the extender data to database is handled by the child class.

ElggData implements Loggable, Iterator, ArrayAccess, Exportable
Extended by ElggExtender

Direct known subclasses

ElggAnnotation, ElggMetadata
Abstract
Package: Elgg\Core\DataModel\Extender
See: ElggAnnotation
See: ElggMetadata
Link: http://docs.elgg.org/DataModel/Extenders
Tip: Plugin authors would probably want to extend either ElggAnnotation or ElggMetadata instead of this class.
Located at ElggExtender.php
Methods summary
protected
# initializeAttributes( )

(non-PHPdoc)

(non-PHPdoc)

See

ElggData::initializeAttributes()

Overrides

ElggData::initializeAttributes()
protected mixed
# get( string $name )

Returns an attribute

Returns an attribute

Parameters

$name
string
$name Name

Returns

mixed
protected boolean
# set( string $name, mixed $value, string $value_type = "" )

Set an attribute

Set an attribute

Parameters

$name
string
$name Name
$value
mixed
$value Value
$value_type
string
$value_type Value type

Returns

boolean
public integer
# getOwnerGUID( )

Get the GUID of the extender's owner entity.

Get the GUID of the extender's owner entity.

Returns

integer
The owner GUID
public ElggEntity
# getOwnerEntity( )

Get the entity that owns this extender

Get the entity that owns this extender

Returns

ElggEntity
public ElggEntity
# getEntity( )

Get the entity this describes.

Get the entity this describes.

Returns

ElggEntity
The entity
public boolean
# canEdit( integer $user_guid = 0 )

Returns if a user can edit this extended data.

Returns if a user can edit this extended data.

Parameters

$user_guid
integer
$user_guid The GUID of the user (defaults to currently logged in user)

Returns

boolean
public array
# getExportableValues( )

Return an array of fields which can be exported.

Return an array of fields which can be exported.

Returns

array
public array
# export( )

Export this object

Export this object

Returns

array
public integer
# getSystemLogID( )

Return an identification for the object for storage in the system log. This id must be an integer.

Return an identification for the object for storage in the system log. This id must be an integer.

Returns

integer
public string
# getType( )

Return a type of extension.

Return a type of extension.

Returns

string
public string
# getSubtype( )

Return a subtype. For metadata & annotations this is the 'name' and for relationship this is the relationship type.

Return a subtype. For metadata & annotations this is the 'name' and for relationship this is the relationship type.

Returns

string
Methods inherited from ElggData
__get(), __isset(), __set(), current(), delete(), getClassName(), getTimeCreated(), getURL(), key(), next(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), rewind(), save(), valid()
Methods inherited from Loggable
getObjectFromID()
Properties inherited from ElggData
$attributes, $valid
Magic properties summary
public string $type
#

annotation or metadata (read-only after save)

annotation or metadata (read-only after save)

public integer $id
#

The unique identifier (read-only)

The unique identifier (read-only)

public integer $entity_guid
#

The GUID of the entity that this extender describes

The GUID of the entity that this extender describes

public integer $access_id
#

Specifies the visibility level of this extender

Specifies the visibility level of this extender

public string $name
#

The name of this extender

The name of this extender

public mixed $value
#

The value of the extender (int or string)

The value of the extender (int or string)

public integer $time_created
#

A UNIX timestamp of when the extender was created (read-only, set on first save)

A UNIX timestamp of when the extender was created (read-only, set on first save)

Magic properties inherited from ElggData
$owner_guid
API documentation generated by ApiGen 2.8.0