@@ -25,10 +25,10 @@ |
||
| 25 | 25 | if ($model->load(Yii::$app->request->post()) && $model->validate()) { |
| 26 | 26 | |
| 27 | 27 | $html = '<h1>Contact Form</h1><p>Submission Date: '.date("d.m.Y H:i").'</p><table border="1">'; |
| 28 | - foreach($model->getAttributes() as $key => $value) { |
|
| 29 | - $html.='<tr><td>'.$model->getAttributeLabel($key).'</td><td>' . nl2br($value) . '</td>'; |
|
| 28 | + foreach ($model->getAttributes() as $key => $value) { |
|
| 29 | + $html .= '<tr><td>'.$model->getAttributeLabel($key).'</td><td>'.nl2br($value).'</td>'; |
|
| 30 | 30 | } |
| 31 | - $html.= '</table>'; |
|
| 31 | + $html .= '</table>'; |
|
| 32 | 32 | |
| 33 | 33 | $mail = Yii::$app->mail->compose('contactform', $html); |
| 34 | 34 | $mail->adresses($this->module->recipients); |
@@ -23,6 +23,6 @@ |
||
| 23 | 23 | $this->output(print_r($container->getReport(), true)); |
| 24 | 24 | |
| 25 | 25 | $timeElapsed = round((microtime(true) - $start) / 60, 2); |
| 26 | - return $this->outputSuccess('Cralwer finished in ' . $timeElapsed . ' min.'); |
|
| 26 | + return $this->outputSuccess('Cralwer finished in '.$timeElapsed.' min.'); |
|
| 27 | 27 | } |
| 28 | 28 | } |
@@ -22,9 +22,9 @@ |
||
| 22 | 22 | public function scenarios() |
| 23 | 23 | { |
| 24 | 24 | return [ |
| 25 | - 'restcreate' => ['title', 'text', 'cat_id', 'image_id', 'image_list', 'tags', 'timestamp_display_from', 'timestamp_display_until', 'file_list'], |
|
| 26 | - 'restupdate' => ['title', 'text', 'cat_id', 'image_id', 'image_list', 'tags', 'timestamp_create', 'timestamp_display_from', 'timestamp_display_until', 'is_display_limit', 'file_list'], |
|
| 27 | - ]; |
|
| 25 | + 'restcreate' => ['title', 'text', 'cat_id', 'image_id', 'image_list', 'tags', 'timestamp_display_from', 'timestamp_display_until', 'file_list'], |
|
| 26 | + 'restupdate' => ['title', 'text', 'cat_id', 'image_id', 'image_list', 'tags', 'timestamp_create', 'timestamp_display_from', 'timestamp_display_until', 'is_display_limit', 'file_list'], |
|
| 27 | + ]; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function rules() |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | public function scenarios() |
| 32 | 32 | { |
| 33 | 33 | return [ |
| 34 | - 'restcreate' => ['title'], |
|
| 35 | - 'restupdate' => ['title'], |
|
| 36 | - ]; |
|
| 34 | + 'restcreate' => ['title'], |
|
| 35 | + 'restupdate' => ['title'], |
|
| 36 | + ]; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // ngrest |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // composer autoload include |
| 3 | -require(__DIR__ . '/../vendor/autoload.php'); |
|
| 3 | +require(__DIR__.'/../vendor/autoload.php'); |
|
| 4 | 4 | |
| 5 | 5 | // use the luya boot wrapping class |
| 6 | 6 | $boot = new \luya\Boot(); |
| 7 | -$boot->setYiiPath(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); |
|
| 7 | +$boot->setYiiPath(__DIR__.'/../vendor/yiisoft/yii2/Yii.php'); |
|
| 8 | 8 | $boot->run(); |
@@ -43,16 +43,16 @@ |
||
| 43 | 43 | <ul> |
| 44 | 44 | <?php foreach (Yii::$app->menu->find()->where(['parent_nav_id' => 0, 'container' => 'default'])->all() as $item): ?> |
| 45 | 45 | <li> |
| 46 | - <a<?php if ($item->isActive): ?> class="active"<?php endif;?> href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> |
|
| 46 | + <a<?php if ($item->isActive): ?> class="active"<?php endif; ?> href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> |
|
| 47 | 47 | <?php if ($item->hasChildren()): ?> |
| 48 | 48 | <ul> |
| 49 | 49 | <?php foreach ($item->children as $child): ?> |
| 50 | - <li><a<?php if ($child->isActive): ?> class="active"<?php endif;?> href="<?php echo $child->link; ?>">» <?php echo $child->title; ?></a></li> |
|
| 50 | + <li><a<?php if ($child->isActive): ?> class="active"<?php endif; ?> href="<?php echo $child->link; ?>">» <?php echo $child->title; ?></a></li> |
|
| 51 | 51 | |
| 52 | 52 | <?php if ($child->hasChildren()): ?> |
| 53 | 53 | <ul> |
| 54 | 54 | <?php foreach ($child->children as $grandChild): ?> |
| 55 | - <li><a<?php if ($grandChild->isActive): ?> class="active"<?php endif;?> href="<?php echo $grandChild->link; ?>">» <?php echo $grandChild->title; ?></a> |
|
| 55 | + <li><a<?php if ($grandChild->isActive): ?> class="active"<?php endif; ?> href="<?php echo $grandChild->link; ?>">» <?php echo $grandChild->title; ?></a> |
|
| 56 | 56 | <?php endforeach; ?> |
| 57 | 57 | </ul> |
| 58 | 58 | <?php endif; ?> |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function callbackHalloAjax($foo) |
| 31 | 31 | { |
| 32 | - return 'foo' . $foo; |
|
| 32 | + return 'foo'.$foo; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -20,12 +20,12 @@ |
||
| 20 | 20 | public function config() |
| 21 | 21 | { |
| 22 | 22 | return [ |
| 23 | - 'vars' => [ |
|
| 24 | - ['var' => 'image', 'label' => 'Bild', 'type' => 'zaa-image-upload', 'options' => ['no_filter' => true]], |
|
| 25 | - ], |
|
| 26 | - 'cfgs' => [ |
|
| 27 | - ['var' => 'testimage', 'label' => 'testimage', 'type' => 'zaa-image-upload'], |
|
| 28 | - ], |
|
| 23 | + 'vars' => [ |
|
| 24 | + ['var' => 'image', 'label' => 'Bild', 'type' => 'zaa-image-upload', 'options' => ['no_filter' => true]], |
|
| 25 | + ], |
|
| 26 | + 'cfgs' => [ |
|
| 27 | + ['var' => 'testimage', 'label' => 'testimage', 'type' => 'zaa-image-upload'], |
|
| 28 | + ], |
|
| 29 | 29 | ]; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -20,9 +20,9 @@ |
||
| 20 | 20 | public function config() |
| 21 | 21 | { |
| 22 | 22 | return [ |
| 23 | - 'vars' => [ |
|
| 24 | - ['var' => 'images', 'label' => 'Images', 'type' => 'zaa-image-array-upload', 'options' => ['no_filter' => false]], |
|
| 25 | - ], |
|
| 23 | + 'vars' => [ |
|
| 24 | + ['var' => 'images', 'label' => 'Images', 'type' => 'zaa-image-array-upload', 'options' => ['no_filter' => false]], |
|
| 25 | + ], |
|
| 26 | 26 | ]; |
| 27 | 27 | } |
| 28 | 28 | |