src/Charcoal/Cms/TemplateableTrait.php
final protected function assertValidTemplateStructureDependencies()
    {
        if (!$this instanceof TemplateableInterface) {
            throw new RuntimeException(sprintf(
                'Class [%s] must implement [%s]',
                get_class($this),
                TemplateableInterface::class
            ));
        }

        $prop = $this->property('template_options');
        if (!$prop instanceof TemplateOptionsProperty) {
            throw new RuntimeException(sprintf(
                'Property "%s" must use [%s]',
                $prop->ident(),
                TemplateOptionsProperty::class
            ));
        }
    }
final protected function assertValidTemplateStructureDependencies()
    {
        if (!$this instanceof TemplateableInterface) {
            throw new RuntimeException(sprintf(
                'Class [%s] must implement [%s]',
                get_class($this),
                TemplateableInterface::class
            ));
        }

        $prop = $this->property('template_options');
        if (!$prop instanceof TemplateOptionsProperty) {
            throw new RuntimeException(sprintf(
                'Property "%s" must use [%s]',
                $prop->ident(),
                TemplateOptionsProperty::class
            ));
        }
    }
final protected function assertValidTemplateStructureDependencies ( ) { if ( ! $ this instanceof TemplateableInterface ) { throw new RuntimeException ( sprintf ( 'Class [%s] must implement [%s]' , get_class ( $ this ) , TemplateableInterface :: class ) ) ; } $ prop = $ this -> property ( 'template_options' ) ; if ( ! $ prop instanceof TemplateOptionsProperty ) { throw new RuntimeException ( sprintf ( 'Property "%s" must use [%s]' , $ prop -> ident ( ) , TemplateOptionsProperty :: class ) ) ; } }
Asserts that the templateable class meets the requirements,
throws an Exception if not.

Requirements:
1. The class implements the {@see TemplateableInterface} and
2. The model's "template_options" property uses the {@see TemplateOptionsProperty}.


@throws RuntimeException If the model does not implement its requirements.
@return void
Asserts that the templateable class meets the requirements throws an Exception if not .