Added:
trunk/Classes/Phaux-base/WHMessageDecoration.php
Modified:
trunk/Classes/Phaux-base/WHComponent.php
Log:
Woops added MessageDecoration
Modified: trunk/Classes/Phaux-base/WHComponent.php
==============================================================================
--- trunk/Classes/Phaux-base/WHComponent.php (original)
+++ trunk/Classes/Phaux-base/WHComponent.php Wed Oct 10 06:22:16 2007
@@ -208,7 +208,9 @@
public function restoreParentComponent(){
- $this->parentComponent->restoreSelf();
+ if(is_object($this->parentComponent)){
+ $this->parentComponent->restoreSelf();
+ }
}
public function restoreSelf(){
Added: trunk/Classes/Phaux-base/WHMessageDecoration.php
==============================================================================
--- (empty file)
+++ trunk/Classes/Phaux-base/WHMessageDecoration.php Wed Oct 10
06:22:16 2007
@@ -0,0 +1,20 @@
+<?php
+
+class WHMessageDecoration extends WHDecoration {
+ protected $message;
+
+ public function message(){
+ return $this->message;
+ }
+
+ public function setMessage($aString){
+ $this->message = $aString;
+ return $this;
+ }
+
+ public function renderDecorationOn($html,$parentHtml){
+ return $html->headingLevel(1)->class('message')->with($this->message).
+ $this->renderDecoratedComponentOn($html,$parentHtml);
+
+ }
+}
\ No newline at end of file