protected function returnData($data)
    {
        if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false) {
            $this->returnJson([
                'success' => true,
                'data' => $data,
            ]);
        } else {
            $this->setData('breadcrumbs', $data);
            $this->setView('blocks/breadcrumbs.tpl', 'tao');
        }
    }
protected function returnData($data)
    {
        if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false) {
            $this->returnJson([
                'success' => true,
                'data' => $data,
            ]);
        } else {
            $this->setData('breadcrumbs', $data);
            $this->setView('blocks/breadcrumbs.tpl', 'tao');
        }
    }
protected function returnData ( $ data ) { if ( isset ( $ _SERVER [ 'HTTP_ACCEPT' ] ) && strpos ( $ _SERVER [ 'HTTP_ACCEPT' ] , 'application/json' ) !== false ) { $ this -> returnJson ( [ 'success' => true , 'data' => $ data , ] ) ; } else { $ this -> setData ( 'breadcrumbs' , $ data ) ; $ this -> setView ( 'blocks/breadcrumbs.tpl' , 'tao' ) ; } }
Sends the data to the client using the preferred format
@param $data
Sends the data to the client using the preferred format