DNADesign\Elemental\Services\ElementTypeRegistry
Synopsis
class ElementTypeRegistry
{
- // constants
- const CACHE_KEY = 'element-types';
- // members
- protected $elementTypes;
- protected static CacheInterface $cache;
- // methods
- public $this registerElement()
- public array getDefinitions()
- public mixed getDefinition()
- protected ElementTabProvider getTabProvider()
- public static ElementTypeRegistry generate()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Constants
Name | Value |
---|---|
CACHE_KEY | 'element-types' |
Members
protected
- $cache — Psr\SimpleCache\CacheInterface
- $elementTypes — array
Methods
protected
public
- generate() — Create a registry and attempt to fill it by resolving element types by introspecting class hierarchy
- getDefinition() — Get the element type data for the given instance or class name of an element.
- getDefinitions() — Get the schema of the element types that are registered
- registerElement() — Register an element type with this registry