flame / contactform-component
Nette component for sending emails from your web page
dev-master
2012-12-15 20:38 UTC
Requires
- php: >=5.3.2
- flame/antispam-control: >=0.5
- nette/nette: >=2.0.6
This package is not auto-updated.
Last update: 2024-12-21 14:48:02 UTC
README
#ContactForm Component
Nette component for sending emails from your web page
##Usage
Presenter
class ContactPresenter extends BasePresenter { /** * @var \Flame\Components\ContactForm\IContactFormFactory $contactFormFactory */ private $contactFormFactory; /** * @param \Flame\Components\ContactForm\IContactFormFactory $contactFormFactory */ public function injectContactFormFactory(\Flame\Components\ContactForm\IContactFormFactory $contactFormFactory) { $this->contactFormFactory = $contactFormFactory; } /** * @return Flame\Components\ContactForm\ContactForm */ public function createComponentContactForm() { $form = $this->contactFormFactory->create(); $form->setRenderer(new \Kdyby\Extension\Forms\BootstrapRenderer\BootstrapRenderer); $form->onSuccess[] = $this->lazyLink('default'); return $form; } }
Config
services:
ContactFormProcess: \Flame\Components\ContactForm\ContactFormProcess(support@email.cz)
factories:
contactForm:
implement: \Flame\Components\ContactForm\IContactFormFactory