31         parent::initializeAttributes();
 
   33         $this->attributes[
'type'] = 
"object";
 
   35         $this->tables_split = 2;
 
   49             'description' => 
null,
 
   76             if (
$row instanceof \stdClass) {
 
   79                     $msg = 
"Failed to load new " . get_class() . 
" for GUID: " . 
$row->guid;
 
   80                     throw new \IOException($msg);
 
   84                 elgg_deprecated_notice(
'This type of usage of the \ElggObject constructor was deprecated. Please use the clone method.', 1.7);
 
   88             } 
else if (is_numeric(
$row)) {
 
   92                     throw new \IOException(
"Failed to load new " . get_class() . 
" from GUID:" . 
$row);
 
   95                 throw new \InvalidParameterException(
"Unrecognized value passed to constuctor.");
 
  109         $attr_loader = new \Elgg\AttributeLoader(get_class(), 
'object', $this->attributes);
 
  110         $attr_loader->requires_access_control = !($this instanceof \ElggPlugin);
 
  111         $attr_loader->secondary_loader = 
'get_object_entity_as_row';
 
  113         $attrs = $attr_loader->getRequiredAttributes(
$guid);
 
  118         $this->attributes = 
$attrs;
 
  119         $this->tables_loaded = 2;
 
  132         $guid = parent::create();
 
  141         $query = 
"INSERT into {$CONFIG->dbprefix}objects_entity 
  142             (guid, title, description) values ($guid, '$title', '$description')";
 
  159         if (!parent::update()) {
 
  163         $guid = (int)$this->guid;
 
  167         $query = 
"UPDATE {$CONFIG->dbprefix}objects_entity 
  168             set title='$title', description='$description' where guid=$guid";
 
  170         return $this->
getDatabase()->updateData($query) !== 
false;
 
  184         $this->
title = $displayName;
 
  206         return parent::getSites();
 
  217         if (is_numeric(
$site)) {
 
  222         return parent::addToSite(
$site);
 
  247         return array_merge(parent::getExportableValues(), array(
 
if(! $site) if(!($site instanceof ElggSite)) $site description
 
$user_guid
Avatar remove action.
 
getDatabase()
Provides a pointer to the database object.
 
initialise_attributes($pre18_api=true)
Initialise the attributes array.
 
getContainerEntity()
Get the container entity for this object.
 
loadAdditionalSelectValues(array $data)
Stores non-attributes from the loading of the entity as volatile data.
 
canWriteToContainer($user_guid=0, $type='all', $subtype='all')
Can a user add an entity to this container.
 
getGUID()
Returns the guid.
 
getSites($options="", $limit=10, $offset=0)
Return sites that this object is a member of.
 
initializeAttributes()
Initialize the attributes array to include the type, title, and description.
 
static getExternalAttributes()
Get default values for attributes stored in a separate table.
 
getDisplayName()
{Get the entity's display name.string The title or name of this entity.}
 
prepareObject($object)
{Prepare an object copy for toObject()Object representation of the entity \stdClass}
 
update()
{Update the entity in the database.bool Whether the update was successful.}
 
setDisplayName($displayName)
{Sets the title or name of this entity.The title or name of this entity. void}
 
canComment($user_guid=0)
Can a user comment on this object?
 
getExportableValues()
Return an array of fields which can be exported.
 
addToSite($site)
Add this object to a site.
 
load($guid)
Loads the full \ElggObject when given a guid.
 
create()
{Create a new entry in the entities table.Saves the base information in the entities table for the en...
 
__construct($row=null)
Create a new \ElggObject.
 
$guid
Removes an admin notice.
 
add_site_object($site_guid, $object_guid)
Add an object to a site.
 
get_site_objects($site_guid, $subtype="", $limit=10, $offset=0)
Get the objects belonging to a site.
 
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
 
sanitize_string($string)
Sanitize a string for database use.
 
elgg_instanceof($entity, $type=null, $subtype=null, $class=null)
Checks if $entity is an \ElggEntity and optionally for type and subtype.
 
_elgg_cache_entity(\ElggEntity $entity)
Cache an entity.
 
if($screenshots) $description
 
elgg input elgg input tags