本文整理汇总了PHP中Tracker_FormElement_Field::userCanSubmit方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker_FormElement_Field::userCanSubmit方法的具体用法?PHP Tracker_FormElement_Field::userCanSubmit怎么用?PHP Tracker_FormElement_Field::userCanSubmit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker_FormElement_Field
的用法示例。
在下文中一共展示了Tracker_FormElement_Field::userCanSubmit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: canValidateField
protected function canValidateField(Tracker_Artifact $artifact, Tracker_FormElement_Field $field)
{
$last_changeset = $artifact->getLastChangeset();
//we do not validate if we are in submission mode, the field is required and we can't submit the field
return !(!$last_changeset && $field->isRequired() && !$field->userCanSubmit());
}
示例2: canValidateField
protected function canValidateField(Tracker_Artifact $artifact, Tracker_FormElement_Field $field)
{
//we do not validate if the field is required and we can't submit the field
return !($field->isRequired() && !$field->userCanSubmit());
}