public static function prepareInfoForTab(FlightTripElement $flight) { $from = City::getCityByPk($flight->departureCity); $to = City::getCityByPk($flight->arrivalCity); $tab = array(); $tab['info'] = array('type' => 'flight', 'flights' => array()); $tab['id'] = $flight->id . '_tab'; $tab['groupId'] = $flight->getGroupId(); $tab['label'] = '<b>Перелёт</b>'; if ($flight->flightVoyage) { $controller = Yii::app()->controller; $tab['content'] = $controller->renderPartial('//tour/constructor/_chosen_flight_precompiled', array('flight' => $flight->flightVoyage->getJsonObject()), true); $tab['fill'] = true; $tab['itemOptions']['class'] = 'flight fill'; } else { $tab['content'] = 'loading...'; //VarDumper::dumpAsString($flight->getPassports(), 10, true); $tab['itemOptions']['class'] = 'flight unfill'; $tab['fill'] = false; } return $tab; }