コード例 #1
0
 function getFormField()
 {
     if ($protector = SpamProtectorManager::get_spam_protector()) {
         if ($protector) {
             $protector = new $protector();
             return $protector->getFormField($this->Name, $this->Title, null);
         }
     }
     return false;
 }
コード例 #2
0
 function getRecaptchaField()
 {
     $field = null;
     $spamProtector = SpamProtectorManager::get_spam_protector();
     if ($spamProtector == "RecaptchaProtector") {
         $field = new RecaptchaField("Recaptcha", "Please enter text");
         $field->jsOptions = array('theme' => 'clean');
         $field->addExtraClass("required");
     }
     return $field;
 }