HTML and CSS Reference
In-Depth Information
/**
* Initializes the view
*
* @param $options array Options for the view
* @return void
*/
public function __construct( $options )
{
parent::__construct($options);
$this->model = new Room_Model;
$this->room_id = isset($options[0]) ? (int) $options[0] : 0;
if ($this->room_id===0) {
throw new Exception("Invalid room ID supplied");
}
$this->room = $this->model->get_room_data($this->room_id);
$this->is_presenter = $this->is_presenter();
$this->is_active = (boolean) $this->room->is_active;
}
/**
* Generates the title of the page
*
* @return string The title of the page
*/
public function get_title( )
{
return $this->room->room_name . ' by ' . $this->room->presenter_name;
}
/**
* Loads and outputs the view's markup
*
* @return void
*/
public function output_view( )
{
$view = new View('room');
$view->room_id = $this->room->room_id;
$view->room_name = $this->room->room_name;
$view->presenter = $this->room->presenter_name;
$view->email = $this->room->email;
if (!$this->is_presenter) {
$view->ask_form = $this->output_ask_form();
$view->questions_class = NULL;
} else {
$view->ask_form = NULL;
$view->questions_class = 'presenter';
}
 
Search WWH ::




Custom Search