20 private $requiredProperties = array(
40 parent::initializeAttributes();
42 $this->attributes[
'subtype'] =
'elgg_upgrade';
45 $this->attributes[
'site_guid'] = 0;
46 $this->attributes[
'container_guid'] = 0;
47 $this->attributes[
'owner_guid'] = 0;
49 $this->is_completed = 0;
59 return $this->is_completed =
true;
68 return (
bool) $this->is_completed;
80 throw new InvalidArgumentException(
'Invalid value for URL path.');
86 throw new InvalidArgumentException(
'Upgrade URL paths must be unique.');
89 $this->upgrade_url =
$path;
112 return $this->completed_time = $time;
121 return $this->completed_time;
131 foreach ($this->requiredProperties as $prop) {
150 if (array_key_exists(
$name, $this->attributes)) {
165 if (array_key_exists(
$name, $this->attributes)) {
166 return parent::__get(
$name);
188 'subtype' =>
'elgg_upgrade',
189 'private_setting_name' =>
'upgrade_url',
isCompleted()
Has this upgrade completed?
if($guid==elgg_get_logged_in_user_guid()) $name
__get($name)
Get an attribute or private setting value.
setPrivateSetting($name, $value)
Adds a private setting to this entity.
getPrivateSetting($name)
Returns a private setting value.
getURL()
Returns a normalized URL for the upgrade page.
setPath($path)
Sets an upgrade URL path.
$upgrades
Lists pending upgrades.
initializeAttributes()
Set subtype to upgrade.
getCompletedTime()
Gets the time when the upgrade completed.
getUpgradeFromPath($path)
Find an ElggUpgrade object by the unique URL path.
save()
Require an upgrade page.
__set($name, $value)
Set a value as private setting or attribute.
elgg river item elgg form comment save
setCompleted()
Mark this upgrade as completed.
setCompletedTime($time=null)
Sets the timestamp for when the upgrade completed.