1 | <?php |
||
39 | class ChameleonTemplate extends BaseTemplate { |
||
40 | |||
41 | /** |
||
42 | * Outputs the entire contents of the page |
||
43 | */ |
||
44 | 1 | public function execute() { |
|
45 | |||
46 | 1 | $this->getSkin()->getComponentFactory()->setSkinTemplate( $this ); |
|
47 | $this->getSkin()->addSkinModulesToOutput(); |
||
48 | $this->set( 'bottomscripts', $this->getSkin()->bottomScripts() ); |
||
49 | |||
50 | // output the head element |
||
51 | // The headelement defines the <body> tag itself, it shouldn't be included in the html text |
||
52 | // To add attributes or classes to the body tag override addToBodyAttributes() in SkinChameleon |
||
53 | $this->html( 'headelement' ); |
||
54 | echo $this->getSkin()->getComponentFactory()->getRootComponent()->getHtml(); |
||
55 | $this->printTrail(); |
||
56 | echo "</body>\n</html>"; |
||
57 | |||
58 | } |
||
59 | |||
60 | /** |
||
61 | * Overrides method in parent class that is unprotected against non-existent indexes in $this->data |
||
62 | * |
||
63 | * @param string $key |
||
64 | * |
||
65 | * @return string|void |
||
66 | */ |
||
67 | function html( $key ) { |
||
70 | |||
71 | /** |
||
72 | * Get the Skin object related to this object |
||
73 | * |
||
74 | * @return SkinChameleon |
||
75 | */ |
||
76 | 1 | public function getSkin() { |
|
79 | |||
80 | /** |
||
81 | * @param \DOMElement $description |
||
82 | * @param int $indent |
||
83 | * @param string $htmlClassAttribute |
||
84 | * |
||
85 | * @throws \MWException |
||
86 | * @return \Skins\Chameleon\Components\Container |
||
87 | */ |
||
88 | public function getComponent( \DOMElement $description, $indent = 0, $htmlClassAttribute = '' ) { |
||
91 | |||
92 | /** |
||
93 | * Generates a list item for a navigation, portlet, portal, sidebar... list |
||
94 | * |
||
95 | * Overrides the parent function to ensure ids are unique. |
||
96 | * |
||
97 | * @param $key string, usually a key from the list you are generating this link from. |
||
98 | * @param $item array, of list item data containing some of a specific set of keys. |
||
99 | * |
||
100 | * The "id" and "class" keys will be used as attributes for the list item, |
||
101 | * if "active" contains a value of true a "active" class will also be appended to class. |
||
102 | * |
||
103 | * @param $options array |
||
104 | * |
||
105 | * @return string |
||
106 | */ |
||
107 | function makeListItem( $key, $item, $options = array() ) { |
||
119 | } |
||
120 |