PHP code example of geniv / nette-mailerlite

1. Go to this page and download the library: Download geniv/nette-mailerlite library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

geniv / nette-mailerlite example snippets


protected function createComponentMailerLiteForm(MailerLiteForm $mailerLiteForm)
{
    //$mailerLiteForm->setTemplatePath(__DIR__ . '/templates/MailerLiteForm.latte');
    $mailerLiteForm->onSuccess[] = function (array $values) {
        $this->flashMessage('Email has been save!', 'success');
        $this->redirect('this');
    };
    $mailerLiteForm->onError[] = function ($error) {
        $this->flashMessage('Error! ' . $error->message, 'danger');
        $this->redirect('this');
    };
    return $mailerLite;
}
json
"php": ">=7.0.0",
"mailerlite/mailerlite-api-v2-php-sdk": ">=0.2.1",
"geniv/nette-general-form": ">=1.0.0"