getEntities() public method

Also accepts all options available to elgg_get_entities(). Supports the singular option shortcut.
public getEntities ( array $options = [] ) : mixed
$options array Array in format: private_setting_names => null|ARR private setting names private_setting_values => null|ARR metadata values private_setting_name_value_pairs => null|ARR ( name => 'name', value => 'value', 'operand' => '=', ) Currently if multiple values are sent via an array (value => array('value1', 'value2') the pair's operand will be forced to "IN". private_setting_name_value_pairs_operator => null|STR The operator to use for combining (name = value) OPERATOR (name = value); default AND private_setting_name_prefix => STR A prefix to apply to all private settings. Used to namespace plugin user settings or by plugins to namespace their own settings.
return mixed int If count, int. If not count, array. false on errors.
Beispiel #1
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);
 }