48 return $svc->count($register);
51 return $svc->dumpRegister($register);
56 $set = $svc->loadRegisters();
57 if (!isset($set->{$register})) {
58 $set->{$register} = [];
61 $set->{$register}[] = $str;
63 $svc->saveRegisters($set);
110 if (empty(
$options[
'__bypass_notice'])) {
111 $msg = __FUNCTION__ .
' is deprecated. Use elgg_get_river() and call delete() on the returned item(s)';
113 $msg .=
'. You must use the "wheres" option to specify value(s) for the "rv.view" column.';
143 $singulars = array(
'id',
'subject_guid',
'object_guid',
'target_guid',
'annotation_id',
'action_type',
'view',
'type',
'subtype');
158 if (
$options[
'posted_time_lower'] && is_int(
$options[
'posted_time_lower'])) {
159 $wheres[] =
"rv.posted >= {$options['posted_time_lower']}";
162 if (
$options[
'posted_time_upper'] && is_int(
$options[
'posted_time_upper'])) {
163 $wheres[] =
"rv.posted <= {$options['posted_time_upper']}";
168 foreach ($wheres as $i => $where) {
169 if ($where ===
false) {
171 } elseif (empty($where)) {
177 $wheres = array_unique($wheres);
179 $query =
"DELETE rv.* FROM {$CONFIG->dbprefix}river rv ";
182 $joins = array_unique(
$options[
'joins']);
185 foreach ($joins as $j) {
192 foreach ($wheres as $w) {
193 $query .=
" $w AND ";
_elgg_river_get_action_where_sql($types)
Get the where clause based on river action type strings.
row_to_elggrelationship($row)
Convert a database row to a new .
_elgg_river_get_view_where_sql($views)
Get the where clause based on river view strings.
delete_data($query, array $params=[])
Remove a row from the database.
_elgg_delete_river(array $options=[])
Alias of elgg_delete_river() that doesn't raise notices.
_elgg_get_guid_based_where_sql($column, $guids)
Returns SQL where clause for owner and containers.
const ELGG_ENTITIES_ANY_VALUE
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
elgg global
Pointer to the global context.
system_messages($message=null, $register="success", $count=false)
Queues a message to be displayed.
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
_elgg_normalize_plural_options_array($options, $singulars)
Normalise the singular keys in an options array to plural keys.
elgg_delete_river(array $options=array())
Delete river items.
_elgg_get_river_type_subtype_where_sql($table, $types, $subtypes, $pairs)
Returns SQL where clause for type and subtype on river table.