summaryrefslogtreecommitdiffstats
path: root/application/modules/backend/controllers/BootmediaController.php
blob: 1e0de8cbc8a9969823bc49ac87563a9f2d70055d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php

class Backend_BootmediaController extends Zend_Controller_Action
{
    private $_mbootmedia;
    private $_logger;

    public function init()
    {
        $this->_helper->layout->disableLayout();
        #$this->_helper->viewRenderer->setNoRender();

        $this->_mbootmedia = new Model_Bootmedia();


        $this->_logger = new Zend_Log();
        $w = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../data/debug.log');

        $this->_logger->addWriter($w);
    }

    public function indexAction()
    {
        // action body
    }

    public function delAction()
    {
        $this->_helper->viewRenderer->setNoRender();

        $id = $this->getRequest()->getParam("id");

        $w = $this->_mbootmedia->getAdapter()->quoteInto('id = ?', $id);
        $this->_mbootmedia->delete($w);
    }

    public function listAction()
    {
        $data = $this->_mbootmedia->fetchAll()->toArray();
        $this->view->listdata = $data;
    }


}