protected function getCurrentInstance()
    {
        $instance = $this->getRequest()->getSession()->get('instance');
        
        if($instance) {
            // Update of instance to have last logs created
            $instance = $this->getManager()->find($instance->getId());
        }
        return $instance;
    }
protected function getCurrentInstance()
    {
        $instance = $this->getRequest()->getSession()->get('instance');
        
        if($instance) {
            // Update of instance to have last logs created
            $instance = $this->getManager()->find($instance->getId());
        }
        return $instance;
    }
protected function getCurrentInstance ( ) { $ instance = $ this -> getRequest ( ) -> getSession ( ) -> get ( 'instance' ) ; if ( $ instance ) { // Update of instance to have last logs created $ instance = $ this -> getManager ( ) -> find ( $ instance -> getId ( ) ) ; } return $ instance ; }
Get the current instance if exists

@return mixed
Get the current instance if exists