Developer corner
Target group: Developers, Integrators
Table of Contents
Using the API
The API can be used like described in the schema manual. Use the
Type
for instantiating a model type
class:
EXT:my_extension/Classes/Controller/MyController.php
<?php
declare(strict_types=1);
namespace MyVendor\MyExtension\Controller;
use Brotkrueml\Schema\Type\TypeFactory;
final class MyController
{
public function __construct(
private readonly TypeFactory $typeFactory,
) {
}
public function doSomething(): void
{
// ...
$floorPlan = $this->typeFactory->create('FloorPlan');
// ...
}
}
Using the view helpers
The Fluid view helpers can be used like described in the schema manual:
<schema:type.floorPlan
-id="https://example.org/#some-floor-plan"
name="some floor plan"
/>
Copied!
The Fluid namespace
schema
is the same as for the core vocabulary.