本文整理匯總了PHP中PageLayout::postInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP PageLayout::postInfo方法的具體用法?PHP PageLayout::postInfo怎麽用?PHP PageLayout::postInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PageLayout
的用法示例。
在下文中一共展示了PageLayout::postInfo方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: add_members_action
/**
* Landing page for mulitpersonsearch, adds the selected users to the
* user list.
* @param $userlistId string ID of the userlist to edit
*/
public function add_members_action($userlistId)
{
$mp = MultiPersonSearch::load("add_userlist_member_" . $userlistId);
$users = $mp->getDefaultSelectedUsersIDs();
$oldsize = count($users);
foreach ($mp->getAddedUsers() as $u) {
$users[] = $u;
}
$newsize = count($users);
$this->flash['users'] = $users;
PageLayout::postInfo(sprintf(ngettext('Eine Person wurde der Liste hinzugefügt.', '%u Personen wurden der Liste hinzugefügt, die Liste ist aber noch nicht gespeichert.', $newsize - $oldsize), $newsize - $oldsize));
$this->redirect($this->url_for('admission/userlist/configure', $userlistId));
}
示例2: editCycle_action
/**
* Edits a cycle
*
* @param String $cycle_id Id of the cycle to be edited
*/
public function editCycle_action($cycle_id)
{
$cycle = SeminarCycleDate::find($cycle_id);
// Prepare Request for saving Request
$cycle->start_time = date('H:i:00', strtotime(Request::get('start_time')));
$cycle->end_time = date('H:i:00', strtotime(Request::get('end_time')));
$cycle->weekday = Request::int('day');
$cycle->description = Request::get('description');
$cycle->sws = Request::get('teacher_sws');
$cycle->cycle = Request::get('cycle');
$cycle->week_offset = Request::get('startWeek');
$cycle->end_offset = Request::int('endWeek') ?: null;
if ($cycle->isDirty()) {
$cycle->chdate = time();
$cycle->store();
} else {
PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen'));
}
$this->redirect('course/timesrooms/index');
}