public function getAllLatest($count = 10) { $new = array(); $portfolios = PortfolioModel::getLatestPortfolios(); foreach ($portfolios as $item) { $timestamp = $item->get_attribute("OBJ_LAST_CHANGED"); $new[$timestamp] = $item; } $artefacts = Artefacts::getLatestArtefacts(); foreach ($artefacts as $item) { $timestamp = $item->get_attribute("OBJ_LAST_CHANGED"); $new[$timestamp] = $item; } }
public function processData(\IRequestObject $requestObject) { $this->artefacts = \Artefacts::getLatestArtefacts(5); $this->portfolios = \PortfolioModel::getLatestPortfolios(5); $this->newObjects = array_merge($this->artefacts, $this->portfolios); }