Example #1
0
 /**
  * Sends an email to the specified email address using the information collected by this model.
  *
  * @param  string  $email the target email address
  * @return boolean whether the email was sent
  */
 public function sendEmail()
 {
     $emailConfiguration = Configuration::get('email-for-contact-form');
     $email = empty($emailConfiguration) ? Yii::$app->params['adminEmail'] : $emailConfiguration;
     if (!isset($this->body_more)) {
         return Yii::$app->mailer->compose(['html' => 'contact-html', 'text' => 'contact-text'], ['name' => $this->name, 'email' => $this->email, 'body' => $this->body])->setTo($email)->setFrom([$this->email => $this->name])->setSubject(Yii::t('mail', 'New message from Contact Form'))->setTextBody($this->body)->send();
     }
 }
Example #2
0
use common\helpers\Configuration;
/* @var $this yii\web\View */
$this->title = 'My Yii Application';
?>
<div class="site-index">

    <div class="jumbotron">
        <?php 
echo Translate::t('index', 'texto1');
?>
        <h1>Congratulationss! <?php 
echo Yii::t('frontend/index', 'probandoss');
?>
</h1>
        <?php 
echo Configuration::get('fasd-asd-afs-fs');
?>
        <p class="lead">You have successfully created your Yii-powered application.</p>

        <p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>
    </div>

    <div class="body-content">

        <div class="row">
            <div class="col-lg-4">
                <?php 
echo Gallery::widget(['slug' => 'fsa', 'ulClass' => 'ulclass', 'liClass' => 'testli', 'imgClass' => 'imgclass']);
?>
                <?php 
echo Gallery::widget(['slug' => 'home-luxury-cars']);