44 parent::initializeAttributes();
46 $this->attributes[
'type'] = null;
47 $this->attributes[
'id'] = null;
48 $this->attributes[
'entity_guid'] = null;
49 $this->attributes[
'owner_guid'] = null;
51 $this->attributes[
'enabled'] =
'yes';
66 if (isset(
$value) && in_array(
$name, static::INTEGER_ATTR_NAMES)) {
71 if (
$name ==
'value') {
72 $this->attributes[
'value_type'] = self::detectValueType(
$value);
85 $this->attributes[
'value'] =
$value;
86 $this->attributes[
'value_type'] = self::detectValueType(
$value, $value_type);
98 if (array_key_exists(
$name, $this->attributes)) {
99 if (
$name ==
'value') {
100 switch ($this->attributes[
'value_type']) {
102 return (
bool) $this->attributes[
'value'];
104 return (
int) $this->attributes[
'value'];
106 return $this->attributes[
'value'];
108 $msg =
"{$this->attributes['value_type']} is not a supported \ElggExtender value type.";
117 return $this->attributes[
$name];
138 return $this->owner_guid ?
get_entity($this->owner_guid) : null;
147 return $this->entity_guid ?
get_entity($this->entity_guid) : null;
165 $object = new \Elgg\Export\Extender();
219 $params = [
'extender' => $this];
235 if (in_array($value_type, [
'integer',
'text',
'bool'])) {
getType()
Return a type of extension.
getTimeCreated()
Returns the UNIX epoch time that this entity was created.
$params
Saves global plugin settings.
getEntity()
Get the entity this describes.
__get($name)
Gets an attribute.
if(!$user||!$user->canDelete()) $name
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
__set($name, $value)
Set an attribute.
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif($item instanceof\ElggRelationship) elseif(is_callable([$item, 'getType']))
setValue($value, string $value_type= '')
Set the value of the extender.
canEdit(int $user_guid=0)
Returns if a user can edit this entity extender.
get_entity(int $guid)
Loads and returns an entity object from a guid.
static detectValueType($value, string $value_type= '')
Detect the value_type for a value to be stored as metadata or an annotation.
toObject(array $params=[])
{}
A generic class that contains shared code among , , and .
getOwnerEntity()
Get the entity that owns this extender.
getOwnerGUID()
Get the GUID of the extender's owner entity.
if($email instanceof\Elgg\Email) $object
foreach($plugin_guids as $guid) if(empty($deactivated_plugins)) $url
_elgg_services()
Get the global service provider.
elgg_normalize_url(string $url)
$id
Generic annotation delete action.
getSubtype()
Return a subtype.
getURL()
Get a url for this extender.