/** * {@inheritdoc} */ public function set($entity_guid, $name, $value) { $entity = get_entity((int) $entity_guid); if (!$entity) { return false; } if (!isset($value)) { return false; } $this->iterator++; $id = $this->iterator; $row = (object) ['id' => $id, 'entity_guid' => $entity->guid, 'name' => (string) $name, 'value' => (string) $value]; $this->rows[$id] = $row; $this->addQuerySpecs($row); return parent::set($entity_guid, $name, $value); }
/** * Check if there already is an ElggUpgrade for this upgrade * * @param string $upgrade_id Id in format <plugin_id>:<yyymmddnn> * @return boolean */ public function upgradeExists($upgrade_id) { $upgrade = $this->privateSettings->getEntities(array('type' => 'object', 'subtype' => 'elgg_upgrade', 'private_setting_name' => 'id', 'private_setting_value' => $upgrade_id)); return !empty($upgrade); }