public function clearInvalidParent()
    {
        if ($this->getParentId() !== static::$nullParent && !$this->hasParent()) {
            $this->setNullParent();
            return true;
        }
        return false;
    }
public function clearInvalidParent()
    {
        if ($this->getParentId() !== static::$nullParent && !$this->hasParent()) {
            $this->setNullParent();
            return true;
        }
        return false;
    }
public function clearInvalidParent ( ) { if ( $ this -> getParentId ( ) !== static :: $ nullParent && ! $ this -> hasParent ( ) ) { $ this -> setNullParent ( ) ; return true ; } return false ; }
Clear invalid parent.
The invalid state depends on which if parent id exists but it's corresponding
parent cannot be found.
@return boolean True if parent attribute is set null, False if parent valid.
Clear invalid parent . The invalid state depends on which if parent id exists but it s corresponding parent cannot be found .