set('articles', [ ['title' => 'Lorem ipsum', 'body' => 'dolorem sit amet'], ['title' => 'Usectetur adipiscing eli', 'body' => 'tortor, in tincidunt sem dictum vel'], ['title' => 'Topis semper blandit eu non', 'body' => 'alvinar diam convallis non. Nullam pu'], ['title' => 'Suspendisse gravida neque', 'body' => 'pellentesque sed scelerisque libero'], ]); } /** * Renders a view using a different template than the action name * The template is set using the ``Cell::$template`` property * * @return void */ public function customTemplate() { $this->template = 'alternate_teaser_list'; } /** * Renders a view using a different template than the action name * The template is set using the ViewBuilder bound to the Cell * * @return void */ public function customTemplateViewBuilder() { $this->counter++; $this->viewBuilder()->setTemplate('alternate_teaser_list'); } /** * Renders a template in a custom templatePath * The template is set using the ViewBuilder bound to the Cell * * @return void */ public function customTemplatePath() { $this->viewBuilder()->setTemplatePath('Cell/Articles/Subdir'); } /** * Simple echo. * * @param string $msg1 * @param string $msg2 * @return void */ public function doEcho($msg1, $msg2) { $this->set('msg', $msg1 . $msg2); } }