You are here

public static function SchemaUrl::fromSchema in Schemata 8

Generate a URI for the Schema instance.

Parameters

string $format: The format or type of schema.

string $describes: The format being described.

\Drupal\schemata\schema\SchemaInterface $schema: The schema for which we generate the link.

Return value

\Drupal\Core\Url The schema resource Url object.

File

src/SchemaUrl.php, line 30

Class

SchemaUrl
Provides additional URL factory methods for linking to Schema.

Namespace

Drupal\schemata

Code

public static function fromSchema($format, $describes, SchemaInterface $schema) {
  return static::fromOptions($format, $describes, $schema
    ->getEntityTypeId(), $schema
    ->getBundleId());
}