本文整理汇总了PHP中Action::checkbox方法的典型用法代码示例。如果您正苦于以下问题:PHP Action::checkbox方法的具体用法?PHP Action::checkbox怎么用?PHP Action::checkbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action
的用法示例。
在下文中一共展示了Action::checkbox方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onEndEmailFormData
public function onEndEmailFormData(Action $action, Profile $scoped)
{
$emailfave = $scoped->getConfigPref('email', 'notify_fave') ? 1 : 0;
$action->elementStart('li');
$action->checkbox('email-notify_fave', _('Send me email when someone adds my notice as a favorite.'), $emailfave);
$action->elementEnd('li');
return true;
}
示例2: onEndEmailFormData
/**
* Add a checkbox to turn off email summaries
*
* @param Action $action Action being executed (emailsettings)
*
* @return boolean hook value
*/
function onEndEmailFormData($action)
{
$user = common_current_user();
$action->elementStart('li');
$action->checkbox('emailsummary', _('Send me a periodic summary of updates from my network.'), Email_summary_status::getSendSummary($user->id));
$action->elementEnd('li');
return true;
}
示例3: onEndProfileFormData
/**
* Show a checkbox on the profile form to ask whether to follow everyone
*
* @param Action $action The action being executed
*
* @return boolean hook value
*/
function onEndProfileFormData($action)
{
$user = common_current_user();
$action->elementStart('li');
// TRANS: Checkbox label in form for profile settings.
$action->checkbox('followeveryone', _('Follow everyone'), $action->arg('followeveryone') ? $action->arg('followeveryone') : User_followeveryone_prefs::followEveryone($user->id));
$action->elementEnd('li');
return true;
}
示例4: onEndEmailFormData
/**
* Add a checkbox to turn off email summaries
*
* @param Action $action Action being executed (emailsettings)
* @param Profile $scoped Profile for whom settings are configured (current user)
*
* @return boolean hook value
*/
public function onEndEmailFormData(Action $action, Profile $scoped)
{
$action->elementStart('li');
$action->checkbox('emailsummary', _m('Send me a periodic summary of updates from my network'), Email_summary_status::getSendSummary($scoped->id));
$action->elementEnd('li');
return true;
}