-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapp_error.php
More file actions
50 lines (44 loc) · 1 KB
/
app_error.php
File metadata and controls
50 lines (44 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* App error class.
*
* @copyright Copyright 2010, *ROCK*HARBOR
* @link http://rockharbor.org *ROCK*HARBOR
* @package core
* @subpackage core.app
*/
/**
* App Error
*
* @package core
* @subpackage core.app
*/
class AppError extends ErrorHandler {
/**
* Force using limited layout for errors
*
* @param string $template Template to render
*/
public function _outputMessage($template) {
$this->controller->layout = 'ajax';
parent::_outputMessage($template);
}
/**
* Error shown when a user tries to access a private item
*
* @param array $params
*/
public function privateItem($params = array()) {
$this->controller->set('type', $params['type']);
$this->_outputMessage('private_item');
}
/**
* Error shown when a user tries to perform an action with no items selected
* or a missing search
*
* @param array $params
*/
public function invalidMultiSelectSelection($params = array()) {
$this->_outputMessage('invalid_multiselect_selection');
}
}