protected function pointsToArray(array $points) { $names = []; foreach ($points as $item) { $names[] = $item['name']; } return $names; }