engine/lib/private_settings.php File Reference

Go to the source code of this file.

Namespaces

namespace  Elgg::Core
 

Activate a plugin or plugins.


Functions

 elgg_get_entities_from_private_settings (array $options=array())
 Returns entities based upon private settings.
 elgg_get_entity_private_settings_where_sql ($table, $names=NULL, $values=NULL, $pairs=NULL, $pair_operator= 'AND', $name_prefix= '')
 Returns private setting name and value SQL where/join clauses for entities.
 get_private_setting ($entity_guid, $name)
 Gets a private setting for an entity.
 get_all_private_settings ($entity_guid)
 Return an array of all private settings.
 set_private_setting ($entity_guid, $name, $value)
 Sets a private setting for an entity.
 remove_private_setting ($entity_guid, $name)
 Deletes a private setting for an entity.
 remove_all_private_settings ($entity_guid)
 Deletes all private settings for an entity.

Function Documentation

elgg_get_entities_from_private_settings ( array $  options = array()  ) 

Returns entities based upon private settings.

Also accepts all options available to elgg_get_entities(). Supports the singular option shortcut.

See also:
elgg_get_entities
Parameters:
array $options 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.

Returns:
mixed int If count, int. If not count, array. false on errors.
Since:
1.8.0

Definition at line 44 of file private_settings.php.

elgg_get_entity_private_settings_where_sql ( table,
names = NULL,
values = NULL,
pairs = NULL,
pair_operator = 'AND',
name_prefix = '' 
)

Returns private setting name and value SQL where/join clauses for entities.

Parameters:
string $table Entities table name
array|null $names Array of names
array|null $values Array of values
array|null $pairs Array of names / values / operands
string $pair_operator Operator for joining pairs where clauses
string $name_prefix A string to prefix all names with
Returns:
array
Since:
1.8.0 private

Definition at line 100 of file private_settings.php.

get_all_private_settings ( entity_guid  ) 

Return an array of all private settings.

Parameters:
int $entity_guid The entity GUID
Returns:
array|false
See also:
set_private_setting()
get_private_settings()
remove_private_setting()
remove_all_private_settings() http://docs.elgg.org/DataModel/Entities/PrivateSettings

Definition at line 308 of file private_settings.php.

get_private_setting ( entity_guid,
name 
)

Gets a private setting for an entity.

Plugin authors can set private data on entities. By default private data will not be searched or exported.

Definition at line 276 of file private_settings.php.

remove_all_private_settings ( entity_guid  ) 

Deletes all private settings for an entity.

Parameters:
int $entity_guid The Entity GUID
Returns:
bool
See also:
get_private_setting()
get_all_private_settings()
set_private_setting()
remove_private_settings() http://docs.elgg.org/DataModel/Entities/PrivateSettings

Definition at line 402 of file private_settings.php.

remove_private_setting ( entity_guid,
name 
)

Deletes a private setting for an entity.

Parameters:
int $entity_guid The Entity GUID
string $name The name of the setting
Returns:
bool
See also:
get_private_setting()
get_all_private_settings()
set_private_setting()
remove_all_private_settings() http://docs.elgg.org/DataModel/Entities/PrivateSettings

Definition at line 373 of file private_settings.php.

set_private_setting ( entity_guid,
name,
value 
)

Sets a private setting for an entity.

Parameters:
int $entity_guid The entity GUID
string $name The name of the setting
string $value The value of the setting
Returns:
bool
See also:
get_private_setting()
get_all_private_settings()
remove_private_setting()
remove_all_private_settings() http://docs.elgg.org/DataModel/Entities/PrivateSettings

Definition at line 345 of file private_settings.php.

 All Classes Namespaces Files Functions Variables Enumerations
Generated on Thu May 23 00:01:42 2013 for Elgg by  doxygen 1.6.3