1 |
<?php |
---|
2 |
/** |
---|
3 |
* Title Widget class |
---|
4 |
* |
---|
5 |
* @project CWC2 |
---|
6 |
* @revision $Id: Title.widget.php,v 1.5 2005/01/11 12:32:21 pspencer Exp $ |
---|
7 |
* @purpose Title Widget class |
---|
8 |
* @author DM Solutions Group (assefa@dmsolutions.ca) |
---|
9 |
* @copyright |
---|
10 |
* <b>Copyright (c) 2002, DM Solutions Group Inc.</b> |
---|
11 |
* Permission is hereby granted, free of charge, to any person obtaining a |
---|
12 |
* copy of this software and associated documentation files (the "Software"), |
---|
13 |
* to deal in the Software without restriction, including without limitation |
---|
14 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
---|
15 |
* and/or sell copies of the Software, and to permit persons to whom the |
---|
16 |
* Software is furnished to do so, subject to the following conditions: |
---|
17 |
* |
---|
18 |
* The above copyright notice and this permission notice shall be included |
---|
19 |
* in all copies or substantial portions of the Software. |
---|
20 |
* |
---|
21 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
---|
22 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
---|
23 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
---|
24 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
---|
25 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
---|
26 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
---|
27 |
* DEALINGS IN THE SOFTWARE. |
---|
28 |
*/ |
---|
29 |
|
---|
30 |
|
---|
31 |
include_once(dirname(__FILE__)."/../Widget.php"); |
---|
32 |
include_once(dirname(__FILE__)."/../Label.php"); |
---|
33 |
|
---|
34 |
/** |
---|
35 |
* TitleWidget |
---|
36 |
* |
---|
37 |
* @desc Widget to display a title |
---|
38 |
*/ |
---|
39 |
class Title extends CWCWidget |
---|
40 |
{ |
---|
41 |
var $moLabel; |
---|
42 |
|
---|
43 |
/** |
---|
44 |
* Title |
---|
45 |
* |
---|
46 |
* Constructor method for the Title widget. |
---|
47 |
*/ |
---|
48 |
function Title() |
---|
49 |
{ |
---|
50 |
// invoke constructor of parent |
---|
51 |
parent::CWCWidget(); |
---|
52 |
|
---|
53 |
// set the description for this widget |
---|
54 |
$this->szWidgetDescription = <<<EOT |
---|
55 |
TitleWidget is a simple widget that simply creates a label on the output |
---|
56 |
page. It is meant primarily as a sample of how to implement a widget and |
---|
57 |
not necessarily one that would really be used. |
---|
58 |
EOT; |
---|
59 |
|
---|
60 |
$this->moLabel = new CWCLabel($this); |
---|
61 |
$this->mnMaturityLevel = MATURITY_TECHNICALRELEASE; |
---|
62 |
} |
---|
63 |
|
---|
64 |
/** |
---|
65 |
* DrawPublish |
---|
66 |
* |
---|
67 |
* Return the HTML code using the name in the map file and the |
---|
68 |
* parameters of the CWC tag. |
---|
69 |
*/ |
---|
70 |
function DrawPublish() |
---|
71 |
{ |
---|
72 |
$this->moLabel->mszLabel = $this->moMapObject->oMap->name; |
---|
73 |
|
---|
74 |
return $this->moLabel->DrawPublish( "" ); |
---|
75 |
} |
---|
76 |
} |
---|
77 |
?> |
---|