Controller\Ctdb::viewSingle PHP Method

viewSingle() public method

View Single Item
public viewSingle ( controller\Base $f3, array $params )
$f3 controller\Base
$params array
    public function viewSingle(\Base $f3, $params)
    {
        $this->response->data['SUBPART'] = 'ctdb_view.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;
        }
    }