|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* SEOmatic plugin for Craft CMS 4 |
|
5
|
|
|
* |
|
6
|
|
|
* A turnkey SEO implementation for Craft CMS that is comprehensive, powerful, and flexible |
|
7
|
|
|
* |
|
8
|
|
|
* @link https://nystudio107.com |
|
9
|
|
|
* @copyright Copyright (c) 2023 nystudio107 |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace nystudio107\seomatic\models\jsonld; |
|
13
|
|
|
|
|
14
|
|
|
use nystudio107\seomatic\models\MetaJsonLd; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* schema.org version: v15.0-release |
|
18
|
|
|
* DietarySupplement - A product taken by mouth that contains a dietary ingredient intended to |
|
19
|
|
|
* supplement the diet. Dietary ingredients may include vitamins, minerals, |
|
20
|
|
|
* herbs or other botanicals, amino acids, and substances such as enzymes, |
|
21
|
|
|
* organ tissues, glandulars and metabolites. |
|
22
|
|
|
* |
|
23
|
|
|
* @author nystudio107 |
|
24
|
|
|
* @package Seomatic |
|
25
|
|
|
* @see https://schema.org/DietarySupplement |
|
26
|
|
|
*/ |
|
27
|
|
|
class DietarySupplement extends MetaJsonLd implements DietarySupplementInterface, ProductInterface, ThingInterface, SubstanceInterface, MedicalEntityInterface |
|
28
|
|
|
{ |
|
29
|
|
|
use DietarySupplementTrait; |
|
30
|
|
|
use ProductTrait; |
|
31
|
|
|
use ThingTrait; |
|
32
|
|
|
use SubstanceTrait; |
|
33
|
|
|
use MedicalEntityTrait; |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* The Schema.org Type Name |
|
37
|
|
|
* |
|
38
|
|
|
* @var string |
|
39
|
|
|
*/ |
|
40
|
|
|
public static string $schemaTypeName = 'DietarySupplement'; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* The Schema.org Type Scope |
|
44
|
|
|
* |
|
45
|
|
|
* @var string |
|
46
|
|
|
*/ |
|
47
|
|
|
public static string $schemaTypeScope = 'https://schema.org/DietarySupplement'; |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* The Schema.org Type Extends |
|
51
|
|
|
* |
|
52
|
|
|
* @var string |
|
53
|
|
|
*/ |
|
54
|
|
|
public static string $schemaTypeExtends = 'Product'; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* The Schema.org Type Description |
|
58
|
|
|
* |
|
59
|
|
|
* @var string |
|
60
|
|
|
*/ |
|
61
|
|
|
public static string $schemaTypeDescription = 'A product taken by mouth that contains a dietary ingredient intended to supplement the diet. Dietary ingredients may include vitamins, minerals, herbs or other botanicals, amino acids, and substances such as enzymes, organ tissues, glandulars and metabolites.'; |
|
62
|
|
|
|
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @inheritdoc |
|
66
|
|
|
*/ |
|
67
|
|
|
public function getSchemaPropertyNames(): array |
|
68
|
|
|
{ |
|
69
|
|
|
return array_keys($this->getSchemaPropertyExpectedTypes()); |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* @inheritdoc |
|
75
|
|
|
*/ |
|
76
|
|
|
public function getSchemaPropertyExpectedTypes(): array |
|
77
|
|
|
{ |
|
78
|
|
|
return [ |
|
79
|
|
|
'activeIngredient' => ['Text'], |
|
80
|
|
|
'additionalProperty' => ['PropertyValue'], |
|
81
|
|
|
'additionalType' => ['URL'], |
|
82
|
|
|
'aggregateRating' => ['AggregateRating'], |
|
83
|
|
|
'alternateName' => ['Text'], |
|
84
|
|
|
'asin' => ['Text', 'URL'], |
|
85
|
|
|
'audience' => ['Audience'], |
|
86
|
|
|
'award' => ['Text'], |
|
87
|
|
|
'awards' => ['Text'], |
|
88
|
|
|
'brand' => ['Brand', 'Organization'], |
|
89
|
|
|
'category' => ['URL', 'CategoryCode', 'Text', 'Thing', 'PhysicalActivityCategory'], |
|
90
|
|
|
'code' => ['MedicalCode'], |
|
91
|
|
|
'color' => ['Text'], |
|
92
|
|
|
'countryOfAssembly' => ['Text'], |
|
93
|
|
|
'countryOfLastProcessing' => ['Text'], |
|
94
|
|
|
'countryOfOrigin' => ['Country'], |
|
95
|
|
|
'depth' => ['QuantitativeValue', 'Distance'], |
|
96
|
|
|
'description' => ['Text'], |
|
97
|
|
|
'disambiguatingDescription' => ['Text'], |
|
98
|
|
|
'funding' => ['Grant'], |
|
99
|
|
|
'gtin' => ['Text', 'URL'], |
|
100
|
|
|
'gtin12' => ['Text'], |
|
101
|
|
|
'gtin13' => ['Text'], |
|
102
|
|
|
'gtin14' => ['Text'], |
|
103
|
|
|
'gtin8' => ['Text'], |
|
104
|
|
|
'guideline' => ['MedicalGuideline'], |
|
105
|
|
|
'hasAdultConsideration' => ['AdultOrientedEnumeration'], |
|
106
|
|
|
'hasEnergyConsumptionDetails' => ['EnergyConsumptionDetails'], |
|
107
|
|
|
'hasMeasurement' => ['QuantitativeValue'], |
|
108
|
|
|
'hasMerchantReturnPolicy' => ['MerchantReturnPolicy'], |
|
109
|
|
|
'height' => ['QuantitativeValue', 'Distance'], |
|
110
|
|
|
'identifier' => ['PropertyValue', 'URL', 'Text'], |
|
111
|
|
|
'image' => ['URL', 'ImageObject'], |
|
112
|
|
|
'inProductGroupWithID' => ['Text'], |
|
113
|
|
|
'isAccessoryOrSparePartFor' => ['Product'], |
|
114
|
|
|
'isConsumableFor' => ['Product'], |
|
115
|
|
|
'isFamilyFriendly' => ['Boolean'], |
|
116
|
|
|
'isProprietary' => ['Boolean'], |
|
117
|
|
|
'isRelatedTo' => ['Product', 'Service'], |
|
118
|
|
|
'isSimilarTo' => ['Product', 'Service'], |
|
119
|
|
|
'isVariantOf' => ['ProductModel', 'ProductGroup'], |
|
120
|
|
|
'itemCondition' => ['OfferItemCondition'], |
|
121
|
|
|
'keywords' => ['URL', 'DefinedTerm', 'Text'], |
|
122
|
|
|
'legalStatus' => ['Text', 'DrugLegalStatus', 'MedicalEnumeration'], |
|
123
|
|
|
'logo' => ['ImageObject', 'URL'], |
|
124
|
|
|
'mainEntityOfPage' => ['URL', 'CreativeWork'], |
|
125
|
|
|
'manufacturer' => ['Organization'], |
|
126
|
|
|
'material' => ['Product', 'URL', 'Text'], |
|
127
|
|
|
'maximumIntake' => ['MaximumDoseSchedule'], |
|
128
|
|
|
'mechanismOfAction' => ['Text'], |
|
129
|
|
|
'medicineSystem' => ['MedicineSystem'], |
|
130
|
|
|
'mobileUrl' => ['Text'], |
|
131
|
|
|
'model' => ['ProductModel', 'Text'], |
|
132
|
|
|
'mpn' => ['Text'], |
|
133
|
|
|
'name' => ['Text'], |
|
134
|
|
|
'negativeNotes' => ['ListItem', 'Text', 'ItemList', 'WebContent'], |
|
135
|
|
|
'nonProprietaryName' => ['Text'], |
|
136
|
|
|
'nsn' => ['Text'], |
|
137
|
|
|
'offers' => ['Demand', 'Offer'], |
|
138
|
|
|
'pattern' => ['DefinedTerm', 'Text'], |
|
139
|
|
|
'positiveNotes' => ['Text', 'WebContent', 'ListItem', 'ItemList'], |
|
140
|
|
|
'potentialAction' => ['Action'], |
|
141
|
|
|
'productID' => ['Text'], |
|
142
|
|
|
'productionDate' => ['Date'], |
|
143
|
|
|
'proprietaryName' => ['Text'], |
|
144
|
|
|
'purchaseDate' => ['Date'], |
|
145
|
|
|
'recognizingAuthority' => ['Organization'], |
|
146
|
|
|
'recommendedIntake' => ['RecommendedDoseSchedule'], |
|
147
|
|
|
'releaseDate' => ['Date'], |
|
148
|
|
|
'relevantSpecialty' => ['MedicalSpecialty'], |
|
149
|
|
|
'review' => ['Review'], |
|
150
|
|
|
'reviews' => ['Review'], |
|
151
|
|
|
'safetyConsideration' => ['Text'], |
|
152
|
|
|
'sameAs' => ['URL'], |
|
153
|
|
|
'size' => ['DefinedTerm', 'QuantitativeValue', 'Text', 'SizeSpecification'], |
|
154
|
|
|
'sku' => ['Text'], |
|
155
|
|
|
'slogan' => ['Text'], |
|
156
|
|
|
'study' => ['MedicalStudy'], |
|
157
|
|
|
'subjectOf' => ['Event', 'CreativeWork'], |
|
158
|
|
|
'targetPopulation' => ['Text'], |
|
159
|
|
|
'url' => ['URL'], |
|
160
|
|
|
'weight' => ['QuantitativeValue'], |
|
161
|
|
|
'width' => ['Distance', 'QuantitativeValue'] |
|
162
|
|
|
]; |
|
163
|
|
|
} |
|
164
|
|
|
|
|
165
|
|
|
|
|
166
|
|
|
/** |
|
167
|
|
|
* @inheritdoc |
|
168
|
|
|
*/ |
|
169
|
|
|
public function getSchemaPropertyDescriptions(): array |
|
170
|
|
|
{ |
|
171
|
|
|
return [ |
|
172
|
|
|
'activeIngredient' => 'An active ingredient, typically chemical compounds and/or biologic substances.', |
|
173
|
|
|
'additionalProperty' => 'A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org. Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. ', |
|
174
|
|
|
'additionalType' => 'An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \'typeof\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.', |
|
175
|
|
|
'aggregateRating' => 'The overall rating, based on a collection of reviews or ratings, of the item.', |
|
176
|
|
|
'alternateName' => 'An alias for the item.', |
|
177
|
|
|
'asin' => 'An Amazon Standard Identification Number (ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com and its partners for product identification within the Amazon organization (summary from [Wikipedia](https://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number)\'s article). Note also that this is a definition for how to include ASINs in Schema.org data, and not a definition of ASINs in general - see documentation from Amazon for authoritative details. ASINs are most commonly encoded as text strings, but the [asin] property supports URL/URI as potential values too.', |
|
178
|
|
|
'audience' => 'An intended audience, i.e. a group for whom something was created.', |
|
179
|
|
|
'award' => 'An award won by or for this item.', |
|
180
|
|
|
'awards' => 'Awards won by or for this item.', |
|
181
|
|
|
'brand' => 'The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.', |
|
182
|
|
|
'category' => 'A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.', |
|
183
|
|
|
'code' => 'A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc.', |
|
184
|
|
|
'color' => 'The color of the product.', |
|
185
|
|
|
'countryOfAssembly' => 'The place where the product was assembled.', |
|
186
|
|
|
'countryOfLastProcessing' => 'The place where the item (typically [[Product]]) was last processed and tested before importation.', |
|
187
|
|
|
'countryOfOrigin' => 'The country of origin of something, including products as well as creative works such as movie and TV content. In the case of TV and movie, this would be the country of the principle offices of the production company or individual responsible for the movie. For other kinds of [[CreativeWork]] it is difficult to provide fully general guidance, and properties such as [[contentLocation]] and [[locationCreated]] may be more applicable. In the case of products, the country of origin of the product. The exact interpretation of this may vary by context and product type, and cannot be fully enumerated here.', |
|
188
|
|
|
'depth' => 'The depth of the item.', |
|
189
|
|
|
'description' => 'A description of the item.', |
|
190
|
|
|
'disambiguatingDescription' => 'A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.', |
|
191
|
|
|
'funding' => 'A [[Grant]] that directly or indirectly provide funding or sponsorship for this item. See also [[ownershipFundingInfo]].', |
|
192
|
|
|
'gtin' => 'A Global Trade Item Number ([GTIN](https://www.gs1.org/standards/id-keys/gtin)). GTINs identify trade items, including products and services, using numeric identification codes. The GS1 [digital link specifications](https://www.gs1.org/standards/Digital-Link/) express GTINs as URLs (URIs, IRIs, etc.). Details including regular expression examples can be found in, Section 6 of the GS1 URI Syntax specification; see also [schema.org tracking issue](https://github.com/schemaorg/schemaorg/issues/3156#issuecomment-1209522809) for schema.org-specific discussion. A correct [[gtin]] value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string. The numeric component should also have a [valid GS1 check digit](https://www.gs1.org/services/check-digit-calculator) and meet the other rules for valid GTINs. See also [GS1\'s GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) and [Wikipedia](https://en.wikipedia.org/wiki/Global_Trade_Item_Number) for more details. Left-padding of the gtin values is not required or encouraged. The [[gtin]] property generalizes the earlier [[gtin8]], [[gtin12]], [[gtin13]], and [[gtin14]] properties. Note also that this is a definition for how to include GTINs in Schema.org data, and not a definition of GTINs in general - see the GS1 documentation for authoritative details.', |
|
193
|
|
|
'gtin12' => 'The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
194
|
|
|
'gtin13' => 'The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceding zero. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
195
|
|
|
'gtin14' => 'The GTIN-14 code of the product, or the product to which the offer refers. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
196
|
|
|
'gtin8' => 'The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.', |
|
197
|
|
|
'guideline' => 'A medical guideline related to this entity.', |
|
198
|
|
|
'hasAdultConsideration' => 'Used to tag an item to be intended or suitable for consumption or use by adults only.', |
|
199
|
|
|
'hasEnergyConsumptionDetails' => 'Defines the energy efficiency Category (also known as "class" or "rating") for a product according to an international energy efficiency standard.', |
|
200
|
|
|
'hasMeasurement' => 'A product measurement, for example the inseam of pants, the wheel size of a bicycle, or the gauge of a screw. Usually an exact measurement, but can also be a range of measurements for adjustable products, for example belts and ski bindings.', |
|
201
|
|
|
'hasMerchantReturnPolicy' => 'Specifies a MerchantReturnPolicy that may be applicable.', |
|
202
|
|
|
'height' => 'The height of the item.', |
|
203
|
|
|
'identifier' => 'The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details. ', |
|
204
|
|
|
'image' => 'An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].', |
|
205
|
|
|
'inProductGroupWithID' => 'Indicates the [[productGroupID]] for a [[ProductGroup]] that this product [[isVariantOf]]. ', |
|
206
|
|
|
'isAccessoryOrSparePartFor' => 'A pointer to another product (or multiple products) for which this product is an accessory or spare part.', |
|
207
|
|
|
'isConsumableFor' => 'A pointer to another product (or multiple products) for which this product is a consumable.', |
|
208
|
|
|
'isFamilyFriendly' => 'Indicates whether this content is family friendly.', |
|
209
|
|
|
'isProprietary' => 'True if this item\'s name is a proprietary/brand name (vs. generic name).', |
|
210
|
|
|
'isRelatedTo' => 'A pointer to another, somehow related product (or multiple products).', |
|
211
|
|
|
'isSimilarTo' => 'A pointer to another, functionally similar product (or multiple products).', |
|
212
|
|
|
'isVariantOf' => 'Indicates the kind of product that this is a variant of. In the case of [[ProductModel]], this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a [[ProductGroup]], the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with [[ProductGroup]], this property can apply to any [[Product]] included in the group.', |
|
213
|
|
|
'itemCondition' => 'A predefined value from OfferItemCondition specifying the condition of the product or service, or the products or services included in the offer. Also used for product return policies to specify the condition of products accepted for returns.', |
|
214
|
|
|
'keywords' => 'Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.', |
|
215
|
|
|
'legalStatus' => 'The drug or supplement\'s legal status, including any controlled substance schedules that apply.', |
|
216
|
|
|
'logo' => 'An associated logo.', |
|
217
|
|
|
'mainEntityOfPage' => 'Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.', |
|
218
|
|
|
'manufacturer' => 'The manufacturer of the product.', |
|
219
|
|
|
'material' => 'A material that something is made from, e.g. leather, wool, cotton, paper.', |
|
220
|
|
|
'maximumIntake' => 'Recommended intake of this supplement for a given population as defined by a specific recommending authority.', |
|
221
|
|
|
'mechanismOfAction' => 'The specific biochemical interaction through which this drug or supplement produces its pharmacological effect.', |
|
222
|
|
|
'medicineSystem' => 'The system of medicine that includes this MedicalEntity, for example \'evidence-based\', \'homeopathic\', \'chiropractic\', etc.', |
|
223
|
|
|
'mobileUrl' => 'The [[mobileUrl]] property is provided for specific situations in which data consumers need to determine whether one of several provided URLs is a dedicated \'mobile site\'. To discourage over-use, and reflecting intial usecases, the property is expected only on [[Product]] and [[Offer]], rather than [[Thing]]. The general trend in web technology is towards [responsive design](https://en.wikipedia.org/wiki/Responsive_web_design) in which content can be flexibly adapted to a wide range of browsing environments. Pages and sites referenced with the long-established [[url]] property should ideally also be usable on a wide variety of devices, including mobile phones. In most cases, it would be pointless and counter productive to attempt to update all [[url]] markup to use [[mobileUrl]] for more mobile-oriented pages. The property is intended for the case when items (primarily [[Product]] and [[Offer]]) have extra URLs hosted on an additional "mobile site" alongside the main one. It should not be taken as an endorsement of this publication style. ', |
|
224
|
|
|
'model' => 'The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties.', |
|
225
|
|
|
'mpn' => 'The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.', |
|
226
|
|
|
'name' => 'The name of the item.', |
|
227
|
|
|
'negativeNotes' => 'Provides negative considerations regarding something, most typically in pro/con lists for reviews (alongside [[positiveNotes]]). For symmetry In the case of a [[Review]], the property describes the [[itemReviewed]] from the perspective of the review; in the case of a [[Product]], the product itself is being described. Since product descriptions tend to emphasise positive claims, it may be relatively unusual to find [[negativeNotes]] used in this way. Nevertheless for the sake of symmetry, [[negativeNotes]] can be used on [[Product]]. The property values can be expressed either as unstructured text (repeated as necessary), or if ordered, as a list (in which case the most negative is at the beginning of the list).', |
|
228
|
|
|
'nonProprietaryName' => 'The generic name of this drug or supplement.', |
|
229
|
|
|
'nsn' => 'Indicates the [NATO stock number](https://en.wikipedia.org/wiki/NATO_Stock_Number) (nsn) of a [[Product]]. ', |
|
230
|
|
|
'offers' => 'An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use [[businessFunction]] to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a [[Demand]]. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer. ', |
|
231
|
|
|
'pattern' => 'A pattern that something has, for example \'polka dot\', \'striped\', \'Canadian flag\'. Values are typically expressed as text, although links to controlled value schemes are also supported.', |
|
232
|
|
|
'positiveNotes' => 'Provides positive considerations regarding something, for example product highlights or (alongside [[negativeNotes]]) pro/con lists for reviews. In the case of a [[Review]], the property describes the [[itemReviewed]] from the perspective of the review; in the case of a [[Product]], the product itself is being described. The property values can be expressed either as unstructured text (repeated as necessary), or if ordered, as a list (in which case the most positive is at the beginning of the list).', |
|
233
|
|
|
'potentialAction' => 'Indicates a potential Action, which describes an idealized action in which this thing would play an \'object\' role.', |
|
234
|
|
|
'productID' => 'The product identifier, such as ISBN. For example: ``` meta itemprop="productID" content="isbn:123-456-789" ```.', |
|
235
|
|
|
'productionDate' => 'The date of production of the item, e.g. vehicle.', |
|
236
|
|
|
'proprietaryName' => 'Proprietary name given to the diet plan, typically by its originator or creator.', |
|
237
|
|
|
'purchaseDate' => 'The date the item, e.g. vehicle, was purchased by the current owner.', |
|
238
|
|
|
'recognizingAuthority' => 'If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine.', |
|
239
|
|
|
'recommendedIntake' => 'Recommended intake of this supplement for a given population as defined by a specific recommending authority.', |
|
240
|
|
|
'releaseDate' => 'The release date of a product or product model. This can be used to distinguish the exact variant of a product.', |
|
241
|
|
|
'relevantSpecialty' => 'If applicable, a medical specialty in which this entity is relevant.', |
|
242
|
|
|
'review' => 'A review of the item.', |
|
243
|
|
|
'reviews' => 'Review of the item.', |
|
244
|
|
|
'safetyConsideration' => 'Any potential safety concern associated with the supplement. May include interactions with other drugs and foods, pregnancy, breastfeeding, known adverse reactions, and documented efficacy of the supplement.', |
|
245
|
|
|
'sameAs' => 'URL of a reference Web page that unambiguously indicates the item\'s identity. E.g. the URL of the item\'s Wikipedia page, Wikidata entry, or official website.', |
|
246
|
|
|
'size' => 'A standardized size of a product or creative work, specified either through a simple textual string (for example \'XL\', \'32Wx34L\'), a QuantitativeValue with a unitCode, or a comprehensive and structured [[SizeSpecification]]; in other cases, the [[width]], [[height]], [[depth]] and [[weight]] properties may be more applicable. ', |
|
247
|
|
|
'sku' => 'The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.', |
|
248
|
|
|
'slogan' => 'A slogan or motto associated with the item.', |
|
249
|
|
|
'study' => 'A medical study or trial related to this entity.', |
|
250
|
|
|
'subjectOf' => 'A CreativeWork or Event about this Thing.', |
|
251
|
|
|
'targetPopulation' => 'Characteristics of the population for which this is intended, or which typically uses it, e.g. \'adults\'.', |
|
252
|
|
|
'url' => 'URL of the item.', |
|
253
|
|
|
'weight' => 'The weight of the product or person.', |
|
254
|
|
|
'width' => 'The width of the item.' |
|
255
|
|
|
]; |
|
256
|
|
|
} |
|
257
|
|
|
|
|
258
|
|
|
|
|
259
|
|
|
/** |
|
260
|
|
|
* @inheritdoc |
|
261
|
|
|
*/ |
|
262
|
|
|
public function getGoogleRequiredSchema(): array |
|
263
|
|
|
{ |
|
264
|
|
|
return ['description', 'name']; |
|
265
|
|
|
} |
|
266
|
|
|
|
|
267
|
|
|
|
|
268
|
|
|
/** |
|
269
|
|
|
* @inheritdoc |
|
270
|
|
|
*/ |
|
271
|
|
|
public function getGoogleRecommendedSchema(): array |
|
272
|
|
|
{ |
|
273
|
|
|
return ['image', 'url']; |
|
274
|
|
|
} |
|
275
|
|
|
|
|
276
|
|
|
|
|
277
|
|
|
/** |
|
278
|
|
|
* @inheritdoc |
|
279
|
|
|
*/ |
|
280
|
|
|
public function defineRules(): array |
|
281
|
|
|
{ |
|
282
|
|
|
$rules = parent::defineRules(); |
|
283
|
|
|
$rules = array_merge($rules, [ |
|
284
|
|
|
[$this->getSchemaPropertyNames(), 'validateJsonSchema'], |
|
285
|
|
|
[$this->getGoogleRequiredSchema(), 'required', 'on' => ['google'], 'message' => 'This property is required by Google.'], |
|
286
|
|
|
[$this->getGoogleRecommendedSchema(), 'required', 'on' => ['google'], 'message' => 'This property is recommended by Google.'] |
|
287
|
|
|
]); |
|
288
|
|
|
|
|
289
|
|
|
return $rules; |
|
290
|
|
|
} |
|
291
|
|
|
} |
|
292
|
|
|
|