2012-08-06 10:42:46 +02:00
|
|
|
<?php
|
|
|
|
App::uses('AppController', 'Controller');
|
2013-01-04 15:49:52 +01:00
|
|
|
|
2022-10-22 15:47:08 +02:00
|
|
|
/**
|
|
|
|
* @property AdminCrudComponent $AdminCrud
|
|
|
|
*/
|
2020-09-01 15:59:38 +02:00
|
|
|
class AllowedlistsController extends AppController
|
2018-07-19 11:48:22 +02:00
|
|
|
{
|
|
|
|
public $components = array(
|
|
|
|
'AdminCrud'
|
|
|
|
);
|
|
|
|
|
|
|
|
public $paginate = array(
|
2022-10-22 15:47:08 +02:00
|
|
|
'limit' => 60,
|
|
|
|
'order' => array(
|
|
|
|
'Allowedlist.name' => 'ASC'
|
|
|
|
)
|
2018-07-19 11:48:22 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
public function admin_add()
|
|
|
|
{
|
2021-04-29 15:42:05 +02:00
|
|
|
$this->set('action', 'add');
|
2018-07-19 11:48:22 +02:00
|
|
|
$this->AdminCrud->adminAdd();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function admin_index()
|
|
|
|
{
|
|
|
|
$this->AdminCrud->adminIndex();
|
2021-04-29 15:42:05 +02:00
|
|
|
$this->render('index');
|
2018-07-19 11:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function admin_edit($id = null)
|
|
|
|
{
|
|
|
|
$this->AdminCrud->adminEdit($id);
|
2021-04-29 15:42:05 +02:00
|
|
|
$this->set('action', 'edit');
|
|
|
|
$this->set('id', $id);
|
|
|
|
$this->render('admin_add');
|
2018-07-19 11:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function admin_delete($id = null)
|
|
|
|
{
|
|
|
|
$this->AdminCrud->adminDelete($id);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function index()
|
|
|
|
{
|
|
|
|
$this->recursive = 0;
|
|
|
|
$this->set('list', $this->paginate());
|
|
|
|
}
|
2016-06-06 10:09:55 +02:00
|
|
|
}
|