public function getItemsFromRequest($array) { $items = array(); foreach ($array as $id) { $t = Type::getByID($id); if (is_object($t)) { $type = new \PortlandLabs\Concrete5\MigrationTool\Entity\Export\ConversationRatingType(); $type->setItemId($t->getConversationRatingTypeID()); $items[] = $type; } } return $items; }