本文整理汇总了PHP中Region::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Region::getName方法的具体用法?PHP Region::getName怎么用?PHP Region::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Region
的用法示例。
在下文中一共展示了Region::getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeAddregion
public function executeAddregion()
{
$c = new Criteria();
$c->add(RegionPeer::NAME, $this->getRequestParameter('region'));
$exregion = RegionPeer::doSelectOne($c);
if ($exregion) {
$this->setFlash('notice', 'Region could not be added. A Region with this name already exists.');
} else {
$region = new Region();
$region->setName($this->getRequestParameter('region'));
$region->save();
$this->setFlash('notice', 'Region <b>' . $region->getName() . '</b> added successfully');
}
$this->redirect('admin/regions');
}
示例2: switch
$typeURL = false;
$ctrTypeID = $contracttarget->getID();
switch ($type) {
case "corp":
$corp = new Corporation($ctrTypeID);
$name = $corp->getName();
$typeURL = edkURI::page('corp_detail', $ctrTypeID, 'crp_id');
break;
case "alliance":
$alliance = new Alliance($ctrTypeID);
$name = $alliance->getName();
$typeURL = edkURI::page('alliance_detail', $ctrTypeID, 'all_id');
break;
case "region":
$region = new Region($ctrTypeID);
$name = $region->getName();
$typeURL = edkURI::page('detail_view', $ctrTypeID, 'region_id');
break;
case "system":
$system = new SolarSystem($ctrTypeID);
$name = $system->getName();
$typeURL = edkURI::page('system_detail', $ctrTypeID, 'sys_id');
break;
}
if ($typeURL) {
$html .= '<tr class=kb-table-row-odd><td class=kb-table-cell><b><a href="' . $typeURL . '">' . $name . '</b></td><td class=kb-table-cell align=center>';
} else {
$html .= "<tr class=kb-table-row-odd><td class=kb-table-cell><b>" . $name . "</b></td><td class=kb-table-cell align=center>";
}
if ($type == "corp") {
$html .= "x";
示例3: loadWidgets
/**
* @param Region $region The region
*/
private function loadWidgets($region)
{
$pagePartAdminConfiguration = null;
foreach ($this->pagePartAdminConfigurations as $ppac) {
if ($ppac->getContext() == $region->getName()) {
$pagePartAdminConfiguration = $ppac;
}
}
if ($pagePartAdminConfiguration !== null) {
$pagePartWidget = new PagePartWidget($this->page, $this->request, $this->em, $pagePartAdminConfiguration, $this->formFactory, $this->pagePartAdminFactory);
$this->widgets[$region->getName()] = $pagePartWidget;
}
}