本文整理汇总了PHP中FormControl::do_success方法的典型用法代码示例。如果您正苦于以下问题:PHP FormControl::do_success方法的具体用法?PHP FormControl::do_success怎么用?PHP FormControl::do_success使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormControl
的用法示例。
在下文中一共展示了FormControl::do_success方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_success
/**
* This control only executes its on_success callbacks when it was clicked
* @param FormUI $form The form to which this control belongs
* @return bool|string A string to replace the rendering of the form with, or false
*/
public function do_success($form)
{
if (isset($_POST[$this->input_name()])) {
return parent::do_success($form);
}
return false;
}
示例2: do_success
/**
* Calls the success callback for the form, and optionally saves the form values
* to the options table.
* @param FormUI $form The form for which success is being processed
* @return boolean|string A string to replace the rendering of the form with, or false
*/
public function do_success($form)
{
/** @var FormControl $control */
foreach ($this->controls as $control) {
$control->do_success($form);
}
return parent::do_success($form);
}