public function AmpMetadata::setContentSchemaType in Accelerated Mobile Pages (AMP) 8
Set the content schema type.
Values can include:
- 'Article'
- 'NewsArticle'
- 'BlogPosting'
Parameters
string $content_schema_type: The schema type of this content.
Overrides AmpMetadataInterface::setContentSchemaType
File
- src/
Entity/ AmpMetadata.php, line 245
Class
- AmpMetadata
- Defines the AMP Metadata entity.
Namespace
Drupal\amp\EntityCode
public function setContentSchemaType($content_schema_type) {
$valid_schema_types = [
'Article',
'NewsArticle',
'BlogPosting',
];
if (in_array($content_schema_type, $valid_schema_types)) {
$this->contentSchemaType = $content_schema_type;
}
}