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

Source for file LContainerCore.php

Documentation is available at LContainerCore.php

  1. <?php
  2.  
  3.  
  4. /**
  5.  * class file.
  6.  *
  7.  * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
  8.  * @copyright 2005, diemeisterei GmbH. All rights reserved.
  9.  * @author $Author: schmunk $
  10.  * @version $Revision: 237 $  $Date: 2006-05-31 01:45:51 +0200 (Mi, 31 Mai 2006) $
  11.  * @package Phundament.Packages
  12.  * @subpackage LContainer
  13.  */
  14.  
  15. /**
  16.  * Basic functions for bricks & cell, i.e. search
  17.  *
  18.  * @package System.Util
  19.  * @subpackage Cores
  20.  */
  21.  
  22. if (Prado::getPathOfAlias("LContainer"=== null)
  23. {
  24.     Prado :: setPathOfAlias("LContainer"dirname(__FILE__));
  25.     Prado :: using("LContainer.db.propel.*");
  26.     Prado :: using("LContainer.db.propel.l_container.*");
  27. }
  28. class LContainerCore extends TControl
  29. {
  30.     private $_map;
  31.  
  32.     function __construct()
  33.     {
  34.         $this->buildMapping();
  35.     }
  36.  
  37.     function findPageByBrick($brickClass$brickId)
  38.     {
  39.         #var_dump($this->_map);
  40.         if (isset ($this->_map[$brickClass][$brickId]))
  41.         {
  42.             Prado :: trace(count($this->_map[$brickClass][$brickId]" pages found for {$brickClass} {$brickId}""Lithron.LContainer");
  43.             return ($this->_map[$brickClass][$brickId]);
  44.         }
  45.         else
  46.         {
  47.             Prado :: trace("No pages found {$brickClass} {$brickId}""Lithron.LContainer");
  48.             return null;
  49.         }
  50.  
  51.     }
  52.  
  53.     function buildMapping()
  54.     {
  55.         $conn$this->Application->getModule("database")->getConnection("l_container""propel");
  56.         $cnew Criteria();
  57.         if (!$this->User->isInRole("Root")) $c->add(LContainerBrickPeer :: STATUS1);
  58.         #$c->add(LContainerBrickPeer :: PAGE, $this->Service->getServicePage());
  59.         #$c->addAscendingOrderByColumn(LContainerBrickPeer :: RANK);
  60.         $allLContainerBrickPeer :: doSelect($c$conn);
  61.         foreach ($all AS $record)
  62.         {
  63.             $arrayunserialize(base64_decode($record->getParameters()));
  64.             if (!isset ($array['ContentId']))
  65.                 continue;
  66.             #echo $array['ContentId'];
  67.             #var_dump($array);
  68.             $this->_map[$record->getControl()][$array['ContentId']][]$record->getPage();
  69.         }
  70.     }
  71.  
  72. }
  73. ?>

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