<?php
namespace Website\Widgets\FormElements; use Moto; class RecaptchaWidget extends AbstractFormInputWidget { protected $_name = 'form_elements.recaptcha'; protected static $_defaultProperties = array( 'name' => '', 'theme' => 'light', 'size' => 'normal', 'align' => array( 'desktop' => 'left', 'tablet' => '', 'mobile-v' => '', 'mobile-h' => '', ), 'spacing' => array( 'top' => 'auto', 'right' => 'auto', 'bottom' => 'auto', 'left' => 'auto', ), ); public function getTemplatePath($preset = null) { return '@websiteWidgets/form_elements/templates/recaptcha.twig.html'; } public function getIntegrationSiteKey() { $data = Moto\Website\Integration::first('recaptcha'); return Moto\Util::getValue($data, 'v2.key', ''); } public function isVisibleInMessage() { return false; } } 