0
여러 하위 모듈이 구현 된 팔콘 앱이 있습니다. 폴더 구조는 다음과 같습니다.여러보기 디렉토리가있는보기 렌더링
root
app
controllers
models
views
modules
restaurants
controllers
models
views
tables
controllers
models
views
chairs
controllers
models
views
public
views 디렉토리는 modules 폴더를 가리 킵니다. 이 방법으로, 내가보기를 선택해야 할 때 나는 단지 할 수 있습니다 : $this->view->pick('tables/views/index')
.
내 문제는보기를 렌더링 할 때 (예 : 순수한 HTML을 문자열로 가져 오는 것), 그렇게 할 수없는 것 같습니다.
$this->view->disable();
$this->view->pick('restaurants/views/pdf');
$html = $this->view->getContent();
$html = utf8_encode($html);
$pdf = new mPDF();
$pdf->WriteHTML($html);
$pdf->SetTitle('This is a test');
$pdf->Output('test.pdf', "I");
나는 이것을 할 수 있습니까?
https://docs.phalconphp.com/en/latest/reference/views.html#stand-alone-component – Timothy