the task simple, want add type hinting in netbeans can code assist in view files. how right way? example below not work:
/** * @var \zend\paginator\paginator $this->paginator */ $pageoffset = ($this->paginator->getcurrentpagenumber() - 1) * $this->paginator->getitemcountperpage();
this done in phtml
file not php class file.
many ides fail provide type hinting view properties in view files.
one workaround assign property of view class new variable @ top of view file.
/** * @var \zend\paginator\paginator $paginator */ $paginator = $this->paginator;
Comments
Post a Comment