blob: 05d148c6cbf42d55fdc5584ecaa20a1f57530bf7 (
plain)
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
|
<?php
Prado::using('Application.facades.Facade');
Prado::using('Application.web.TemplateControl');
class FacadeTemplateControl extends TemplateControl {
public function setFacade(Facade $facade) {
$this->setControlState('Facade', $facade);
}
public function getFacade() {
return $this->getControlState('Facade');
}
public function onPreRender($param) {
parent::onPreRender($param);
if (!$this->getFacade()) {
throw new TInvalidDataValueException(
'FacadeTemplateControl requires a Facade instance'
);
}
}
}
?>
|