src/Listener/ApiQueryLogListener.php
public function beforeRender(Event $event)
    {
        if (!Configure::read('debug')) {
            return;
        }

        $this->_action()->setConfig('serialize.queryLog', 'queryLog');
        $this->_controller()->set('queryLog', $this->_getQueryLogs());
    }
public function beforeRender(Event $event)
    {
        if (!Configure::read('debug')) {
            return;
        }

        $this->_action()->setConfig('serialize.queryLog', 'queryLog');
        $this->_controller()->set('queryLog', $this->_getQueryLogs());
    }
public function beforeRender ( Event $ event ) { if ( ! Configure :: read ( 'debug' ) ) { return ; } $ this -> _action ( ) -> setConfig ( 'serialize.queryLog' , 'queryLog' ) ; $ this -> _controller ( ) -> set ( 'queryLog' , $ this -> _getQueryLogs ( ) ) ; }
Appends the query log to the JSON or XML output

@param \Cake\Event\Event $event Event
@return void
Appends the query log to the JSON or XML output