本文整理汇总了PHP中Agenda::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Agenda::getAll方法的具体用法?PHP Agenda::getAll怎么用?PHP Agenda::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agenda
的用法示例。
在下文中一共展示了Agenda::getAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gestionAgendaActivite
public function gestionAgendaActivite()
{
$this->load->model("Activite");
$this->load->model("Agenda");
$data['listAgenda'] = Agenda::getAll();
$this->load->view("gestionAgendaActivite", $data);
}
示例2: gestion
public function gestion()
{
$this->load->helper("Date_helper");
$semaines = week2period(date("Y"), date("W"));
$this->load->model("Agenda");
$x = Agenda::getAll();
$data['listAgenda'] = $x;
$tab = [];
foreach ($x as $y) {
// Pour chaque ligne de la table agenda
$z = true;
$date = date('d-m-Y', strtotime($y->dateDebutActivite()));
$dateFin = date('d-m-Y', strtotime($y->dateFinActivite()));
while ($z == true) {
/// tant que les deux dates ne sont pas égales
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);
}
//date sous format 311220160809 -> 31-12-2016-08h-09h
//jddayofweek(gregoriantojd($mois,$jour,$annee));
$date = date('d-m-Y', strtotime($date . ' + 1 days'));
// On incrémente le jour
}
// $tab[]=$date;
// $date=date('d-m-Y', strtotime($date. ' + 1 days'));
// $tab[]=$date;
// $tab[]=$dateFin;
}
$data['semaines'] = $semaines;
$data['test'] = $tab;
$this->load->view("gestionAgendaActivite", $data);
}
示例3: Agenda
<h3 class="panel-title">Listagem</h3>
</div>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>#</th>
<th>Evento</th>
<th>Data</th>
<th>Hora</th>
<th>Ações</th>
</tr>
</thead>
<tbody>
<?php
$agenda = new Agenda();
$eventos = $agenda->getAll();
if (isset($_GET['acao']) && $_GET['acao'] == 'delete') {
$eventoId = $_GET['id'];
$agenda->delete($eventoId);
header('Location: index.php');
die;
}
?>
<?php
foreach ($eventos as $evento) {
?>
<tr>
<td><?php
echo $evento->id;
?>