本文整理匯總了PHP中Team::getTeamName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Team::getTeamName方法的具體用法?PHP Team::getTeamName怎麽用?PHP Team::getTeamName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Team
的用法示例。
在下文中一共展示了Team::getTeamName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: team
public static function team(Team $team)
{
$forJSON = array("level" => $team->getLevel(), "experience" => $team->getExperience(), "money" => $team->getMoney(), "realMoney" => $team->getRealMoney(), "studyPoints" => $team->getStudyPoints(), "energy" => $team->getCurrentEnergy(), "energyMax" => floor($team->getEnergyMax()), "trainerId" => $team->getTrainerId(), "teamName" => $team->getTeamName(), "teamLogoId" => $team->getTeamLogoId(), "paramForward" => $team->getParameterForward(), "paramHalf" => $team->getParameterHalf(), "paramSafe" => $team->getParameterSafe(), "isInstalled" => $team->getIsInstalled(), "socialUserId" => $team->getSocialUserId(), "userPhoto" => $team->getUserPhoto(), "userName" => $team->getUserName(), "isInTeam" => $team->getIsInTeam(), "studyPointsViaPrize" => $team->getStudyPointsViaPrize(), "inGroup" => $team->getInGroup(), "counterChoose" => $team->getCounterChoose(), "counterWon" => $team->getCounterWon(), "counterLose" => $team->getCounterLose(), "stadiumId" => $team->getStadiumId(), "needDailyBonus" => $team->isNeedDailyBonus(), "placeCountry" => $team->getPlaceCountry(), "placeCity" => $team->getPlaceCity(), "placeUniversity" => $team->getPlaceUniversity(), "placeVK" => $team->getPlaceVK(), "tourIIIcounter" => $team->getTourIII(), "tourPlaceCountry" => $team->getTourPlaceCountry(), "tourPlaceCity" => $team->getTourPlaceCity(), "tourPlaceUniversity" => $team->getTourPlaceUniversity(), "tourPlaceVK" => $team->getTourPlaceVK(), "tourNotify" => $team->getTourNotify(), "tourBonus" => $team->getTourBonus(), "tourBonusTime" => $team->getTourBonusTime(), "counterChoose" => $team->getCounterChoose(), "counterWon" => $team->getCounterWon(), "counterLose" => $team->getCounterLose(), "totalPlace" => $team->getTotalPlace(), "place" => isset($team->place) ? $team->place : 99);
if (count($team->getFootballers())) {
$forJSON["footballers"] = JSONPrepare::footballers($team->getFootballers());
}
if (count($team->getSponsors())) {
$forJSON["sponsors"] = JSONPrepare::sponsors($team->getSponsors());
}
return $forJSON;
}
示例2: fill_in_additional_detail_fields
function fill_in_additional_detail_fields()
{
// jmorais@dri Bug #56269
parent::fill_in_additional_detail_fields();
// ~jmorais@dri
global $locale;
$query = "SELECT u1.first_name, u1.last_name from users u1, users u2 where u1.id = u2.reports_to_id AND u2.id = '{$this->id}' and u1.deleted=0";
$result = $this->db->query($query, true, "Error filling in additional detail fields");
$row = $this->db->fetchByAssoc($result);
if ($row != null) {
global $locale;
$this->reports_to_name = $locale->formatName('Users', $row);
} else {
$this->reports_to_name = '';
}
// Must set team_id for team widget purposes (default_team is primary team id)
if (empty($this->team_id)) {
$this->team_id = $this->default_team;
}
//set the team info if the team id has already been set.
//running only if team class exists will prevent breakage during upgrade/flavor conversions
if (class_exists('Team')) {
// Set default_team_name for Campaigns WebToLeadCreation
$this->default_team_name = Team::getTeamName($this->team_id);
} else {
//if no team id exists, set the team info to blank
$this->default_team = '';
$this->default_team_name = '';
$this->team_set_id = '';
}
$this->_create_proper_name_field();
}
示例3: initFromRAM
public function initFromRAM(Team $team)
{
$this->socialUserId = $team->getSocialUserId();
$this->setLevel($team->getLevel());
$this->setExperience($team->getExperience());
$this->setMoney($team->getMoney());
$this->setRealMoney($team->getRealMoney());
$this->setStudyPoints($team->getStudyPoints());
$this->setStudyPointsViaPrize($team->getStudyPointsViaPrize());
$this->setInGroup($team->getInGroup());
$this->setParameterForward($team->getParameterForward());
$this->setParameterHalf($team->getParameterHalf());
$this->setParameterSafe($team->getParameterSafe());
$this->setEnergy($team->getCurrentEnergy());
$this->setMaxEnergy($team->getEnergyMax());
$this->trainerId = $team->getTrainerId();
$this->teamName = trim($team->getTeamName());
$this->teamLogoId = $team->getTeamLogoId();
$this->inTeam = $team->getIsInTeam();
$this->isAbleToChoose = $team->getIsAbleToChoose();
$this->userPhoto = trim($team->getUserPhoto());
$this->userName = trim($team->getUserName());
$this->counterWon = $team->getCounterWon();
$this->counterChoose = $team->getCounterChoose();
$this->counterLose = $team->getCounterLose();
$this->counterTie = $team->getCounterTie();
$this->stadiumId = $team->getStadiumId();
$this->setUserCountry($team->getUserCountry());
$this->setUserCity($team->getUserCity());
$this->setUserUniversity($team->getUserUniversity());
$this->setPlaceCountry($team->getPlaceCountry());
$this->setPlaceCity($team->getPlaceCity());
$this->setPlaceUniversity($team->getPlaceUniversity());
$this->setPlaceVK($team->getPlaceVK());
$this->setTourIII($team->getTourIII());
$this->setDailyBonus($team->isNeedDailyBonus());
$this->setTourPlaceCountry($team->getTourPlaceCountry());
$this->setTourPlaceCity($team->getTourPlaceCity());
$this->setTourPlaceUniversity($team->getTourPlaceUniversity());
$this->setTourPlaceVK($team->getTourPlaceVK());
$this->setTourNotify($team->getTourNotify());
$this->setTourBonus($team->getTourBonus());
$this->setTourBonusTime($team->getTourBonusTime());
$this->setIsPrized($team->getIsPrized());
$this->setParameterSum($team->getParameterSum());
$this->setTotalPlace($team->getTotalPlace());
$this->setAllFootballersCount($team->getAllFootballersCount());
$this->setAllFootballersFriendsCount($team->getAllFootballersFriendsCount());
$this->setSponsorsCount($team->getSponsorsCount());
}
示例4: get_assigned_team_name
function get_assigned_team_name($assigned_team_id)
{
if (!empty($GLOBALS['sugar_config']['disable_user_cache'])) {
return Team::getTeamName($assigned_team_id);
}
static $team_list = null;
if (empty($team_list)) {
$team_list = get_team_array(false, "");
}
if (isset($team_list[$assigned_team_id])) {
return $team_list[$assigned_team_id];
}
return "";
}
示例5: process
function process($checkFormName = false, $formName = '')
{
global $mod_strings, $sugar_config, $app_strings, $app_list_strings;
//the retrieve already did this work;
//$this->focus->fill_in_relationship_fields();
//Bug#53261: If quickeditview is loaded after editview.tpl is created,
// the th->checkTemplate will return true. So, the following
// code prevent avoid rendering popup editview container.
if (!empty($this->formName)) {
$formName = $this->formName;
$checkFormName = true;
}
if (!$this->th->checkTemplate($this->module, $this->view, $checkFormName, $formName)) {
$this->render();
}
if (isset($_REQUEST['offset'])) {
$this->offset = $_REQUEST['offset'] - 1;
}
if ($this->showVCRControl) {
$this->th->ss->assign('PAGINATION', SugarVCR::menu($this->module, $this->offset, $this->focus->is_AuditEnabled(), $this->view == 'EditView'));
}
if (isset($_REQUEST['return_module'])) {
$this->returnModule = $_REQUEST['return_module'];
}
if (isset($_REQUEST['return_action'])) {
$this->returnAction = $_REQUEST['return_action'];
}
if (isset($_REQUEST['return_id'])) {
$this->returnId = $_REQUEST['return_id'];
}
if (isset($_REQUEST['return_relationship'])) {
$this->returnRelationship = $_REQUEST['return_relationship'];
}
if (isset($_REQUEST['return_name'])) {
$this->returnName = $this->getValueFromRequest($_REQUEST, 'return_name');
}
// handle Create $module then Cancel
if (empty($this->returnId)) {
$this->returnAction = 'index';
}
$is_owner = $this->focus->isOwner($GLOBALS['current_user']->id);
$this->fieldDefs = array();
if ($this->focus) {
global $current_user;
if (!empty($this->focus->job) && $this->focus->job_function == '') {
$this->focus->job_function = $this->focus->job;
}
if (empty($this->focus->team_id)) {
$this->focus->team_id = $current_user->default_team;
$this->focus->team_name = $current_user->default_team_name;
} else {
if (empty($this->focus->team_name)) {
$this->focus->team_name = Team::getTeamName($this->focus->team_id);
}
}
foreach ($this->focus->toArray() as $name => $value) {
$valueFormatted = false;
//if ($this->focus->field_defs[$name]['type']=='link')continue;
$this->fieldDefs[$name] = !empty($this->fieldDefs[$name]) && !empty($this->fieldDefs[$name]['value']) ? array_merge($this->focus->field_defs[$name], $this->fieldDefs[$name]) : $this->focus->field_defs[$name];
foreach (array("formula", "default", "comments", "help") as $toEscape) {
if (!empty($this->fieldDefs[$name][$toEscape])) {
$this->fieldDefs[$name][$toEscape] = htmlentities($this->fieldDefs[$name][$toEscape], ENT_QUOTES, 'UTF-8');
}
}
if (isset($this->fieldDefs[$name]['options']) && isset($app_list_strings[$this->fieldDefs[$name]['options']])) {
if (isset($GLOBALS['sugar_config']['enable_autocomplete']) && $GLOBALS['sugar_config']['enable_autocomplete'] == true) {
$this->fieldDefs[$name]['autocomplete'] = true;
$this->fieldDefs[$name]['autocomplete_options'] = $this->fieldDefs[$name]['options'];
// we need the name for autocomplete
} else {
$this->fieldDefs[$name]['autocomplete'] = false;
}
// Bug 57472 - $this->fieldDefs[$name]['autocomplete_options' was set too late, it didn't retrieve the list's name, but the list itself (the developper comment show us that developper expected to retrieve list's name and not the options array)
$this->fieldDefs[$name]['options'] = $app_list_strings[$this->fieldDefs[$name]['options']];
}
if (isset($this->fieldDefs[$name]['options']) && is_array($this->fieldDefs[$name]['options']) && isset($this->fieldDefs[$name]['default_empty']) && !isset($this->fieldDefs[$name]['options'][$this->fieldDefs[$name]['default_empty']])) {
$this->fieldDefs[$name]['options'] = array_merge(array($this->fieldDefs[$name]['default_empty'] => $this->fieldDefs[$name]['default_empty']), $this->fieldDefs[$name]['options']);
}
if (isset($this->fieldDefs[$name]['function'])) {
$functionBean = isset($this->fieldDefs[$name]['function_bean']) ? $this->fieldDefs[$name]['function_bean'] : null;
$function = $this->fieldDefs[$name]['function'];
$functionArgs = array($this->focus, $name, $value, $this->view);
// since we are on the old edit view, we need to revert to the old way to get the currency
// drop down and not the new fancy way that REST needs to get it.
$setValueFormatted = false;
if ($function == 'getCurrencies' && $functionBean == 'Currencies') {
$function = array('returns' => 'html', 'name' => 'getCurrencyDropDown');
$functionBean = array();
$setValueFormatted = true;
}
$value = getFunctionValue($functionBean, $function, $functionArgs);
if ($setValueFormatted || !empty($this->fieldDefs[$name]['function']['returns']) && $this->fieldDefs[$name]['function']['returns'] == 'html') {
$valueFormatted = true;
} else {
$this->fieldDefs[$name]['options'] = $value;
}
}
if (isset($this->fieldDefs[$name]['type']) && $this->fieldDefs[$name]['type'] == 'function' && isset($this->fieldDefs[$name]['function_name'])) {
$value = $this->callFunction($this->fieldDefs[$name]);
$valueFormatted = true;
//.........這裏部分代碼省略.........