1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
| <?php
| namespace JVBase\managers\SEO\render\Traits\_Properties;
|
| use JVBase\managers\SEO\render\Thing\Intangible\StructuredValue\OpeningHoursSpecification;
|
| if (!defined('ABSPATH')) {
| exit;
| }
| trait openingHoursSpecificationTrait {
| /**
| * @var OpeningHoursSpecification The opening hours of a certain place.
| */
| protected OpeningHoursSpecification $openingHoursSpecification;
|
| public function getOpeningHoursSpecification():?OpeningHoursSpecification
| {
| return $this->openingHoursSpecification??null;
| }
| public function setOpeningHoursSpecification(OpeningHoursSpecification $openingHoursSpecification):void
| {
| $this->openingHoursSpecification = $openingHoursSpecification;
| }
|
| public function getOpeningHoursSpecificationFieldConfig():array
| {
| return [
| 'type' => 'repeater',
| 'label' => 'Opening Hours',
| 'fields' => [
| 'dayOfWeek' => [
| 'type' => 'radio',
| 'label' => 'Day(s) of Week',
| 'options' => [
| 'Mo' => 'Monday',
| 'Tu' => 'Tuesday',
| 'We' => 'Wednesday',
| 'Th' => 'Thursday',
| 'Fr' => 'Friday',
| 'Sa' => 'Saturday',
| 'Su' => 'Sunday'
| ]
| ],
| 'opens' => [
| 'type' => 'time',
| 'label' => 'Opens At',
| ],
| 'closes' => [
| 'type' => 'time',
| 'label' => 'Closes At',
| ]
| ]
| ];
| }
| }
|
|