本文整理匯總了PHP中Reservation::findAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP Reservation::findAll方法的具體用法?PHP Reservation::findAll怎麽用?PHP Reservation::findAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Reservation
的用法示例。
在下文中一共展示了Reservation::findAll方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: indexAction
public function indexAction()
{
$user = Zend_Auth::getInstance()->getIdentity()->user;
$calendar = new App_JqCalendar();
$calendar->defaultView();
$calendar->currentFirstDay(true);
$calendar->canAddAllDay(false);
// add reservations only if the user have aircrafts
if (count($user->Aircraft->toArray()) > 0) {
$calendar->enableAdd(true);
} else {
$calendar->enableAdd(false);
}
if (Zend_Auth::getInstance()->getIdentity()->isAdmin) {
$this->_addHeadTitle("All reservations");
$reservations = Reservation::findAll();
$this->view->events = Reservation::toEvents($reservations, true);
$calendar->loadUrl($this->baseUrl . "/index/index/format/json");
} else {
$this->_addHeadTitle("My reservations");
$reservations = Reservation::findByUser($user->id);
$this->view->events = Reservation::toEvents($reservations);
$calendar->loadUrl($this->baseUrl . "/index/index/format/json");
}
$this->view->jqCalendar = $calendar;
}
示例2: indexAction
public function indexAction()
{
//$fc = new App_Fullcalendar();
//$fc->selectable(false)->editable(false);
$user = Zend_Auth::getInstance()->getIdentity()->user;
if (Zend_Auth::getInstance()->getIdentity()->isAdmin) {
$this->_addHeadTitle("All reservations");
$this->view->reservations = Reservation::findAll();
//$fc->addEvents(Reservation::toEvents($this->view->reservations, true));
} else {
$this->_addHeadTitle("My reservations");
$this->view->reservations = Reservation::findByUser($user->id);
//$fc->addEvents(Reservation::toEvents($this->view->reservations));
}
//$this->view->fc = $fc;
}