本文整理汇总了PHP中Agenda::getById方法的典型用法代码示例。如果您正苦于以下问题:PHP Agenda::getById方法的具体用法?PHP Agenda::getById怎么用?PHP Agenda::getById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agenda
的用法示例。
在下文中一共展示了Agenda::getById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: emploiDuTemps
public function emploiDuTemps($id)
{
$this->load->helper("Date_helper");
$semaines = week2period(date("Y"), date("W"));
$this->load->model("Agenda");
$x = Agenda::getById($id);
$data['listAgenda'] = $x;
$tab = [];
foreach ($x as $y) {
$z = true;
$date = date('d-m-Y', strtotime($y->dateDebutActivite()));
$dateFin = date('d-m-Y', strtotime($y->dateFinActivite()));
while ($z == true) {
if ($date == $dateFin) {
$z = false;
}
$p = new \DateTime($date);
if ($p->format('N') == $y->jour()) {
$tab[] = str_replace('-', '', $date) . substr($y->horaireDebutActivite(), 0, 2) . substr($y->horaireFinActivite(), 0, 2);
}
//jddayofweek(gregoriantojd($mois,$jour,$annee));
$date = date('d-m-Y', strtotime($date . ' + 1 days'));
}
// $tab[]=$date;
// $date=date('d-m-Y', strtotime($date. ' + 1 days'));
// $tab[]=$date;
// $tab[]=$dateFin;
}
$data['semaines'] = $semaines;
$data['test'] = $tab;
$this->load->view("gestionInscription enfant", $data);
}
示例2: Agenda
<?php
require '../layout/header.php';
require $basePath . '/controllers/AgendaCtrl.php';
?>
<div class="container">
<header class="page-header">
<h1>Agenda</h1>
</header>
<?php
$agenda = new Agenda();
if (isset($_GET['id'])) {
$eventoId = $_GET['id'];
$evento = $agenda->getById($eventoId);
} else {
echo "Volte e selecione um evento";
}
?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Editar</h3>
</div>
<div class="panel-body">
<form action="" method="post" class="row">
<div class="col-md-12">
<div class="form-group">
<label for="evento">Evento</label>
<input id="evento" name="evento" type="text" class="form-control" value="<?php