Commit 6b5063837c82a6127175d90d5f775df1aebc8a6e

Authored by nbm
1 parent cd80f029

Add setDispatcher for portlets, so that portlets can get their hands on

context for decisions on how to display themselves.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4046 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 5 additions and 17 deletions
lib/widgets/portlet.inc.php
... ... @@ -24,6 +24,10 @@ class KTPortlet {
24 24 function render() {
25 25 return '<p class="ktError">Warning: Abstract Portlet created.</p>';
26 26 }
  27 +
  28 + function setDispatcher(&$oDispatcher) {
  29 + $this->oDispatcher =& $oDispatcher;
  30 + }
27 31 }
28 32  
29 33  
... ... @@ -90,20 +94,4 @@ class KTActionPortlet extends KTPortlet {
90 94 }
91 95 }
92 96  
93   -class KTSearchPortlet extends KTPortlet {
94   -
95   - function KTSearchPortlet() {
96   - parent::KTPortlet("Search");
97   - }
98   - function render() {
99   - $oTemplating = new KTTemplating;
100   - $oTemplate = $oTemplating->loadTemplate("kt3/portlets/search_portlet");
101   - $aTemplateData = array(
102   - "context" => $this,
103   - );
104   -
105   - return $oTemplate->render($aTemplateData);
106   - }
107   -}
108   -
109   -?>
110 97 \ No newline at end of file
  98 +?>
... ...