Phundament-Packages
[ class tree: Phundament-Packages ] [ index: Phundament-Packages ] [ all elements ]

Source for file LActiveContent.php

Documentation is available at LActiveContent.php

  1. <?php
  2. /**
  3.  * LContentBrick class file.
  4.  *
  5.  * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
  6.  * @copyright 2005, diemeisterei GmbH. All rights reserved.
  7.  * @author $Author: schmunk $
  8.  * @version $Revision: 313 $  $Date: 2006-07-30 21:04:58 +0000 (So, 30 Jul 2006) $
  9.  * @package Phundament.Packages
  10.  * @subpackage LContent
  11.  */
  12.  
  13. /**
  14.  * Displays a brick with one item from LContent
  15.  *
  16.  * @package System.Web.UI.ActiveControls
  17.  */
  18.  
  19. class LActiveContent extends TTemplateControl
  20. {
  21.     public function setContentId($value)
  22.     {
  23.         $this->setViewState("ContentId"$value);
  24.     }
  25.     public function getContentId()
  26.     {
  27.         return $this->getViewState("ContentId");
  28.     }
  29.  
  30.     /**
  31.      * prepares admin or content, depending on panel
  32.      */
  33.     public function onPreRender($param)
  34.     {
  35.         parent :: onPreRender($param);
  36.  
  37.         $criterianew Criteria;
  38.         $criteria->add(LContentPeer :: ID$this->ContentId);
  39.         $co LContentCore :: queryRecords($criteria);
  40.         $item $co[0];
  41.         #echo $this->ContentId;
  42.         #var_dump($co);
  43.         #echo $item->getId();
  44.         $this->Headline->Text $item->getHeadline();
  45.         #$this->Headline->OnCallBack = $item->getHeadline();
  46.     }
  47.  
  48.      function insertBrick($sender$param)
  49.     {
  50.         $xPrado :: createComponent("Lithron.LContent.LActiveContent");
  51.         $x->setId(uniqid("AJAX_"));
  52.         #echo $sender->CustomData;
  53.         #$x->Size= $sender->NamingContainer->findControl("MySize")->SelectedValue;
  54.         $this->Page->popPanel->getControls()->add($x);
  55.         $x->setContentId($this->CustomData);
  56.         $this->Page->CallbackClient->appendContent($this->Page->FirstPanel$x);
  57.     }
  58.  
  59.  
  60. }
  61. ?>

Documentation generated on Sun, 25 Feb 2007 16:09:35 +0100 by phpDocumentor 1.3.1