Download the PHP package dorsetdigital/silverstripe-schema-manager without Composer

On this page you can find all versions of the php package dorsetdigital/silverstripe-schema-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-schema-manager

Silverstripe Schema Manager

Structured-data management for Silverstripe CMS 6.

Schema Manager combines CMS-managed site information with automatic page schema and a request-scoped registry. Schema.org entities are emitted as a single linked JSON-LD @graph in the page <head>.

Requirements

Installation

What is automatic?

By default Schema Manager adds site, page and breadcrumb schema to normal ContentController page requests:

Stable entity IDs are based on the canonical site/page URLs:

The JSON-LD is inserted automatically with Silverstripe Requirements. No template change is required.

Automatic WebPage schema

Every normal SiteTree page receives a WebPage entity containing its URL, title, description where available, created/modified dates and a reference to the site's WebSite entity. No page extension is required.

Configuration

Each automatic layer can be disabled independently:

Supported schema types

Detailed examples and configuration are kept in separate documentation:

Page-level typed builders link to their WebPage with isPartOf by default. When an entity is the primary subject of a dedicated page, setMainEntityOfPage($pageURL) promotes that relationship explicitly.

All typed builders inherit Schema::update(), allowing projects to add less common Schema.org properties without the module needing to model every possible field.

Adding schema manually

Raw entities can still be registered directly:

If an entity is registered again using the same @id, its data is recursively merged with the existing entity.

Typed schema objects can also be registered:

where $schema extends DorsetDigital\SchemaManager\Model\Schema\Schema.

Extension point

The registry API can be called directly from application code; an extension hook is not required. For reusable integrations that need to contribute schema automatically to arbitrary pages, Schema Manager also calls this Silverstripe extension hook before page entities are registered:

Extensions can therefore append, remove or modify typed schema objects without replacing the registry or controller integration. This is primarily an integration mechanism rather than a requirement for ordinary project code.

For example:

The same hook is called on SiteConfig for site-wide entities.

The bundled Blog integration uses this mechanism, so it also provides a reference implementation for future module integrations.

Registry API

SchemaRegistry::add(Schema $schema)

Registers a typed schema object. It can be called directly from controllers or other application code. Relationships are resolved when the graph is rendered, so schemas registered independently still participate in automatic WebPage.mainEntity and breadcrumb relationship resolution.

SchemaRegistry::addEntity(string $id, array $data)

Registers a raw Schema.org entity. Existing data under the same ID is recursively merged, including entities previously registered as typed schemas with add(). This allows project code to augment a typed entity without replacing it.

SchemaRegistry::addFAQ(string $question, string $answer, ?string $pageURL = null)

Deprecated compatibility helper for adding FAQ questions. New code should use FAQPageSchema and SchemaRegistry::add().

SchemaRegistry::addBreadCrumbs(SiteTree $page, int $maxDepth = 20, bool|string $stopAtPageType = false, bool $showHidden = false)

Adds a BreadcrumbList using Silverstripe's standard breadcrumb hierarchy. The method remains available when automatic breadcrumb schema is disabled.

SchemaRegistry::getGraph(): array

Returns all registered entities.

SchemaRegistry::getSchema(): array

Returns the complete structure containing @context and @graph.

SchemaRegistry::getJSON(): string

Returns JSON suitable for an application/ld+json script element.

SchemaRegistry::flush(): void

Clears the request registry.

Documentation

The docs/ directory contains the detailed guides for each supported schema type. The README is intentionally focused on installation, automatic behaviour, configuration and the common registry API.

Project structure

The module is deliberately split into small responsibilities:

This keeps the public API small while leaving room for additional schema types and project-specific extensions.

License

BSD 3-Clause License.


All versions of silverstripe-schema-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
silverstripe/framework Version ^6
silverstripe/cms Version ^6
silverstripe/siteconfig Version ^6
silverstripe/assets Version ^3
silverstripe/asset-admin Version ^3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dorsetdigital/silverstripe-schema-manager contains the following files

Loading the files please wait ...