Phalcon\Mvc\Model\Behavior\NestedSet::saveNode PHP Метод

saveNode() публичный Метод

Create root node if multiple-root tree mode. Update node if it's not new.
public saveNode ( array $attributes = null, array $whiteList = null ) : boolean
$attributes array list of attributes.
$whiteList array whether to perform validation.
Результат boolean
    public function saveNode(array $attributes = null, array $whiteList = null)
    {
        $owner = $this->getOwner();
        $this->ignoreEvent = true;
        if (!$owner->readAttribute($this->primaryKey)) {
            $result = $this->makeRoot($attributes, $whiteList);
        } else {
            $result = $owner->update($attributes, $whiteList);
        }
        $this->ignoreEvent = false;
        return $result;
    }