1 : <?php
2 :
3 0 : class InstructorsController extends Zend_Controller_Action {
4 :
5 : public function init() {
6 0 : $this->_helper->_acl->allow(null);
7 0 : $this->view->instructors = Instructors::findAll();
8 0 : $this->view->site = Zend_Registry::get('config')->site;
9 0 : }
10 :
11 : public function indexAction() {
12 :
13 0 : }
14 :
15 : public function singleAction() {
16 0 : $ident = $this->_getParam('ident');
17 0 : if (!isset($ident))
18 0 : $this->_forward('index');
19 0 : $instructor = Instructors::findByIdentJoinCategoriesWorkshops($ident);
20 0 : if (null === $instructor) {
21 0 : throw new HAJ_Exception_404("Instructor not found." . $ident);
22 : }
23 0 : $path = APPLICATION_PATH . "/../public/images/instructors/$ident/gallery/";
24 0 : if (file_exists($path . 'images.xml')) {
25 0 : $images = new Zend_Config_Xml($path . 'images.xml');
26 0 : $this->view->images = $images->toArray();
27 0 : }
28 0 : $this->view->instructor = $instructor[0];
29 0 : }
30 :
31 : }
32 :
|