85 lines
1.8 KiB
PHP
85 lines
1.8 KiB
PHP
<?php
|
|
|
|
/** Newsletter Root
|
|
* root for all newsletter elements
|
|
*
|
|
* @version 2.0.0
|
|
* @since 2008-04-07
|
|
*
|
|
*/
|
|
class NewsletterRoot extends CmsObject{
|
|
|
|
|
|
/** C'tor
|
|
*/
|
|
//-----------------------------------------------
|
|
function NewsletterRoot($id, $parent){
|
|
//-----------------------------------------------
|
|
parent::CmsObject($id, $parent);
|
|
$this->name = "Newsletter";
|
|
}
|
|
|
|
|
|
/** @see CmsObject::load()
|
|
*/
|
|
//-----------------------------------------------
|
|
function load($path=array()){
|
|
//-----------------------------------------------
|
|
$this->childObjects = array();
|
|
$id = 50;
|
|
|
|
$t = FlexiconFactory::instanceByClass("NewsletterContainer", $this);
|
|
$t->setId(++$id);
|
|
$this->childObjects[] = $t;
|
|
|
|
$t = FlexiconFactory::instanceByClass("NewsletterMailer", $this);
|
|
$t->setId(++$id);
|
|
$this->childObjects[] = $t;
|
|
|
|
array_shift($path);
|
|
foreach($this->childObjects as $i=>$child){
|
|
$this->childObjects[$i]->load($path);
|
|
}
|
|
}
|
|
|
|
|
|
/** @see CmsObject::printContent()
|
|
*/
|
|
//-----------------------------------------------
|
|
function printContent(){
|
|
//-----------------------------------------------
|
|
$out = "";
|
|
foreach($this->childObjects as $i=>$child){
|
|
if($this->childObjects[$i]->isListable()){
|
|
$out .= $this->childObjects[$i]->printChildContent();
|
|
}
|
|
}
|
|
return $out;
|
|
}
|
|
|
|
|
|
/** @see CmsObject::getCssClass()
|
|
*/
|
|
|
|
//-----------------------------------------------
|
|
function getCssClass(){
|
|
//-----------------------------------------------
|
|
return "itemNewsletter";
|
|
}
|
|
|
|
|
|
// === ADDITIONAL METHODS ================================================================= //
|
|
|
|
|
|
/** sets the id
|
|
* @param id id
|
|
*/
|
|
//-----------------------------------------------
|
|
function setId($id){
|
|
//-----------------------------------------------
|
|
$this->id = $id;
|
|
}
|
|
|
|
};
|
|
|
|
?>
|