1 <?php
2
3 /**
4 * This file is part of the Grido (https://github.com/o5/grido)
5 *
6 * Copyright (c) 2011 Petr Bugyík (http://petr.bugyik.cz)
7 *
8 * For the full copyright and license information, please view
9 * the file LICENSE.md that was distributed with this source code.
10 */
11
12 namespace Grido\Components\Columns;
13
14 /**
15 * Email column.
16 *
17 * @package Grido
18 * @subpackage Components\Columns
19 * @author Petr Bugyík
20 */
21 class Email extends Link
22 {
23 /**
24 * @param string $value
25 * @return string
26 */
27 protected function formatHref($value)
28 {
29 return "mailto:" . $value;
30 }
31
32 /**
33 * @param mixed $value
34 * @return \Nette\Utils\Html
35 */
36 protected function getAnchor($value)
37 {
38 $anchor = parent::getAnchor($value);
39 unset($anchor->attrs['target']);
40 unset($anchor->attrs['rel']);
41
42 return $anchor;
43 }
44 }
45