Skip to content

Commit fdb2bc4

Browse files
SaleEvent доработка
1 parent d7e58e9 commit fdb2bc4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/CmsSeoComponent.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,12 @@ public function bootstrap($application)
823823
'description' => $this->sale_event_1_description ? $this->sale_event_1_description : $this->sale_event_1_name,
824824
'startDate' => $startDate,
825825
'endDate' => $endDate,
826+
'eventAttendanceMode' => "https://schema.org/MixedEventAttendanceMode",
827+
"eventStatus" => "https://schema.org/EventScheduled",
828+
'organizer' => [
829+
'name' => \Yii::$app->skeeks->site->name,
830+
'url' => Url::home(true)
831+
],
826832
'location' => [
827833
'@context' => "https://schema.org",
828834
'@type' => "Place",
@@ -833,6 +839,10 @@ public function bootstrap($application)
833839
],
834840
],
835841
];
842+
843+
if (\Yii::$app->skeeks->site->image) {
844+
$eventData["image"] = \Yii::$app->skeeks->site->image->absoluteSrc;
845+
}
836846

837847
if ($this->sale_event_1_addressLocality) {
838848
$eventData["location"]["address"]["addressLocality"] = $this->sale_event_1_addressLocality;
@@ -855,6 +865,12 @@ public function bootstrap($application)
855865
'description' => $this->sale_event_2_description ? $this->sale_event_2_description : $this->sale_event_2_name,
856866
'startDate' => $startDate,
857867
'endDate' => $endDate,
868+
'eventAttendanceMode' => "https://schema.org/MixedEventAttendanceMode",
869+
"eventStatus" => "https://schema.org/EventScheduled",
870+
'organizer' => [
871+
'name' => \Yii::$app->skeeks->site->name,
872+
'url' => Url::home(true)
873+
],
858874
'location' => [
859875
'@context' => "https://schema.org",
860876
'@type' => "Place",
@@ -865,6 +881,9 @@ public function bootstrap($application)
865881
],
866882
],
867883
];
884+
if (\Yii::$app->skeeks->site->image) {
885+
$eventData["image"] = \Yii::$app->skeeks->site->image->absoluteSrc;
886+
}
868887

869888
if ($this->sale_event_2_addressLocality) {
870889
$eventData["location"]["address"]["addressLocality"] = $this->sale_event_2_addressLocality;
@@ -887,6 +906,12 @@ public function bootstrap($application)
887906
'description' => $this->sale_event_3_description ? $this->sale_event_3_description : $this->sale_event_3_name,
888907
'startDate' => $startDate,
889908
'endDate' => $endDate,
909+
'eventAttendanceMode' => "https://schema.org/MixedEventAttendanceMode",
910+
"eventStatus" => "https://schema.org/EventScheduled",
911+
'organizer' => [
912+
'name' => \Yii::$app->skeeks->site->name,
913+
'url' => Url::home(true)
914+
],
890915
'location' => [
891916
'@context' => "https://schema.org",
892917
'@type' => "Place",
@@ -897,6 +922,9 @@ public function bootstrap($application)
897922
],
898923
],
899924
];
925+
if (\Yii::$app->skeeks->site->image) {
926+
$eventData["image"] = \Yii::$app->skeeks->site->image->absoluteSrc;
927+
}
900928

901929
if ($this->sale_event_3_addressLocality) {
902930
$eventData["location"]["address"]["addressLocality"] = $this->sale_event_3_addressLocality;

0 commit comments

Comments
 (0)