Xataface
2.0alpha2
Xataface Application Framework
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
actions
custom.php
Go to the documentation of this file.
1
<?php
12
class
dataface_actions_custom
{
13
function
handle
($params){
14
if
( !isset($params[
'action'
][
'page'
]) ){
15
trigger_error(
16
df_translate(
17
'Page not specified'
,
18
'No page specified at '
.
Dataface_Error::printStackTrace
(),
19
array(
'stack_trace'
=>
Dataface_Error::printStackTrace
())
20
)
21
,
22
E_USER_ERROR
23
);
24
}
else
{
25
$page = $params[
'action'
][
'page'
];
26
}
27
$app
=&
Dataface_Application::getInstance
();
28
$pages =
$app
->getCustomPages();
29
if
(!isset( $pages[$page] ) ){
30
trigger_error(
31
df_translate(
32
'Custom page not found'
,
33
"Request for custom page '$page' failed because page does not exist in pages directory."
.
Dataface_Error::printStackTrace
(),
34
array(
'page'
=>$page,
'stack_trace'
=>
Dataface_Error::printStackTrace
())
35
),
36
E_USER_ERROR
37
);
38
}
39
ob_start();
40
include $pages[$page];
41
$out
= ob_get_contents();
42
ob_end_clean();
43
df_display(array(
'content'
=>
$out
),
'Dataface_Custom_Template.html'
);
44
return
true
;
45
}
46
47
}
48
49
?>
Generated on Fri Mar 22 2013 09:40:33 for Xataface by
1.8.1.2