PHP code example of dorsetdigital / silverstripe-schema-manager
1. Go to this page and download the library: Download dorsetdigital/silverstripe-schema-manager library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dorsetdigital / silverstripe-schema-manager example snippets
use DorsetDigital\SchemaManager\Control\SchemaRegistry;
SchemaRegistry::addEntity(
'https://example.com/#service',
[
'@type' => 'Service',
'@id' => 'https://example.com/#service',
'name' => 'Example service',
]
);
SchemaRegistry::add($schema);
updateSchemaManagerEntities(array &$entities)
use SilverStripe\Core\Extension;
class MyPageSchemaExtension extends Extension
{
public function updateSchemaManagerEntities(array &$entities): void
{
// Add another Schema object, or update an existing one.
}
}
text
_config/
schema-manager.yml
src/
Control/
SchemaRegistry.php
Extension/
BlogPostSchemaExtension.php
SchemaControllerExtension.php
SiteConfigSchemaExtension.php
Model/
Schema/
BlogPostingSchema.php
FAQPageSchema.php
ImageGallerySchema.php
JobPostingSchema.php
OrganisationSchema.php
ProductSchema.php
Schema.php
ServiceSchema.php
WebPageSchema.php
WebsiteSchema.php
Service/
SchemaManager.php