src/Controller/ModelCollector.php
public function searchParentOf(ModelInterface $model)
    {
        switch ($this->definitionMode) {
            case BasicDefinitionInterface::MODE_HIERARCHICAL:
                return $this->searchParentOfInHierarchical($model);
            case BasicDefinitionInterface::MODE_PARENTEDLIST:
                return $this->searchParentOfInParentedMode($model);
            default:
        }

        throw new DcGeneralInvalidArgumentException('Invalid condition, not in hierarchical mode!');
    }
public function searchParentOf(ModelInterface $model)
    {
        switch ($this->definitionMode) {
            case BasicDefinitionInterface::MODE_HIERARCHICAL:
                return $this->searchParentOfInHierarchical($model);
            case BasicDefinitionInterface::MODE_PARENTEDLIST:
                return $this->searchParentOfInParentedMode($model);
            default:
        }

        throw new DcGeneralInvalidArgumentException('Invalid condition, not in hierarchical mode!');
    }
public function searchParentOf ( ModelInterface $ model ) { switch ( $ this -> definitionMode ) { case BasicDefinitionInterface :: MODE_HIERARCHICAL : return $ this -> searchParentOfInHierarchical ( $ model ) ; case BasicDefinitionInterface :: MODE_PARENTEDLIST : return $ this -> searchParentOfInParentedMode ( $ model ) ; default : } throw new DcGeneralInvalidArgumentException ( 'Invalid condition, not in hierarchical mode!' ) ; }
Search the parent model for the given model.

@param ModelInterface $model The model for which the parent shall be retrieved.

@return ModelInterface|null

@throws DcGeneralInvalidArgumentException When a root model has been passed or not in hierarchical mode.
Search the parent model for the given model .