Commit 82fcc5bba12316a9089567a2e1c74d33d2d43d42

Authored by Neil Blakey-Milner
1 parent 93495113

Move the search portlet into the plugins architecture.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4048 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 25 additions and 0 deletions
plugins/ktcore/KTPortlets.php 0 → 100644
  1 +<?php
  2 +
  3 +require_once(KT_LIB_DIR . '/actions/portletregistry.inc.php');
  4 +require_once(KT_LIB_DIR . '/widgets/portlet.inc.php');
  5 +
  6 +$oPRegistry =& KTPortletRegistry::getSingleton();
  7 +
  8 +class KTSearchPortlet extends KTPortlet {
  9 +
  10 + function KTSearchPortlet() {
  11 + parent::KTPortlet("Search");
  12 + }
  13 + function render() {
  14 + $oTemplating = new KTTemplating;
  15 + $oTemplate = $oTemplating->loadTemplate("kt3/portlets/search_portlet");
  16 + $aTemplateData = array(
  17 + "context" => $this,
  18 + );
  19 +
  20 + return $oTemplate->render($aTemplateData);
  21 + }
  22 +}
  23 +
  24 +$oPRegistry->registerPortlet('browse', 'KTSearchPortlet', 'ktcore.portlets.search', '/plugins/ktcore/KTPortlets.php');
  25 +
... ...