Source for file LContentCriteria.php
Documentation is available at LContentCriteria.php
* @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
* @copyright 2005, diemeisterei GmbH. All rights reserved.
* @author $Author: schmunk $
* @version $Revision: 233 $ $Date: 2006-05-30 17:14:13 +0200 (Di, 30 Mai 2006) $
* @package Phundament.Packages
* builts predefined criterias for LContent
$this->_parameters= new TMap;
Prado :: using("LContentCore");
$this->_parameters['SearchString']= $value;
return $this->_parameters['SearchString'];
$this->_parameters['Type']= $value;
return $this->_parameters['Type'];
$this->_parameters['Status']= $value;
return $this->_parameters['Status'];
$this->_parameters['Id']= $value;
return $this->_parameters['Id'];
$this->_parameters['IgnoreCulture']= $value;
return $this->_parameters['IgnoreCulture'];
$this->_parameters['InFuture']= $value;
return $this->_parameters['InFuture'];
* returns the criteria object
if ($param= $this->getId())
$c->addAnd(LContentPeer :: ID, $param);
$c->add(LContentPeer :: CULTURE, strtoupper(Prado :: getApplication()->Globalization->Culture));
$array= Lithron :: createArrayFromString($param);
foreach ($array AS $string)
$c1= $c->getNewCriterion(LContentPeer :: HEADLINE, "%{$string}%", Criteria :: LIKE);
$c2= $c->getNewCriterion(LContentPeer :: SUBLINE, "%{$string}%", Criteria :: LIKE);
$c3= $c->getNewCriterion(LContentPeer :: TYPE, "%{$string}%", Criteria :: LIKE);
$c4= $c->getNewCriterion(LContentPeer :: CATEGORY, "%{$string}%", Criteria :: LIKE);
$c5= $c->getNewCriterion(LContentPeer :: TEXT, "%{$string}%", Criteria :: LIKE);
$c6= $c->getNewCriterion(LContentPeer :: ALIAS, "%{$string}%", Criteria :: LIKE);
$c->add(LContentPeer :: TYPE, $param);
$c->addAnd(LContentPeer :: STATUS, $param);
$c->addAnd(LContentPeer :: START_DATE, date("Y-m-d"), Criteria :: GREATER_EQUAL);
|