Skip to content

Commit f80b238

Browse files
committed
Merge pull request #4530 from senky/ticket/14557
[ticket/14557] Simplify updating overloaded events for extensions
2 parents 7491578 + 23c6b8c commit f80b238

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

event/data.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,16 @@ public function offsetUnset($offset)
6363
{
6464
unset($this->data[$offset]);
6565
}
66+
67+
/**
68+
* Returns data with updated key in specified offset.
69+
*
70+
* @param string $subarray Data array subarray
71+
* @param string $key Subarray key
72+
* @param mixed $value Value to update
73+
*/
74+
public function update_subarray($subarray, $key, $value)
75+
{
76+
$this->data[$subarray][$key] = $value;
77+
}
6678
}

0 commit comments

Comments
 (0)