Elgg
Version 2.3
|
Go to the source code of this file.
Namespaces | |
Elgg\Core | |
Activate a plugin or plugins. | |
Functions | |
elgg_get_metastring_id ($string, $case_sensitive=true) | |
Gets the metastring identifier for a value. More... | |
elgg_get_metastring_map (array $strings) | |
Get a map of strings to their metastring identifiers (case sensitive matches) More... | |
_elgg_get_metastring_based_objects ($options) | |
Returns an array of either or objects. More... | |
_elgg_get_metastring_sql ($table, $names=null, $values=null, $pairs=null, $ids=null, $case_sensitive=false) | |
Returns an array of joins and wheres for use in metastrings. More... | |
_elgg_normalize_metastrings_options (array $options=array()) | |
Normalizes metadata / annotation option names to their corresponding metastrings name. More... | |
_elgg_set_metastring_based_object_enabled_by_id ($id, $enabled, $type) | |
Enables or disables a metastrings-based object by its id. More... | |
_elgg_batch_metastring_based_objects (array $options, $callback, $inc_offset=true) | |
Runs metastrings-based objects found using $options through $callback. More... | |
_elgg_get_metastring_based_object_from_id ($id, $type) | |
Returns a singular metastring-based object by its ID. More... | |
_elgg_delete_metastring_based_object_by_id ($id, $type) | |
Deletes a metastring-based object by its id. More... | |
_elgg_entities_get_metastrings_options ($type, $options) | |
Returns options to pass to elgg_get_entities() for metastrings operations. More... | |
_elgg_metastrings_test ($hook, $type, $value) | |
Metastring unit tests. More... | |
Variables | |
return | function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks) |
_elgg_batch_metastring_based_objects | ( | array | $options, |
$callback, | |||
$inc_offset = true |
|||
) |
Runs metastrings-based objects found using $options through $callback.
array | $options | An options array. _elgg_get_metastring_based_objects() |
string | $callback | The callback to pass each result through |
bool | $inc_offset | Increment the offset? Pass false for callbacks that delete / disable |
Definition at line 596 of file metastrings.php.
_elgg_delete_metastring_based_object_by_id | ( | $id, | |
$type | |||
) |
Deletes a metastring-based object by its id.
int | $id | The object's ID |
string | $type | The object's metastring type: annotation or metadata |
Definition at line 641 of file metastrings.php.
_elgg_entities_get_metastrings_options | ( | $type, | |
$options | |||
) |
Returns options to pass to elgg_get_entities() for metastrings operations.
string | $type | Metastring type: annotation or metadata |
array | $options | Options |
Definition at line 694 of file metastrings.php.
_elgg_get_metastring_based_object_from_id | ( | $id, | |
$type | |||
) |
Returns a singular metastring-based object by its ID.
int | $id | The metastring-based object's ID |
string | $type | The type: annotation or metadata |
Definition at line 613 of file metastrings.php.
_elgg_get_metastring_based_objects | ( | $options | ) |
Returns an array of either or objects.
Accepts all elgg_get_entities() options for entity restraints.
array | $options | Array in format: metastring_names => null|ARR metastring names metastring_values => null|ARR metastring values metastring_ids => null|ARR metastring ids metastring_case_sensitive => BOOL Overall Case sensitive |
metastring_owner_guids => null|ARR Guids for metadata owners
metastring_created_time_lower => INT Lower limit for created time.
metastring_created_time_upper => INT Upper limit for created time.
metastring_calculation => STR Perform the MySQL function on the metastring values returned. This differs from egef_annotation_calculation in that it returns only the calculation of all annotation values. You can sum, avg, count, etc. egef_annotation_calculation() returns ordered by a calculation on their annotation values.
metastring_type => STR metadata or annotation(s)
Definition at line 79 of file metastrings.php.
_elgg_get_metastring_sql | ( | $table, | |
$names = null , |
|||
$values = null , |
|||
$pairs = null , |
|||
$ids = null , |
|||
$case_sensitive = false |
|||
) |
Returns an array of joins and wheres for use in metastrings.
string | $table | The annotation or metadata table name or alias |
array | $names | An array of names |
array | $values | An array of values |
array | $pairs | Name / value pairs. Not currently used. |
array | $ids | Metastring IDs |
bool | $case_sensitive | Should name and values be case sensitive? |
Definition at line 375 of file metastrings.php.
_elgg_metastrings_test | ( | $hook, | |
$type, | |||
$value | |||
) |
Metastring unit tests.
string | $hook | unit_test |
string | $type | system |
array | $value | Array of other tests |
Definition at line 755 of file metastrings.php.
_elgg_normalize_metastrings_options | ( | array | $options = array() | ) |
Normalizes metadata / annotation option names to their corresponding metastrings name.
array | $options | An options array |
Definition at line 483 of file metastrings.php.
_elgg_set_metastring_based_object_enabled_by_id | ( | $id, | |
$enabled, | |||
$type | |||
) |
Enables or disables a metastrings-based object by its id.
int | $id | The object's ID |
string | $enabled | Value to set to: yes or no |
string | $type | Metastring type: metadata or annotation |
InvalidParameterException | private |
Definition at line 536 of file metastrings.php.
elgg_get_metastring_id | ( | $string, | |
$case_sensitive = true |
|||
) |
Gets the metastring identifier for a value.
Elgg normalizes the names and values of annotations and metadata. This function provides the identifier used as the index in the metastrings table. Plugin developers should only use this if denormalizing names/values for performance reasons (to avoid multiple joins on the metastrings table).
string | $string | The value |
bool | $case_sensitive | Should the retrieval be case sensitive? If not, there may be more than one result |
Definition at line 25 of file metastrings.php.
elgg_get_metastring_map | ( | array | $strings | ) |
Get a map of strings to their metastring identifiers (case sensitive matches)
If you need several metastring IDs at once, use this to get a an array of them instead of calling elgg_get_metastring_id() several times.
string[] | $strings Strings to look up |
Definition at line 40 of file metastrings.php.
return function(\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks) |
Definition at line 761 of file metastrings.php.