-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
test.php
22 lines (21 loc) · 845 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
return array(
'observers.global' => DI\add(array(
array('API.Tour.getChallenges.end', DI\value(function (&$challenges) {
$completeAllChanges = \Piwik\Container\StaticContainer::get('test.vars.completeAllChallenges');
if ($completeAllChanges) {
foreach ($challenges as &$challenge) {
$challenge['isSkipped'] = true;
$challenge['isCompleted'] = true;
}
}
$completeNoChallenge = \Piwik\Container\StaticContainer::get('test.vars.completeNoChallenge');
if ($completeNoChallenge) {
foreach ($challenges as &$challenge) {
$challenge['isSkipped'] = false;
$challenge['isCompleted'] = false;
}
}
})),
))
);