本文整理汇总了PHP中Template_Controller::navigation方法的典型用法代码示例。如果您正苦于以下问题:PHP Template_Controller::navigation方法的具体用法?PHP Template_Controller::navigation怎么用?PHP Template_Controller::navigation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Template_Controller
的用法示例。
在下文中一共展示了Template_Controller::navigation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* Methode : page de détail d'une user
*/
public function show($idQuete = false)
{
if (!$idQuete || !is_numeric($idQuete)) {
return parent::redirect_erreur('quetes');
}
cookie::set('UserFilesPath', url::base() . '../images/quetes/' . $idQuete);
cookie::set('UserFilesAbsolutePath', DOCROOT . '../images/quetes/' . $idQuete);
if (!cookie::get('UserFilesPath')) {
return url::redirect('quetes/show/' . $idQuete);
}
if (!($quete = $this->quete->select(array('id_quete' => $idQuete), 1))) {
return parent::redirect_erreur('quetes');
}
if (!($module = Map_Model::instance()->select(array('module_map' => 'quete'), false))) {
return url::redirect('regions?msg=' . urlencode(Kohana::lang('quete.no_module')));
}
$this->script = array('js/lib/jquery.validate', 'js/lib/jquery.facebox', 'js/quetes');
$this->css = array('form', 'quete', 'facebox');
$this->template->titre = array(Kohana::lang('quete.all_quetes') => 'quetes', Kohana::lang('quete.show_title', ucfirst(mb_strtolower($quete->title))) => NULL);
$this->template->button = TRUE;
$this->template->navigation = parent::navigation($idQuete, 'id_quete', 'quetes');
$this->template->contenu = new View('formulaire/form');
$this->template->contenu->action = 'quetes/save';
$this->template->contenu->id = $idQuete;
$this->template->contenu->formulaire = new View('quetes/show');
$this->template->contenu->formulaire->row = $quete;
$this->template->contenu->formulaire->module = $module;
$this->template->contenu->formulaire->bots = Map_Model::instance()->select(array('module_map' => 'fight'), false);
$this->template->contenu->formulaire->quete = $this->quete->select(array('id_quete !=' => $idQuete));
}
示例2: show
/**
* Methode : page de détail d'un utilisateur
*/
public function show($idUser)
{
if (!($user = $this->user->select(array('id' => $idUser), TRUE))) {
parent::redirect_erreur('users');
}
$role = new Roles_Model();
$listeRole = $role->liste();
$roleUser = $role->selectUser($idUser);
$this->script = array('js/lib/jquery.validate', 'js/lib/jquery.facebox', 'js/users');
$this->css = array('form', 'facebox', 'user');
$this->template->titre = array(Kohana::lang('user.all_user') => 'users', Kohana::lang('user.show_name', ucfirst(mb_strtolower($user->username))) => NULL);
$this->template->button = TRUE;
$this->template->navigation = parent::navigation($idUser, 'id', 'users');
$this->template->contenu = new View('formulaire/form');
$this->template->contenu->action = 'users/save';
$this->template->contenu->id = $idUser;
$this->template->contenu->formulaire = new View('users/show');
$this->template->contenu->formulaire->row = $user;
$this->template->contenu->formulaire->roles = $listeRole;
$this->template->contenu->formulaire->roleUser = $roleUser;
$this->template->contenu->formulaire->regions = Region_Model::instance()->listing_parent();
$this->template->contenu->formulaire->avatar = file::listing_dir(DOCROOT . '../images/character');
}
示例3: show
/**
* Methode : page de détail d'une carte
*/
public function show($idRegion = false)
{
if (!$idRegion || !is_numeric($idRegion)) {
return parent::redirect_erreur('regions');
}
cookie::set('id_map_parent', $idRegion);
if (!($region = $this->region->select(array('id' => $idRegion), 1))) {
return parent::redirect_erreur('regions');
}
$this->script = array('js/lib/jquery.validate', 'js/lib/jquery.facebox', 'js/region');
$this->css = array('form', 'region', 'facebox');
$this->template->titre = array(Kohana::lang('region.liste_regions') => !$region->id_parent ? 'regions' : '/regions/child/' . $region->id_parent, Kohana::lang('region.show_name', ucfirst(mb_strtolower($region->name))) => NULL);
$this->template->button = TRUE;
$this->template->navigation = parent::navigation($idRegion, 'id', 'regions');
$this->template->contenu = new View('formulaire/form');
$this->template->contenu->action = 'regions/save';
$this->template->contenu->id = $idRegion;
$this->template->contenu->formulaire = new View('regions/show');
$this->template->contenu->formulaire->row = $region;
$this->template->contenu->formulaire->listing = $this->region->listing_parent();
$this->template->contenu->formulaire->music = file::listing_dir(DOCROOT . '../audios');
$this->template->contenu->formulaire->skybox = file::listing_dir(DOCROOT . '../images/skybox');
}
示例4: show
/**
* Methode : page de détail d'une user
*/
public function show($idItem = false)
{
if (!$idItem || !is_numeric($idItem)) {
return parent::redirect_erreur('items');
}
if (!($item = $this->item->select(FALSE, $idItem, TRUE))) {
return parent::redirect_erreur('items');
}
$listItem = $listJob = FALSE;
foreach ($this->item->select() as $row) {
$listItem[$row->id] = $row;
}
$this->script = array('js/lib/jquery.validate', 'js/lib/jquery.facebox', 'js/items');
$this->css = array('form', 'item', 'facebox');
$this->template->titre = array(Kohana::lang('item.all_items') => 'items', Kohana::lang('item.show_name', ucfirst(mb_strtolower($item->name))) => NULL);
$this->template->button = TRUE;
$this->template->navigation = parent::navigation($idItem, 'id', 'items');
$this->template->contenu = new View('formulaire/form');
$this->template->contenu->action = 'items/save';
$this->template->contenu->id = $idItem;
$this->template->contenu->formulaire = new View('items/show');
$this->template->contenu->formulaire->row = $item;
$this->template->contenu->formulaire->items = $listItem;
}