MISP/app/Controller/ObjectTemplateElementsContr...

26 lines
694 B
PHP
Raw Permalink Normal View History

2017-07-02 00:05:15 +02:00
<?php
App::uses('AppController', 'Controller');
class ObjectTemplateElementsController extends AppController
{
public $components = array('RequestHandler', 'Session');
2017-07-02 00:05:15 +02:00
public $paginate = array(
'limit' => 60,
'order' => array(
'ObjectTemplateElement.id' => 'desc'
),
'recursive' => -1
);
2017-07-02 00:05:15 +02:00
public function viewElements($id, $context = 'all')
{
$this->paginate['conditions'] = array('ObjectTemplateElement.object_template_id' => $id);
$elements = $this->paginate();
$this->set('list', $elements);
2022-04-28 14:51:21 +02:00
$this->layout = false;
$this->render('ajax/view_elements');
}
2017-07-02 00:05:15 +02:00
}