Set the ID of the draft parent page ID.

@param int $cParentID
777944
public function setPageDraftTargetParentPageID($cParentID)
    {
        if ($cParentID != $this->getPageDraftTargetParentPageID()) {
            Section::unregisterPage($this);
        }
        $db = Database::connection();
        $cParentID = intval($cParentID);
        $db->executeQuery('update Pages set cDraftTargetParentPageID = ? where cID = ?', [$cParentID, $this->cID]);
        $this->cDraftTargetParentPageID = $cParentID;

        Section::registerPage($this);
    }
962341
public function moveBlock($id, $parentId, $placeholder, $sort, $draft = true)
    {
        $block = $this->find($id, $draft);

        $parent = ($parentId) ? $this->find($parentId) : null;

        $block->setPosition($placeholder);

        $block->setParent($parent);

        if ($parent) {
            $parent->addChild($block);
        }

        $this->save($block);

        array_walk($sort, function (&$id) { $id = (int) $id; });
        $contained = $this->findById($sort, $draft);

        if ($contained) {
            $contained = $this->setSortsByDirective($contained, $sort);

            foreach ($contained as $node) {
                if ($node->getOwner()->getId() == $block->getOwner()->getId()) {
                    $this->save($node);
                }
            }
        }
    }
437856
public function setSubscriptionOrderId($orderId)
    {
        if (strlen($orderId) > 40) {
            throw new InvalidArgumentException("Subscription order id cannot be longer than 40 characters");
        }
        if (preg_match('/[^a-zA-Z0-9_-]/', $orderId)) {
            throw new InvalidArgumentException("Subscription order id cannot contain special characters");
        }
        $this->parameters['sub_orderid'] = $orderId;
    }
125356
public function setDocumentId(\AgentSIB\Diadoc\Api\Proto\DocumentIdEx $value = null)
    {
        $this->DocumentId = $value;
    }
522778
public function filterByParentID($cParentID)
    {
        $db = \Database::get();
        if (is_array($cParentID)) {
            $this->query->andWhere(
                $this->query->expr()->in('p.cParentID', array_map([$db, 'quote'], $cParentID))
            );
        } else {
            $this->query->andWhere('p.cParentID = :cParentID');
            $this->query->setParameter('cParentID', $cParentID, \PDO::PARAM_INT);
        }
    }
223120
public function setParent(Page $parent)
    {
        if (!$parent->hasMainSection()) {
            throw new InvalidArgumentException('A parent page must be a section');
        }

        if (!$this->hasMainSection() || $this->isRoot()) {
            $this->setSection($parent->getSection());
        } else {
            $this->getSection()->setParent($parent->getSection());
        }
        return $this;
    }
865856
public R setParentId(String parentId) {
        BoxFolder parentFolder = BoxFolder.createFromId(parentId);
        mBodyMap.put(BoxItem.FIELD_PARENT, parentFolder);
        return (R) this;
    }
1036503
private void updateParentsAlloc(int id) {
        while (id > 1) {
            int parentId = id >>> 1;
            byte val1 = value(id);
            byte val2 = value(id ^ 1);
            byte val = val1 < val2 ? val1 : val2;
            setValue(parentId, val);
            id = parentId;
        }
    }
128680
public static function incrementParents($cID)
    {
        $db = Loader::db();
        $cParentID = $db->GetOne("select cParentID from Pages where cID = ?", array($cID));

        $q = "update Pages set cChildren = cChildren+1 where cID = ?";

        $cpc = Page::getByID($cParentID);
        $cpc->refreshCache();

        $r = $db->query($q, array($cParentID));
    }
638418
private void setParentElement(Element parentElement) {
		synchronized(lock) {
			checkNotFrozen();
			if(this.parentElement != null) throw new IllegalStateException("parentElement already set");
			this.parentElement = parentElement;
		}
		assert checkPageAndParentElement();
	}
466027
public static function set_annotations($gradeid, $pageno, $annotations) {
        global $DB;

        $DB->delete_records('assignfeedback_editpdf_annot', array('gradeid' => $gradeid, 'pageno' => $pageno, 'draft' => 1));
        $added = 0;
        foreach ($annotations as $record) {
            // Force these.
            if (!($record instanceof annotation)) {
                $annotation = new annotation($record);
            } else {
                $annotation = $record;
            }
            $annotation->gradeid = $gradeid;
            $annotation->pageno = $pageno;
            $annotation->draft = 1;
            if (self::add_annotation($annotation)) {
                $added++;
            }
        }

        return $added;
    }
1174681
public function setParent($parent)
    {
        if ($parent !== null &&  !$parent instanceof BaseEntry) {
            throw new \InvalidArgumentException('An entry may only have another entry as parent');
        }

        $this->parent = $parent;
    }
862590
protected function _onChangeUpdateVarCount($parentId)
    {
        if ($parentId) {
            $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

            $query = "SELECT COUNT(*) AS varcount FROM oxarticles WHERE oxparentid = ?";
            $varCount = (int) $database->getOne($query, [$parentId]);

            $query = "UPDATE oxarticles SET oxvarcount = ? WHERE oxid = ?";
            $database->execute($query, [$varCount, $parentId]);
        }
    }
866986
public function setPageToDraft()
    {
        $db = Database::connection();
        $db->executeQuery('update Pages set cIsDraft = 1 where cID = ?', [$this->getCollectionID()]);
        $this->cIsDraft = true;
    }
705856
public function setLayoutId( $layoutId )
    {
        $this->_layout  = null;
        $this->layoutId = ( (int) $layoutId ) ?: null;
        return $this;
    }
109489
public function moveFirst($parentId = false)
    {
        if ( $this->parentIdField && $parentId === false ) {
            $parentId = $this->owner->{$this->parentIdField};
        }
        $minIdx = $this->getMinIdx($parentId);
        if ( ! $minIdx ) {
            $this->reorder($parentId);
            $minIdx = $this->getMinIdx($parentId);
        }
        if ( $this->parentIdField ) {
            call_user_func("$this->ownerClassName::updateAll", [
                $this->sortField => floor($minIdx / 2),
                $this->parentIdField => $parentId,
            ], [ $this->primaryKey => $this->owner->primaryKey ]);
        } else {
            call_user_func("$this->ownerClassName::updateAll",
                [ $this->sortField => floor($minIdx / 2) ],
                [ $this->primaryKey => $this->owner->primaryKey ]);
        }
        $this->invalidateTagDependency();
    }
551552
private function _setId($pId)
    {
        $idField = ItemInterface::IDFIELD;

        if (! isset($this->_fields[$idField])
            or ! $this->_fields[$idField]) {
            $this->_fields[$idField] = $pId;
        }

        return $this;
    }