public function sidebarBoxAction() { $items = (int) $this->getParam("items"); if (!$items) { $items = 3; } // this is the alternative way of getting a list of objects $blogList = Object\BlogArticle::getList(["limit" => $items, "order" => "DESC", "orderKey" => "date"]); $this->view->articles = $blogList; }