Baum\Move::parentId PHP Méthode

parentId() protected méthode

Computes the new parent id for the node being moved.
protected parentId ( ) : integer
Résultat integer
    protected function parentId()
    {
        switch ($this->position) {
            case 'root':
                return;
            case 'child':
                return $this->target->getKey();
            default:
                return $this->target->getParentId();
        }
    }