improve Moodpics by using a MoodpicAgent
This commit is contained in:
parent
9a02dec0cd
commit
4fa73890d2
74 changed files with 739 additions and 230 deletions
50
controllers/MoodpicController.inc
Normal file
50
controllers/MoodpicController.inc
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* The Legend of Z
|
||||
*
|
||||
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
||||
* @copyright 2014 Heinrich-Heine-Universität Düsseldorf
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @link https://bitbucket.org/coderkun/the-legend-of-z
|
||||
*/
|
||||
|
||||
namespace hhu\z\controllers;
|
||||
|
||||
|
||||
/**
|
||||
* Controller of the MoodpicAgent to display a Moodpic.
|
||||
*
|
||||
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
||||
*/
|
||||
class MoodpicController extends \hhu\z\Controller
|
||||
{
|
||||
/**
|
||||
* Required models
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $models = array();
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Action: index.
|
||||
*/
|
||||
public function index($agentName)
|
||||
{
|
||||
// Seminary moodpic
|
||||
$seminary = SeminaryController::$seminary;
|
||||
$seminaryMoodpicIndex = sprintf('%s_seminarymedia_id', $agentName);
|
||||
|
||||
|
||||
// Pass data to view
|
||||
$this->set('seminary', $seminary);
|
||||
$this->set('seminaryMoodpicIndex', $seminaryMoodpicIndex);
|
||||
$this->set('agentName', $agentName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue