Developer corner

Target group: Developers, Integrators

Using the API

The API can be used like described in the schema manual. But there is one detail: As the classes of this extensions use a different namespace the instantiation of type models must reflect this:

$drug = new \Brotkrueml\SchemaHealth\Model\Type\Drug();

Alternatively, you can use the TypeFactory, so you don’t have to deal with namespaces:

$drug = \Brotkrueml\Schema\Type\TypeFactory::createType('Drug');

Using the view helpers

The Fluid view helpers can be used like described in the schema manual:

<schema:type.drug
   -id="http://example.org/#some-drug"
   name="some drug"
/>

The Fluid namespace schema is the same as for the core vocabulary.