HTML and CSS Reference
In-Depth Information
Add the following bold code to the Room controller:
return $view->render(FALSE);
}
return NULL;
}
/**
* Loads and formats the questions for this room
*
* @return string The marked up questions
*/
protected function output_questions( )
{
$controller = new Question(array($this->room_id));
// Allows for different output for presenters vs. attendees
$controller->is_presenter = $this->is_presenter;
return $controller->output_view();
}
/**
* Determines whether or not the current user is the presenter
*
* @return boolean TRUE if it's the presenter, otherwise FALSE
*/
protected function is_presenter( )
{
Building the Room Model
Because the app needs to store and manipulate room data, you'll need to create a model for rooms, called
Room_Model . This will be stored in the system/models/ subdirectory in a file called class.room_model.inc.php .
Create the file and start it out with this basic class definition:
<?php
/**
* Creates database interaction methods for rooms
*
* @author Jason Lengstorf <jason@lengstorf.com>
* @author Phil Leggetter <phil@leggetter.co.uk>
*/
class Room_Model extends Model
{
}
 
Search WWH ::




Custom Search