1: <?php
2: /**
3: * @package Skeleton
4: */
5: class Skeleton_Block_Example extends Horde_Core_Block
6: {
7: /**
8: */
9: public function __construct($app, $params = array())
10: {
11: parent::__construct($app, $params);
12:
13: $this->_name = _("Example Block");
14: }
15:
16: /**
17: */
18: protected function _params()
19: {
20: return array(
21: 'color' => array(
22: 'type' => 'text',
23: 'name' => _("Color"),
24: 'default' => '#ff0000'
25: )
26: );
27: }
28:
29: /**
30: */
31: protected function _title()
32: {
33: return _("Color");
34: }
35:
36: /**
37: */
38: protected function _content()
39: {
40: $html = '<table width="100" height="100" bgcolor="%s">';
41: $html .= '<tr><td> </td></tr>';
42: $html .= '</table>';
43:
44: return sprintf($html, $this->_params['color']);
45: }
46:
47: }
48: