Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianX committed Jun 30, 2011
1 parent d3ef60b commit bac3904
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
Expand Up @@ -23,9 +23,9 @@ public function init(){
else {
//Load timtable navigation from REST

$service = new Default_Model_Class();
$model = new Default_Model_Class();
$filterParmas = array('classType' => 'Class');
$classes = $service->fetchAll($filterParmas);
$classes = $model->fetchAll($filterParmas);
$i = 0;
foreach ($classes as $class){
$configArray[$i]['label'] = $class->title;
Expand Down
22 changes: 22 additions & 0 deletions application/modules/default/models/Class.php
Expand Up @@ -24,6 +24,10 @@ class Default_Model_Class
* @var string
*/
protected $_classType;
/**
* @var array Default_Model_Class
*/
protected $_subClasses;
/**
* @var Default_Model_Mapper_ClassRestMapper
*/
Expand Down Expand Up @@ -194,4 +198,22 @@ public function fetchAll (array $filterParams = array())
{
return $this->getMapper()->fetchAll($filterParams);
}
/**
* @return array Default_Model_Class
*/
public function getSubClasses ()
{
return $this->_subClasses;
}

/**
* @param array $_subClasses
* @return Default_Model_Class
*/
public function setSubClasses ($_subClasses)
{
$this->_subClasses = $_subClasses;
return $this;
}

}
Expand Up @@ -87,8 +87,7 @@ public function save (Default_Model_Comment $comment)
'content' => $comment->getContent(),
'creationDate' => date('Y-m-d H:i:s'),
'news' => array ('news_id' => (int)$comment->getNews_id()),
// TODO switch fhs_id in the DB
'owner' => array ( "fhs_id" => 'schuhmann'/*$comment->getOwner()->getFhs_id()*/)
'owner' => array ( "fhs_id" => $comment->getOwner()->getFhs_id()) // this fhs_id musst be in the DB! or no comment will saved
));

$params = array('responseType' => 'json',
Expand Down

0 comments on commit bac3904

Please sign in to comment.