a1684257
Administrator
first commit
|
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
|
<?php
/**
* Class to maintain actions for node administration
*/
abstract class NodeAction extends CAction
{
/** @var Node */
public $node = null;
/** @var INodeType */
public $nodeType = null;
/** @var string */
public $viewAlias;
public function init()
{
$this->nodeType = NodeTypeHelper::getNodeType($this->node->data_type);
if (!isset($this->viewAlias))
throw new CException('View alias must be set');
else {
$this->viewAlias = 'admin.types.' . $this->node->data_type . '.views.' . $this->viewAlias;
}
}
public function resolveView($view)
{
return $this->viewAlias . '.' . $view;
}
}
|