Controller\Ctdb::getSingle PHP Method

getSingle() public method

Load 1 record
public getSingle ( controller\Base $f3, array $params )
$f3 controller\Base
$params array
    public function getSingle(\Base $f3, $params)
    {
        $this->response->data['SUBPART'] = 'ctdb_edit.html';
        if (isset($params['id'])) {
            $this->resource->load(array('_id = ?', $params['id']));
            if ($this->resource->dry()) {
                $f3->error(404, 'Payload not found');
            }
            $this->response->data['POST'] = $this->resource;
        }
    }