public function DeployHistory() { if ($env = $this->getCurrentEnvironment()) { $history = $env->DeployHistory(); if ($history->count() > 0) { $pagination = new PaginatedList($history, $this->getRequest()); $pagination->setPageLength(4); return $pagination; } } return null; }