当前位置: 首页>>代码示例>>PHP>>正文


PHP Html::mailto方法代码示例

本文整理汇总了PHP中yii\helpers\Html::mailto方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::mailto方法的具体用法?PHP Html::mailto怎么用?PHP Html::mailto使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\helpers\Html的用法示例。


在下文中一共展示了Html::mailto方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: defaultColumns

 public static function defaultColumns()
 {
     return ['name' => ['class' => MainColumn::class, 'filterAttribute' => 'name_like', 'extraAttribute' => 'organization', 'format' => 'raw'], 'name_v' => ['class' => MainColumn::class, 'filterAttribute' => 'name_like', 'extraAttribute' => 'organization', 'format' => 'raw', 'value' => function ($model) {
         return CheckCircle::widget(['value' => $model->getVerification('name')->isVerified()]) . Html::a($model->name, ['@contact/view', 'id' => $model->id], ['class' => 'text-bold']);
     }], 'email_v' => ['format' => 'raw', 'attribute' => 'email', 'value' => function ($model) {
         return Html::mailto($model->email, $model->email) . CheckCircle::widget(['value' => $model->getVerification('email')->isVerified()]);
     }], 'voice_phone' => ['format' => 'raw', 'value' => function ($model) {
         return $model->voice_phone ? $model->voice_phone . CheckCircle::widget(['value' => $model->getVerification('voice_phone')->isVerified()]) : '';
     }], 'fax_phone' => ['format' => 'raw', 'value' => function ($model) {
         return $model->fax_phone ? $model->fax_phone . CheckCircle::widget(['value' => $model->getVerification('fax_phone')->isVerified()]) : '';
     }], 'email' => ['format' => 'raw', 'value' => function ($model) {
         $result = $model->email;
         if ($model->email_new) {
             $result .= '<br>' . Html::tag('b', Yii::t('hipanel:client', 'change is not confirmed'), ['class' => 'text-warning']);
         }
         if ($model->email_new !== $model->email) {
             $result .= '<br>' . Html::tag('span', $model->email_new, ['class' => 'text-muted']);
         }
         return $result;
     }], 'email_with_verification' => ['label' => Yii::t('hipanel', 'Email'), 'format' => 'raw', 'value' => function ($model) {
         $confirmation = $model->getVerification('email');
         $result = $model->email;
         if (!$confirmation->isConfirmed()) {
             $result .= '<br>' . Html::tag('b', Yii::t('hipanel:client', 'change is not confirmed'), ['class' => 'text-warning']);
             $result .= '<br>' . Html::tag('span', $model->email_new, ['class' => 'text-muted']);
         }
         $result .= VerificationIndicator::widget(['model' => $confirmation]);
         return $result;
     }], 'country' => ['attribute' => 'country_name', 'format' => 'html', 'value' => function ($model) {
         return Html::tag('span', '', ['class' => 'flag-icon flag-icon-' . $model->country]) . '&nbsp;&nbsp;' . $model->country_name;
     }], 'street' => ['label' => Yii::t('hipanel:client', 'Street'), 'format' => 'html', 'value' => function ($model) {
         return $model->street1 . $model->street2 . $model->street3;
     }], 'street1' => ['attribute' => 'street1', 'format' => 'html', 'value' => function ($model) {
         return Html::tag('span', $model->street1, ['class' => 'bold']);
     }], 'street2' => ['attribute' => 'street2', 'format' => 'html', 'value' => function ($model) {
         return Html::tag('span', $model->street2, ['class' => 'bold']);
     }], 'street3' => ['attribute' => 'street3', 'format' => 'html', 'value' => function ($model) {
         return Html::tag('span', $model->street3, ['class' => 'bold']);
     }], 'other' => ['attribute' => 'other_messenger'], 'messengers' => ['format' => 'html', 'label' => Yii::t('hipanel:client', 'Messengers'), 'value' => function ($model) {
         $res = [];
         foreach (['skype' => 'Skype', 'icq' => 'ICQ', 'jabber' => 'Jabber'] as $k => $label) {
             if ($model->{$k}) {
                 $res[] = "<b>{$label}:</b>&nbsp;" . $model->{$k};
             }
         }
         return implode('<br>', $res);
     }], 'social_net' => ['format' => 'html', 'value' => function ($model) {
         return Html::a($model->social_net, $model->social_net);
     }], 'birth_date' => ['format' => 'date'], 'passport_date' => ['format' => 'date'], 'actions' => ['class' => MenuColumn::class, 'menuClass' => ContactActionsMenu::class], 'vat_rate' => ['value' => function ($model) {
         return $model->vat_rate ? (int) $model->vat_rate . '%' : null;
     }], 'reg_data' => ['format' => 'html', 'value' => function ($model) {
         return nl2br($model->reg_data);
     }]];
 }
开发者ID:hiqdev,项目名称:hipanel-module-client,代码行数:54,代码来源:ContactGridView.php

示例2: run

 public function run()
 {
     if ($this->encode) {
         $this->text = Html::encode($this->text);
     }
     if (!$this->minimal) {
         $maxOembedCount = 3;
         // Maximum OEmbeds
         $oembedCount = 0;
         // OEmbeds used
         $that = $this;
         $this->text = preg_replace_callback('/(https?:\\/\\/.*?)(\\s|$)/i', function ($match) use(&$oembedCount, &$maxOembedCount, &$that) {
             if ($that->edit) {
                 return Html::a($match[0], Html::decode($match[0]), array('target' => '_blank'));
             }
             // Try use oembed
             if ($maxOembedCount > $oembedCount) {
                 $oembed = UrlOembed::GetOembed($match[0]);
                 if ($oembed) {
                     $oembedCount++;
                     return $oembed;
                 }
             }
             return Html::a($match[1], Html::decode($match[1]), array('target' => '_blank')) . $match[2];
         }, $this->text);
         // mark emails
         $this->text = preg_replace_callback('/[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*(\\.[a-zA-Z]{2,3})/', function ($match) {
             return Html::mailto($match[0]);
         }, $this->text);
     }
     // get user and space details from guids
     $this->text = self::translateMentioning($this->text, $this->minimal ? false : true);
     // create image tag for emojis
     $this->text = self::translateEmojis($this->text, $this->minimal ? false : true);
     if ($this->maxLength != 0) {
         $this->text = \humhub\libs\Helpers::truncateText($this->text, $this->maxLength);
     }
     $output = nl2br($this->text);
     $this->trigger(self::EVENT_BEFORE_OUTPUT, new ParameterEvent(['output' => &$output]));
     return $output;
 }
开发者ID:gautamkrishnar,项目名称:humhub-openshift-quickstart,代码行数:41,代码来源:RichText.php

示例3:

                            <address>
                                <h5><?php 
echo Yii::t('c/radiata/contact', 'Head Office');
?>
</h5>

                                <p><?php 
echo Yii::t('c/radiata/contact', 'Address');
?>
</p>

                                <p><?php 
echo Yii::t('c/radiata/contact', 'E-Mail:');
?>
 <?php 
echo Html::mailto(Yii::t('c/radiata/contact', 'email'), Yii::t('c/radiata/contact', 'email'));
?>
</p>
                            </address>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</section>  <!--/gmap_area -->

<section id="contact-page">
    <div class="container">
        <div class="row">
            <div class="col-lg-5">
开发者ID:radiata-cms,项目名称:radiata,代码行数:31,代码来源:contact.php

示例4: sprintf

<?php

use yii\grid\GridView;
use yii\helpers\Html;
/* @var $this yii\web\View */
?>
<h1><?php 
echo sprintf("%s %s", Html::encode($event->name), Html::encode($team->name));
?>
 shifts</h1>
<p><strong>Contact:</strong> <?php 
echo Html::mailto($team->contact, $team->contact);
?>
</p>
<p><?php 
echo Yii::$app->formatter->asHtml($team->description);
?>
</p>
<?php 
foreach ($days as $timestamp => $dp) {
    ?>
<h3><?php 
    echo date('l, M j, Y', $timestamp);
    ?>
</h3>
<?php 
    echo GridView::widget(['dataProvider' => $dp, 'columns' => ['title', ['label' => 'Time', 'attribute' => 'start_time', 'format' => 'text', 'value' => function ($model) {
        $start = date('g:i a', $model->start_time);
        $end = date('g:i a', $model->start_time + $model->length * 3600);
        return sprintf("%s - %s (%u hours)", $start, $end, $model->length);
    }], ['attribute' => 'volunteerList', 'format' => 'raw']]]);
开发者ID:Flashpoint-Artists-Initiative,项目名称:Volunteering,代码行数:31,代码来源:schedule.php

示例5: jQuery

    jQuery(\'#banUrl\').attr(\'href\', button.data(\'url\'));
});', View::POS_READY, 'bootstrap-modal-ban');
$this->registerJs('jQuery(\'#podiumModalUnBan\').on(\'show.bs.modal\', function(e) {
    var button = jQuery(e.relatedTarget);
    jQuery(\'#unbanUrl\').attr(\'href\', button.data(\'url\'));
});', View::POS_READY, 'bootstrap-modal-unban');
echo $this->render('/elements/admin/_navbar', ['active' => 'members']);
?>

<br>

<?php 
Pjax::begin();
echo PageSizer::widget();
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterSelector' => 'select#per-page', 'tableOptions' => ['class' => 'table table-striped table-hover'], 'columns' => [['attribute' => 'id', 'label' => Yii::t('podium/view', 'ID') . Helper::sortOrder('id'), 'encodeLabel' => false, 'contentOptions' => ['class' => 'col-sm-1 text-right'], 'headerOptions' => ['class' => 'col-sm-1 text-right']], ['attribute' => 'username', 'label' => Yii::t('podium/view', 'Username') . Helper::sortOrder('username'), 'encodeLabel' => false], ['attribute' => 'email', 'label' => Yii::t('podium/view', 'E-mail') . Helper::sortOrder('email'), 'encodeLabel' => false, 'format' => 'raw', 'value' => function ($model) {
    return Html::mailto($model->email);
}], ['attribute' => 'role', 'label' => Yii::t('podium/view', 'Role') . Helper::sortOrder('role'), 'encodeLabel' => false, 'filter' => User::getRoles(), 'value' => function ($model) {
    return Yii::t('podium/view', ArrayHelper::getValue(User::getRoles(), $model->role));
}], ['attribute' => 'status', 'label' => Yii::t('podium/view', 'Status') . Helper::sortOrder('status'), 'encodeLabel' => false, 'filter' => User::getStatuses(), 'value' => function ($model) {
    return Yii::t('podium/view', ArrayHelper::getValue(User::getStatuses(), $model->status));
}], ['class' => ActionColumn::className(), 'header' => Yii::t('podium/view', 'Actions'), 'contentOptions' => ['class' => 'text-right'], 'headerOptions' => ['class' => 'text-right'], 'template' => '{view} {pm} {ban} {delete}', 'buttons' => ['view' => function ($url) {
    return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $url, ['class' => 'btn btn-default btn-xs', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'View Member')]);
}, 'pm' => function ($url, $model) {
    if ($model->id !== Yii::$app->user->id) {
        return Html::a('<span class="glyphicon glyphicon-envelope"></span>', ['messages/new', 'user' => $model->id], ['class' => 'btn btn-default btn-xs', 'data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => Yii::t('podium/view', 'Send Message')]);
    } else {
        return Html::a('<span class="glyphicon glyphicon-envelope"></span>', '#', ['class' => 'btn btn-xs disabled text-muted']);
    }
}, 'ban' => function ($url, $model) {
    if ($model->id !== Yii::$app->user->id) {
        if ($model->status !== User::STATUS_BANNED) {
开发者ID:keltstr,项目名称:yii2-podium,代码行数:31,代码来源:members.php

示例6:

<?php

/**
 * @var \common\components\View $this
 * @var \app\modules\main\models\Review $model
 */
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use kartik\rating\StarRating;
echo Html::beginTag('div', ['class' => 'review-item', 'id' => "comment-item-{$model->id}"]);
echo Html::beginTag('div', ['class' => 'review-info']);
echo Html::tag('span', $model->username, ['class' => 'review-username']);
if (!empty($model->email)) {
    echo '&nbsp;|&nbsp;';
    echo Html::mailto($model->email, null, ['class' => 'review-email']);
}
echo '&nbsp;|&nbsp;';
echo Html::tag('span', Yii::$app->formatter->asDatetime($model->created_at), ['class' => 'review-date']);
echo Html::endTag('div');
$options = ArrayHelper::merge($model->metaFields->rating->inputClass['widgetOptions'], ['name' => "review-rating-{$model->id}", 'value' => $model->rating, 'readonly' => true, 'pluginOptions' => ['size' => 'xs']]);
echo Html::tag('div', StarRating::widget($options), ['class' => 'review-rating']);
echo Html::tag('div', $model->text, ['class' => 'review-text']);
echo Html::endTag('div');
开发者ID:frostiks25,项目名称:rzwebsys7,代码行数:23,代码来源:_item.php

示例7:

<?php

use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $name string */
/* @var $message string */
/* @var $exception Exception */
$this->title = Yii::t('app', 'Error');
$email = Html::mailto(Yii::t('app', 'contact us'), Yii::$app->settings->emailMain);
?>
<div class="site-error">
  <?php 
if (isset($exception->statusCode) && $exception->statusCode === 404) {
    ?>
  <h3><?php 
    echo Yii::t('app', 'Page not found');
    ?>
</h3>
  <?php 
} else {
    ?>
  <div class="alert alert-danger">
      <?php 
    echo nl2br(Html::encode($message));
    ?>
  </div>
  <?php 
}
?>

  <p class="text-muted">
开发者ID:rkit,项目名称:bootstrap-yii2,代码行数:31,代码来源:error.php

示例8: drawImage

?>
</h1>

    <table class="table table-striped table-bordered detail-view">
        <tbody>
        <tr>
            <th width="300">Аватар</th>
            <td><?php 
echo drawImage($user->getAvatar(true));
?>
</td>
        </tr>
        <tr>
            <th>Email</th>
            <td><?php 
echo Html::mailto($user->getEmail());
?>
</td>
        </tr>
        <tr>
            <th>Имя</th>
            <td>Дмитрий</td>
        </tr>
        <tr>
            <th>Фамилия</th>
            <td>Мухортов</td>
        </tr>
        <tr>
            <th>Отчество</th>
            <td></td>
        </tr>
开发者ID:Makeyko,项目名称:galaxysss,代码行数:31,代码来源:client_item.php

示例9:

$post = ['title' => 'this is title', 'name' => 'this is name', 'child' => [1000, 200]];
echo Html::getInputName($model, 'username');
echo Html::getAttributeValue($model, 'username');
echo Html::tag('hr');
echo Html::getInputId($model, 'username');
echo Html::tag('hr');
?>

<?php 
echo Html::style('.username{color:red;font-size:8px;}');
echo Html::script('alert("script is test")', ['defer' => true]);
echo Html::tag('br/');
echo Html::cssFile('@web/css/ie5.css', ['condition' => 'IE 5']);
echo Html::jsFile('@web/js/main.js');
echo Html::a('超链接', ['home/list', 'id' => 12], ['class' => 'link']);
echo Html::mailto('Contact Us', 'xingcuntian@163.com');
echo Html::img('@web/images/logo.png', ['alt' => 'logo']);
?>
<hr/>

<?php 
echo Html::beginForm(['home/add', 'id' => $id], 'post', ['enctype' => 'multipart/form-data']);
echo Html::input('text', 'username', 'name', ['class' => 'name']);
echo Html::radio('agree', true, ['label' => 'this is radio']);
echo Html::checkbox('agree', true, ['label' => 'this is checkbox']);
?>

<?php 
echo Html::dropDownList('list', 1, ArrayHelper::map($option, 'id', 'name'));
echo Html::listBox('listBox', 2, ArrayHelper::map($option, 'id', 'name'));
?>
开发者ID:xingcuntian,项目名称:component_test,代码行数:31,代码来源:index.php

示例10: actionPassreset

 public function actionPassreset()
 {
     $model = new passResetForm();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         if ($model->passReset()) {
             Yii::$app->session->setFlash('success', 'Ваш запрос обработан. Проверьте электронную почту для получения дальнейших инструкций');
             return $this->goHome();
         } else {
             Yii::$app->session->setFlash('error', 'При сбросе пароля произошла ошибка. Обратитесь к ' . Html::mailto('администратору', Yii::$app->params['adminEmail']) . ' за поддержкой');
         }
     }
     return $this->render('passreset', ['model' => $model]);
 }
开发者ID:Andrewkha,项目名称:sportforecast,代码行数:13,代码来源:SiteController.php

示例11: getCreator

 public static function getCreator()
 {
     return Html::mailto('Abhimanyu Saharan', 'abhimanyu@teamvulcans.com');
 }
开发者ID:abhi1693,项目名称:yii2-app-advanced-startup-kit,代码行数:4,代码来源:Common.php

示例12: nl2br

use yii\helpers\Html;
$this->title = Yii::t('app', $name);
$this->params['breadcrumbs'][] = $this->title;
$this->params['title_icon'] = Yii::$app->params['general']['error_icon'];
?>

<div class="site-error">
    <div class="panel panel-default">
        <div class="panel-body posts">
            <div class="alert alert-danger">
                <?php 
echo nl2br(Html::encode($message));
?>
            </div>
            <p>
                <?php 
echo Yii::t('app', 'The above error occurred while the Web server was processing your request.');
?>
            </p>
            <p>
                <?php 
echo Yii::t('app', 'Please contact us if you think this is a server error. Thank you.');
?>
                (<?php 
echo Html::mailto(Yii::$app->params['general']['email_icon'] . ' ' . Yii::$app->params['app']['email']);
?>
)
            </p>
        </div>
    </div>
</div>
开发者ID:obedkin,项目名称:atlant,代码行数:31,代码来源:error.php

示例13:

            <div class="row">
                <div class="col-xs-4">
                    <h1 class="foot__title"> ИП Колтунов </h1>
                    <p class="foot__description">
                        Мягкая мебель на заказ в Волгограде.
                        <br />
                        Вся информация на сайте носит справочный характер и не является публичной офертой.
                    </p>
                    <div><span class="icon-phone icon-inline"></span> <?php 
echo $app->params['contactPhone'];
?>
 </div>
                    <div>
                        <span class="icon-email icon-inline"></span>
                        <?php 
echo Html::mailto($app->params['contactEmail'], $app->params['contactEmail'], ['class' => 'outer-link']);
?>
                    </div>
                </div>
                <div class="col-xs-8">
                    <?php 
if (isset($this->blocks['footerBlock'])) {
    ?>
                        <?php 
    echo $this->blocks['footerBlock'];
    ?>
                    <?php 
}
?>
                </div>
            </div>
开发者ID:secondsano,项目名称:mebel,代码行数:31,代码来源:client.php

示例14: date

		<?php 
echo $content;
?>
	</div>
</div>

<footer class="footer">
	<div class="container">
		<p class="pull-left">&copy; <?php 
echo Yii::$app->config->get(Enum::APP_NAME);
?>
 <?php 
echo date('Y');
?>
</p>

		<p class="pull-right">Maintained
			By <?php 
echo Html::mailto('Admin', Yii::$app->config->get(Enum::ADMIN_EMAIL));
?>
</p>
	</div>
</footer>

<?php 
$this->endBody();
?>
</body>
</html>
<?php 
$this->endPage();
开发者ID:abhi1693,项目名称:yii2-app-advanced-startup-kit,代码行数:31,代码来源:main.php

示例15: parse

 /**
  * Generate the Mail Tag.
  *
  * @param string $value The Brackets value `[]`.
  * @param string $sub The optional Parentheses value `()`
  * @see \luya\tag\TagInterface::parse()
  * @return string The parser tag.
  */
 public function parse($value, $sub)
 {
     return Html::mailto(!empty($sub) ? $sub : $value, $value);
 }
开发者ID:luyadev,项目名称:luya-core,代码行数:12,代码来源:MailTag.php


注:本文中的yii\helpers\Html::mailto方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。