Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
modules
fg
controllers
DefaultController.php
1
<?php
2
3
class
DefaultController
extends
Controller
4
{
5
public
function
actionIndex()
6
{
7
$model =
new
FGForms
(
'search'
);
8
$this->render(
'index'
, array(
'model'
=>$model));
9
}
10
11
public
function
actionViewForm($id)
12
{
13
if
(count($_POST))
14
{
15
16
}
17
18
$this->renderText($this->widget(
'fg.widgets.form.FGFormWidget'
, array(
19
'id'
=>$id
20
),
true
));
21
}
22
23
public
function
actionViewJSON($id)
24
{
25
$model = $this->loadModel($id);
26
$this->render(
'viewjson'
, array(
'model'
=>$model));
27
}
28
29
public
function
loadModel($id)
30
{
31
$model=
FGForms::model
()->findByPk($id);
32
if
($model===null)
33
throw
new
CHttpException(404,
'The requested form does not exist'
);
34
return
$model;
35
}
36
}
Generated on Thu Jun 20 2013 14:45:15 for Gentics Portal.Node PHP API by
1.8.1.2