protected function partial($resource, array $data = [])
	{
		if($resource instanceof ViewModelInterface)
		{
			return $this->view->render($resource, true);
		}
	
		return $this->view->render(new ViewModel($this->view->resolveResourcePath($resource), $data), true);
	}
protected function partial($resource, array $data = [])
	{
		if($resource instanceof ViewModelInterface)
		{
			return $this->view->render($resource, true);
		}
	
		return $this->view->render(new ViewModel($this->view->resolveResourcePath($resource), $data), true);
	}
protected function partial ( $ resource , array $ data = [ ] ) { if ( $ resource instanceof ViewModelInterface ) { return $ this -> view -> render ( $ resource , true ) ; } return $ this -> view -> render ( new ViewModel ( $ this -> view -> resolveResourcePath ( $ resource ) , $ data ) , true ) ; }
Render a partial view and return the generated output.

@param string|ViewModelInterface $resource
@param array<string, mixed> $data
Render a partial view and return the generated output .