<th class="comments"></th> <?php } ?> </tr> </thead> <tbody> <?php $count = 0; foreach ($transfers as $transfer) { $count++; $player = $transfer->player; // if($className == 'buy' && $transfer->probability != 100) $playerUrl = false; $playerUrl = $player->getUrl(); if (!isset($player)) { $player = new \common\models\Player(); } $playerImage = $player->getAsset(); $probability = $transfer->probability; if (is_numeric($transfer->probability)) { $probability .= '%'; } if (isset($player->amplua)) { $amplua = $player->amplua->abr; } else { $amplua = '-'; } if (isset($transfer->teamFrom)) { $teamFromName = $transfer->teamFrom->name; if ($transfer->teamFrom->getAsset()) { $teamFromIconUrl = $transfer->teamFrom->getAsset()->getFileUrl();
<th class="weight">Вес (кг)</th> <th class="from">Пришел из клуба</th> <th class="year">В году</th> <th class="matches">Матчи</th> <th class="goals">Голы</th> </tr> </thead> <tbody> <?php $count = 0; $amplua = 0; foreach ($composition as $contract) { $count++; $player = $contract->player; if (!isset($player)) { $player = new \common\models\Player(); } $playerImage = $player->getAsset(\common\models\Asset::THUMBNAIL_SMALL); if (!isset($playerImage->id)) { $playerImage = $player->getAsset(); } $country = $player->country; $countryIconUrl = isset($country) ? $country->getAsset()->getFileUrl() : false; $teamFromName = isset($contract->teamFrom) ? $contract->teamFrom->name : '-'; if ($amplua != $contract->amplua->id) { $amplua = $contract->amplua->id; if ($amplua == Amplua::DEFENDER) { ?> <tr><td colspan="11" class="caption">Защитники</td></tr> <?php } else {