Contributte Latte-email
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
# Disclaimer
⚠️ | This project is no longer being maintained. Please use contributte/latte (opens new window). |
---|
Composer | contributte/latte (opens new window) |
---|---|
Version | |
PHP | |
License |
# Versions
State | Version | Branch | Nette | PHP | |
---|---|---|---|---|---|
dev | ^3.1 | master | 3.0+ | ^7.2 | |
stable | ^3.0 | master | 3.0+ | ^7.2 | |
stable | ^2.0 | master | 2.4 | >=5.6 | |
stable | ^1.2 | master | 2.4 | >=5.4 | (old namespace) |
# Usage 🎉
# Setup
Register filter (in case you use nette/di)
services:
nette.latteFactory:
setup:
- addFilter('email', 'Contributte\Latte\Helpers\EmailHelper::mailto')
# or
- addFilter('email', ['Contributte\Latte\Helpers\EmailHelper', 'mailto'])
1
2
3
4
5
6
2
3
4
5
6
Alternatively you can also add filter directly to template
use Contributte\Latte\Email\Helpers\EmailHelper;
public function createTemplate()
{
$template = parent::createTemplate();
$template->addFilter('email', [EmailHelper::class, 'mailto']);
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# Usage
{var $mail = "my@email.net"}
{$mail|email:"javascript"}
{$mail|email:"javascript_charcode"}
{$mail|email:"hex"|noescape}
{$mail|email:"javascript":"link to my email here"}
{$mail|email:"drupal"}
{$mail|email:"texy"}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# Supported encoding methods
- javascript
- javascript_charcode
- hex
- drupal
- texy
# Development
This package was maintain by these authors.
Consider to support (opens new window) contributte development team. Also thank you for being used this package.