本文整理汇总了PHP中Club::GetNavigateUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Club::GetNavigateUrl方法的具体用法?PHP Club::GetNavigateUrl怎么用?PHP Club::GetNavigateUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Club
的用法示例。
在下文中一共展示了Club::GetNavigateUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: OnPostback
function OnPostback()
{
# get object
$this->o_club = $this->o_edit->GetDataObject();
# save data if valid
if ($this->IsValid()) {
$i_id = $this->o_club_manager->Save($this->o_club);
$this->o_club->SetId($i_id);
$this->Redirect($this->o_club->GetNavigateUrl());
}
}
示例2: OnPostback
function OnPostback()
{
$this->school = $this->edit->GetDataObject();
# save data if valid
if ($this->IsValid()) {
require_once "stoolball/clubs/club-manager.class.php";
$club_manager = new ClubManager($this->GetSettings(), $this->GetDataConnection());
$id = $club_manager->Save($this->school);
$this->school->SetId($id);
$this->Redirect($this->school->GetNavigateUrl() . "/edit");
}
}
示例3: OnPageLoad
function OnPageLoad()
{
echo new XhtmlElement('h1', Html::Encode('Delete club: ' . $this->data_object->GetName()));
if ($this->deleted) {
?>
<p>The club has been deleted.</p>
<p><a href="/play/clubs/">View all clubs</a></p>
<?php
} else {
if ($this->has_permission) {
?>
<p>Deleting a club cannot be undone.</p>
<p>Are you sure you want to delete this club?</p>
<form action="<?php
echo Html::Encode($this->data_object->GetDeleteClubUrl());
?>
" method="post" class="deleteButtons">
<div>
<input type="submit" value="Delete club" name="delete" />
<input type="submit" value="Cancel" name="cancel" />
</div>
</form>
<?php
$this->AddSeparator();
require_once 'stoolball/user-edit-panel.class.php';
$panel = new UserEditPanel($this->GetSettings(), 'this club');
$panel->AddLink('view this club', $this->data_object->GetNavigateUrl());
$panel->AddLink('edit this club', $this->data_object->GetEditClubUrl());
echo $panel;
} else {
?>
<p>Sorry, you're not allowed to delete this club.</p>
<p><a href="<?php
echo Html::Encode($this->data_object->GetNavigateUrl());
?>
">Go back to the club</a></p>
<?php
}
}
}