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

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

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

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

        $condition->applyTo($model);
    }
public function setRoot ( ModelInterface $ model ) { if ( BasicDefinitionInterface :: MODE_HIERARCHICAL !== $ this -> mode ) { return ; } $ condition = $ this -> relationships -> getRootCondition ( ) ; if ( ! $ condition instanceof RootConditionInterface ) { throw new DcGeneralRuntimeException ( 'No root condition defined' ) ; } $ condition -> applyTo ( $ model ) ; }
Apply the root condition of the current data definition to the given model.

@param ModelInterface $model The model to be used as root.

@return void

@throws DcGeneralRuntimeException When no root condition is defined.
Apply the root condition of the current data definition to the given model .