Creates a new instance of the PageWrapper class for an existing Page.

@param page    Page to wrap.
@param parent  Page's Parent.
@param pointer Page Pointer.
191460
static PageWrapper wrapExisting(BTreePage page, PageWrapper parent, PagePointer pointer) {
        return new PageWrapper(page, parent, pointer, false);
    }
304659
public static UIComponentTag getParentUIComponentTag(PageContext pageContext)
    {
        UIComponentClassicTagBase parentTag = getParentUIComponentClassicTagBase(pageContext);

        return parentTag instanceof UIComponentTag ? (UIComponentTag)parentTag : new UIComponentTagWrapper(parentTag);

    }
496048
protected void mergeParent(CmsADEConfigDataInternal parent) {

        List<CmsResourceTypeConfig> parentTypes = null;
        if (parent != null) {
            parentTypes = parent.m_ownResourceTypes;
        } else {
            parentTypes = Collections.emptyList();
        }

        List<CmsPropertyConfig> parentProperties = null;
        if (parent != null) {
            parentProperties = parent.m_ownPropertyConfigurations;
        } else {
            parentProperties = Collections.emptyList();
        }

        List<CmsModelPageConfig> parentModelPages = null;
        if (parent != null) {
            parentModelPages = parent.m_ownModelPageConfig;
        } else {
            parentModelPages = Collections.emptyList();
        }

        List<CmsFunctionReference> parentFunctionRefs = null;
        if (parent != null) {
            parentFunctionRefs = parent.m_functionReferences;
        } else {
            parentFunctionRefs = Collections.emptyList();
        }

        m_ownResourceTypes = CmsADEConfigData.combineConfigurationElements(parentTypes, m_ownResourceTypes, false);
        m_ownPropertyConfigurations = CmsADEConfigData.combineConfigurationElements(
            parentProperties,
            m_ownPropertyConfigurations,
            false);
        m_ownModelPageConfig = CmsADEConfigData.combineConfigurationElements(
            parentModelPages,
            m_ownModelPageConfig,
            false);
        m_functionReferences = CmsADEConfigData.combineConfigurationElements(
            parentFunctionRefs,
            m_functionReferences,
            false);
        if ((parent != null) && (m_ownDynamicFunctions == null)) {
            m_dynamicFunctions = parent.m_dynamicFunctions;
        } else {
            m_dynamicFunctions = m_ownDynamicFunctions;
        }
    }
1015927
private Control createPageControl( Composite parent )
    {
        Composite composite = new Composite( parent, SWT.NONE );
        composite.setLayout( new GridLayout( 1, false ) );
        GridData gridData = new GridData( GridData.HORIZONTAL_ALIGN_FILL
                | GridData.VERTICAL_ALIGN_FILL );

        composite.setLayoutData( gridData );

        Label fieldLabel = new Label( composite, SWT.NONE );
        fieldLabel.setText( "&Query Text:" );
        
        m_queryTextField = new Text( composite, SWT.BORDER
                | SWT.V_SCROLL | SWT.H_SCROLL );
        GridData data = new GridData( GridData.FILL_HORIZONTAL );
        data.heightHint = 100;
        m_queryTextField.setLayoutData( data );
        m_queryTextField.addModifyListener( new ModifyListener( ) 
        {
            public void modifyText( ModifyEvent e )
            {
                validateData();
            }
        } );
       
        setPageComplete( false );
        return composite;
    }
131780
public function saveParentPage(Lang $lang, Page $page, int $parentPageId) : void
    {
        if ($parentPageId === 0)
        {
            $parentPage = $this->pageRepository->findOneLangRoot($lang);
        }
        else
        {
            $parentPage = $this->pageRepository->findOneById($parentPageId);
        }

        if (!$parentPage)
        {
            throw new \Exception("Nadřazená stránka s id: '{$parentPageId}' nebyla nalezena.");
        }

        $page->setParent($parentPage);
        $page->moveToLastChildOf($parentPage);
        $page->save();
    }
1269522
public void init(Object parent, Object record)
    {
        super.init(parent, record);

        this.addSubPanels(this);
        
        TraversableGridPolicy.addGridTraversalPolicy(this.getControl(), this);
    }
508352
public function addPage($page = null)
    {
        if ($page = parent::addPage($page)) {
            $page->setParent($this);
        }

        return $page;
    }
14426
private function moveAsFirstChildOf(Page $page, Page $parent = null)
    {
        if (null === $parent) {
            throw new BadRequestHttpException('Parent uid doesn\'t exists');
        }

        $this->granted('EDIT', $parent);

        if (!$parent->hasMainSection()) {
            $this->getPageRepository()->saveWithSection($parent);
        }

        $this->getPageRepository()->moveAsFirstChildOf($page, $parent);
    }
534983
private function patchSiblingAndParentOperation(Page $page, array &$operations)
    {
        $sibling_operation = null;
        $parent_operation = null;
        foreach ($operations as $key => $operation) {
            $op = array('key' => $key, 'op' => $operation);
            if ('/sibling_uid' === $operation['path']) {
                $sibling_operation = $op;
            } elseif ('/parent_uid' === $operation['path']) {
                $parent_operation = $op;
            }
        }

        if (null !== $sibling_operation || null !== $parent_operation) {
            if ($page->isRoot()) {
                throw new BadRequestHttpException('Cannot move root node of a site.');
            }

            if ($page->isOnline(true)) {
                $this->granted('PUBLISH', $page); // user must have publish permission on the page
            }
        }

        try {
            if (null !== $sibling_operation) {
                unset($operations[$sibling_operation['key']]);

                $sibling = $this->getPageByUid($sibling_operation['op']['value']);
                $this->granted('EDIT', $sibling->getParent());

                $this->getPageRepository()->moveAsPrevSiblingOf($page, $sibling);
            } elseif (null !== $parent_operation) {
                unset($operations[$parent_operation['key']]);

                $parent = $this->getPageByUid($parent_operation['op']['value']);
                if ($this->isFinal($parent)) {
                    throw new BadRequestHttpException('Can\'t create children of ' . $parent->getLayout()->getLabel() . ' layout');
                }

                $this->moveAsFirstChildOf($page, $parent);
            }
        } catch (InvalidArgumentException $e) {
            throw new BadRequestHttpException('Invalid node move action: '.$e->getMessage());
        }
    }
381028
void addParentBuffer(StreamCharBuffer parent) {
        if (!notifyParentBuffersEnabled) return;

        if (parentBuffers==null) {
            parentBuffers=new HashSet<SoftReference<StreamCharBufferKey>>();
        }
        parentBuffers.add(new SoftReference<StreamCharBufferKey>(parent.bufferKey));
    }
777957
final void init(WSJdbcObject parent) {
        if (parent != null) {
            parentWrapper = parent;
            dsConfig = parent.dsConfig; 
            freeResourcesOnClose = parent.freeResourcesOnClose;
        }

        if (freeResourcesOnClose) // then initialize data structures to track them
        {
            arrays = new LinkedList<Array>();
            blobs = new LinkedList<Blob>();
            clobs = new LinkedList<Clob>();
            resources = new LinkedList<Closeable>();
            xmls = new LinkedList<SQLXML>();
        }
    }
55749
def append_page(page = Page.new)
            init_page_tree

            self.Catalog.Pages.append_page(page)
            yield(page) if block_given?

            self
        end
564474
public function addPage ()
    {
        add_submenu_page($this->parentSlug, $this->pageTitle, $this->menuTitle, $this->capability, $this->menuSlug, $this->getDisplayFunction());
    }
461024
public void freePage(MemoryBlock page, MemoryConsumer consumer) {
    assert (page.pageNumber != MemoryBlock.NO_PAGE_NUMBER) :
      "Called freePage() on memory that wasn't allocated with allocatePage()";
    assert (page.pageNumber != MemoryBlock.FREED_IN_ALLOCATOR_PAGE_NUMBER) :
      "Called freePage() on a memory block that has already been freed";
    assert (page.pageNumber != MemoryBlock.FREED_IN_TMM_PAGE_NUMBER) :
            "Called freePage() on a memory block that has already been freed";
    assert(allocatedPages.get(page.pageNumber));
    pageTable[page.pageNumber] = null;
    synchronized (this) {
      allocatedPages.clear(page.pageNumber);
    }
    if (logger.isTraceEnabled()) {
      logger.trace("Freed page number {} ({} bytes)", page.pageNumber, page.size());
    }
    long pageSize = page.size();
    // Clear the page number before passing the block to the MemoryAllocator's free().
    // Doing this allows the MemoryAllocator to detect when a TaskMemoryManager-managed
    // page has been inappropriately directly freed without calling TMM.freePage().
    page.pageNumber = MemoryBlock.FREED_IN_TMM_PAGE_NUMBER;
    memoryManager.tungstenMemoryAllocator().free(page);
    releaseExecutionMemory(pageSize, consumer);
  }
244181
protected static void appendHandler(LogRecordHandler parent, LogRecordHandler child){
    RecordHandlerTree p = handlers.find(parent);
    if(p != null){
      p.addChild(child);
    } else {
      throw new IllegalArgumentException("No such parent handler: " + parent);
    }
  }
675828
private void setPageParam(int page) {
        pageParam.set(0, Integer.toString(page));
        queryParams.put(PAGE_PARAM, pageParam);
    }
998252
def new
      @page.parent ||= Page.where(id: params['parent_id']).first
      respond_to do |format|
        format.html { render layout: false if request.xhr? }
        format.json { render json: @page }
      end
    end