Commit 7f2c9cea7992247093825e73b0cff15ab1f4a13c
1 parent
54a26acc
Изменил вывод через ImageHelper
Showing
1 changed file
with
18 additions
and
4 deletions
Show diff stats
frontend/views/site/doctor.php
@@ -61,7 +61,21 @@ use artbox\core\helpers\ImageHelper; | @@ -61,7 +61,21 @@ use artbox\core\helpers\ImageHelper; | ||
61 | $docSurname = ($docFio[1]) ?? ''; | 61 | $docSurname = ($docFio[1]) ?? ''; |
62 | $docPosition = $doc->language->position; | 62 | $docPosition = $doc->language->position; |
63 | $docDescription = $doc->language->description; | 63 | $docDescription = $doc->language->description; |
64 | - $docImg1 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; | 64 | + $img1 = ''; |
65 | + $img2 = ''; | ||
66 | + if (isset($doc->image)) { | ||
67 | + $img1 = ImageHelper::set(($doc->image) ? $doc->image->getPath() : null) | ||
68 | + ->cropResize(340, 440) | ||
69 | + ->quality(84) | ||
70 | + ->renderImage(); | ||
71 | + $img2 = ImageHelper::set(($doc->image) ? $doc->image->getPath() : null) | ||
72 | + ->cropResize(165, 165) | ||
73 | + ->quality(84) | ||
74 | + ->renderImage(); | ||
75 | + | ||
76 | + } | ||
77 | + #die(var_dump(htmlspecialchars($img1))); | ||
78 | + # $docImg1 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; | ||
65 | $docImg2 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; | 79 | $docImg2 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; |
66 | $docImg3 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; | 80 | $docImg3 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; |
67 | 81 | ||
@@ -69,7 +83,7 @@ use artbox\core\helpers\ImageHelper; | @@ -69,7 +83,7 @@ use artbox\core\helpers\ImageHelper; | ||
69 | $first .= ' <div class="slider-doc-items"> | 83 | $first .= ' <div class="slider-doc-items"> |
70 | <div class="slider-doc-img-wr"> | 84 | <div class="slider-doc-img-wr"> |
71 | <!-- 340x440px--> | 85 | <!-- 340x440px--> |
72 | - <img src="' . $docImg1 . '" alt="" class="doctor_long_img"> | 86 | + ' . $img1 . ' |
73 | </div> | 87 | </div> |
74 | </div>'; | 88 | </div>'; |
75 | 89 | ||
@@ -77,7 +91,7 @@ use artbox\core\helpers\ImageHelper; | @@ -77,7 +91,7 @@ use artbox\core\helpers\ImageHelper; | ||
77 | $second .= ' <div class="' . $activeStyle . ' slider-doc-main-items" style="display: none;"> | 91 | $second .= ' <div class="' . $activeStyle . ' slider-doc-main-items" style="display: none;"> |
78 | <div class="slider-doc-main-item-img"> | 92 | <div class="slider-doc-main-item-img"> |
79 | <div> | 93 | <div> |
80 | - <img src="' . $docImg2 . '" alt="" class="doctor_long_img"> | 94 | + ' . $img1 . ' |
81 | </div> | 95 | </div> |
82 | </div> | 96 | </div> |
83 | <div class="slider-doc-main-item-txt"> | 97 | <div class="slider-doc-main-item-txt"> |
@@ -105,7 +119,7 @@ use artbox\core\helpers\ImageHelper; | @@ -105,7 +119,7 @@ use artbox\core\helpers\ImageHelper; | ||
105 | <div class="col-xs-12 col-sm-4 doctor-img-wr"> | 119 | <div class="col-xs-12 col-sm-4 doctor-img-wr"> |
106 | <div class="doctor-img"> | 120 | <div class="doctor-img"> |
107 | <!--165x165px--> | 121 | <!--165x165px--> |
108 | - <img src="' . $docImg2 . '" alt="" class="doctor_short_img"> | 122 | + ' . $img2 . ' |
109 | </div> | 123 | </div> |
110 | </div> | 124 | </div> |
111 | <div class="col-xs-12 col-sm-8"> | 125 | <div class="col-xs-12 col-sm-8"> |