Source for file LContentCore.php
Documentation is available at LContentCore.php
* LContentCore class file.
* @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
* @copyright 2005, diemeisterei GmbH. All rights reserved.
* @author $Author: schmunk $
* @version $Revision: 601 $ $Date: 2007-02-24 23:49:30 +0100 (Sa, 24 Feb 2007) $
* @package Phundament.Packages
* Mainly provides database access for LContent database
Prado :: setPathOfAlias("LContent", dirname(__FILE__ ));
Prado :: using("LContent.db.propel.*");
Prado :: using("LContent.db.propel.l_content.*");
const STATUS_PUBLISHED= 3;
* returns records from database
* @param integer,Criteria
* @return LContent object
$this->Application->getModule("database")->getConnection("l_content", "propel");
Prado :: trace("Querying database by id ($c)", "Lithron.LContent");
return LContentPeer :: retrieveByPK($c, $this->Application->getModule("database")->getConnection("l_content", "propel"));
Prado :: trace("Querying database by criteria", "Lithron.LContent");
$result= LContentPeer :: doSelect($c, $this->Application->getModule("database")->getConnection("l_content", "propel"));
* deletes record in database
$c->add(LMetaDataPeer :: OWNER_ID, "lcontent");
$c->add(LMetaDataPeer :: OWNER_RECORD_ID, $id);
LMetaDataPeer :: doDelete($c);
$this->Application->getModule("user_message")->add("Content record #" . $record->getId() . " deleted", 1);
* saves record in database and performs redirect
$record->save($this->Application->getModule("database")->getConnection("l_content", "propel"));
Prado :: trace("LContent record saved", "Lithron.LContent");
$this->Application->getModule("user_message")->add("Content record #" . $record->getId() . " saved", 1);
self :: redirectToList();
* redirects to user to admin or content
$backUrl= $this->Page->getViewState("BackUrl");
$this->Page->setViewState("BackUrl", null);
$url= "packages.LContent.AdminList";
$url= "packages.LContent.AdminList";
Prado :: trace("Redirecting to {$url} ...", "Lithron.LContentCore");
Lithron :: saveLogging($this->Application);
$url= $this->Service->constructUrl($url);
$this->Response->redirect($url);
* returns brick configuration options from application.xml
$val= $this->Application->getParameters()->itemAt($option);
$bricks= split(",", $val);
foreach ($bricks as $brick)
if (@include ($brick . ".php"))
$dummy= Prado :: createComponent($brick); // TODO
$ds[$brick]= $dummy->getDescriptiveName();
Prado :: log("Problem reading php file for: {$brick}", 4, "Lithron.LContent");
Prado :: trace("Configuration option: {$brick}", "Lithron.LContent");
|