
Untitled
By: a guest on
Jul 14th, 2012 | syntax:
None | size: 0.89 KB | hits: 13 | expires: Never
<?php
public function __construct($parent_id = false)
{
$this->article = new Article();
if ($parent_id) {
$this->params = SeriesParamList::getList('article', $parent_id);
$this->article->series_id = $parent_id;
} else {
$criteria = new CDbCriteria;
$criteria->compare('param_class', 'article');
$criteria->compare('param_name', 'status');
$this->params = SeriesParamList::model()->with('values')->findAll($criteria);
}
$this->myParams = new CAttributeCollection;
foreach ($this->params as $thisParam) {
$this->myParams->add($thisParam->param_name, "");
}
$this->articleInfo = new ArticleInfo();
$this->media = new Media();
$this->mediaInfo = new MediaInfo();
$this->photos = array();
$this->photoUploads = array();
$this->photoUpdates = array();
$this->needsTranslation = false;
parent::__construct();
}
?>