本文整理汇总了PHP中waSystem::getAuthConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP waSystem::getAuthConfig方法的具体用法?PHP waSystem::getAuthConfig怎么用?PHP waSystem::getAuthConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waSystem
的用法示例。
在下文中一共展示了waSystem::getAuthConfig方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: signupForm
public function signupForm($errors = array())
{
$fields = $this->signupFields($errors);
$html = '<div class="wa-form"><form action="' . $this->signupUrl() . '" method="post">';
foreach ($fields as $field_id => $field) {
if ($field) {
$f = $field[0];
/**
* @var waContactField $f
*/
if (isset($errors[$field_id])) {
$field_error = is_array($errors[$field_id]) ? implode(', ', $errors[$field_id]) : $errors[$field_id];
} else {
$field_error = false;
}
$field[1]['id'] = $field_id;
if ($f instanceof waContactCompositeField) {
foreach ($f->getFields() as $sf) {
/**
* @var waContactField $sf
*/
$html .= $this->signupFieldHTML($sf, array('parent' => $field_id, 'id' => $sf->getId()), $field_error);
}
} else {
$html .= $this->signupFieldHTML($f, $field[1], $field_error);
}
} else {
$html .= '<div class="wa-field wa-separator"></div>';
}
}
$config = $this->wa->getAuthConfig();
if (isset($config['signup_captcha']) && $config['signup_captcha']) {
$html .= '<div class="wa-field"><div class="wa-value">';
$html .= $this->wa->getCaptcha()->getHtml(isset($errors['captcha']) ? $errors['captcha'] : '');
if (isset($errors['captcha'])) {
$html .= '<em class="wa-error-msg">' . $errors['captcha'] . '</em>';
}
$html .= '</div></div>';
}
$html .= '<div class="wa-field"><div class="wa-value wa-submit">
<input type="submit" value="' . _ws('Sign up') . '"> ' . sprintf(_ws('or <a href="%s">login</a> if you already have an account'), $this->getUrl('/login')) . '
</div></div>';
$html .= '</form></div>';
return $html;
}