src/Controller/RelationshipManager.php
public function isRoot(ModelInterface $model)
    {
        if (BasicDefinitionInterface::MODE_HIERARCHICAL !== $this->mode) {
            return false;
        }

        $condition = $this->relationships->getRootCondition();
        if (!$condition instanceof RootConditionInterface) {
            throw new DcGeneralRuntimeException('No root condition defined');
        }

        return $condition->matches($model);
    }
public function isRoot(ModelInterface $model)
    {
        if (BasicDefinitionInterface::MODE_HIERARCHICAL !== $this->mode) {
            return false;
        }

        $condition = $this->relationships->getRootCondition();
        if (!$condition instanceof RootConditionInterface) {
            throw new DcGeneralRuntimeException('No root condition defined');
        }

        return $condition->matches($model);
    }
public function isRoot ( ModelInterface $ model ) { if ( BasicDefinitionInterface :: MODE_HIERARCHICAL !== $ this -> mode ) { return false ; } $ condition = $ this -> relationships -> getRootCondition ( ) ; if ( ! $ condition instanceof RootConditionInterface ) { throw new DcGeneralRuntimeException ( 'No root condition defined' ) ; } return $ condition -> matches ( $ model ) ; }
Check if the given model is a root model for the current data definition.

@param ModelInterface $model The model to check.

@return bool

@throws DcGeneralRuntimeException When no root condition is defined.
Check if the given model is a root model for the current data definition .