Changeset 279
- Timestamp:
- 11/17/06 20:36:15
- Files:
-
- trunk/patPortal/Component.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/patPortal/Component.php
r275 r279 21 21 interface patPortal_Interface_Component 22 22 { 23 public function __construct( $request);23 public function __construct($id, $params); 24 24 public function render( $area, patPortal_Request $request, patPortal_Response $response ); 25 25 public function setPage( patPortal_Page $page ); … … 94 94 */ 95 95 protected $boundComponents = array(); 96 96 97 97 /** 98 98 * event manager for all events that occur inside the area … … 108 108 */ 109 109 protected $persist = null; 110 111 110 111 112 112 protected $access = array(); 113 113 114 114 /** 115 115 * create a new component … … 117 117 * @access public 118 118 */ 119 public function __construct( $id, $params)119 public function __construct($id, $params) 120 120 { 121 121 $this->id = $id; … … 137 137 return; 138 138 } 139 139 140 140 $persistance = patPortal_Factory::getPersistence(); 141 141 $persistance->storeComponent($this); 142 142 } 143 143 144 144 /** 145 145 * render the component … … 208 208 return false; 209 209 } 210 210 211 211 /** 212 212 * get the id of the component this component is bound to … … 218 218 return $this->boundToId; 219 219 } 220 220 221 221 /** 222 222 * create the event manager … … 226 226 * @param string 227 227 * @return boolean 228 */ 228 */ 229 229 public function createEventManager(patPortal_EventManager $container) 230 230 { … … 242 242 return $this->eventManager; 243 243 } 244 244 245 245 /** 246 246 * do some lazy initialization … … 275 275 } 276 276 } 277 277 278 278 /** 279 279 * string representation of the component … … 307 307 $this->boundComponents = array(); 308 308 $this->boundTo = null; 309 309 310 310 return true; 311 311 } … … 322 322 return true; 323 323 } 324 324 325 325 /** 326 326 * set the persistence mode … … 339 339 * 340 340 * @return string 341 */ 341 */ 342 342 public function getPersist() 343 343 { 344 344 return $this->persist; 345 345 } 346 347 /** 348 * get the unique id of the component 346 347 /** 348 * get the unique id of the component 349 349 * 350 350 * @return string … … 354 354 return $this->id; 355 355 } 356 356 357 357 public function setAccess($access) { 358 358 $this->access = $access; 359 359 } 360 360 361 361 /** 362 362 * Checks, whether the current component can be accessed by the user
