Private settings provide metadata like storage of settings for plugins and users. WARNING: API IN FLUX. DO NOT USE DIRECTLY.
Since: 2.0.0
Example #1
0
 /**
  * {@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);
 }
Example #2
0
 /**
  * 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);
 }