initializes this class

@param int $pageId
768851
public function init($pageId)
    {
        if (!$this->layoutSetup instanceof LayoutSetup) {
            $this->injectLayoutSetup(GeneralUtility::makeInstance(LayoutSetup::class)->init($pageId));
        }
    }
1186406
protected static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$newDirectoryMode = \octdec((string)$baseClass->Filesystem->newDirectoryMode);
            static::$newFileMode = \octdec((string)$baseClass->Filesystem->newFileMode);
            static::$writeLocks = (boolean)$baseClass->Filesystem->writeLocks;
            static::$hashFileDir = $baseClass->parsePath((string)$baseClass->Filesystem->hashFileDirectory);
            static::$hashFileDirDepth = (int)$baseClass->Filesystem->hashFileDirectoryDepth;
            static::$documentRoot = $baseClass->parsePath('%DOCUMENT_ROOT%').DIRECTORY_SEPARATOR;
        }
    }
217652
public function duplicate_page($pageid) {
        global $PAGE;
        $cm = get_coursemodule_from_instance('lesson', $this->properties->id, $this->properties->course);
        $context = context_module::instance($cm->id);
        // Load the page.
        $page = $this->load_page($pageid);
        $properties = $page->properties();
        // The create method checks to see if these properties are set and if not sets them to zero, hence the unsetting here.
        if (!$properties->qoption) {
            unset($properties->qoption);
        }
        if (!$properties->layout) {
            unset($properties->layout);
        }
        if (!$properties->display) {
            unset($properties->display);
        }

        $properties->pageid = $pageid;
        // Add text and format into the format required to create a new page.
        $properties->contents_editor = array(
            'text' => $properties->contents,
            'format' => $properties->contentsformat
        );
        $answers = $page->get_answers();
        // Answers need to be added to $properties.
        $i = 0;
        $answerids = array();
        foreach ($answers as $answer) {
            // Needs to be rearranged to work with the create function.
            $properties->answer_editor[$i] = array(
                'text' => $answer->answer,
                'format' => $answer->answerformat
            );

            $properties->response_editor[$i] = array(
              'text' => $answer->response,
              'format' => $answer->responseformat
            );
            $answerids[] = $answer->id;

            $properties->jumpto[$i] = $answer->jumpto;
            $properties->score[$i] = $answer->score;

            $i++;
        }
        // Create the duplicate page.
        $newlessonpage = lesson_page::create($properties, $this, $context, $PAGE->course->maxbytes);
        $newanswers = $newlessonpage->get_answers();
        // Copy over the file areas as well.
        $this->copy_page_files('page_contents', $pageid, $newlessonpage->id, $context->id);
        $j = 0;
        foreach ($newanswers as $answer) {
            if (isset($answer->answer) && strpos($answer->answer, '@@PLUGINFILE@@') !== false) {
                $this->copy_page_files('page_answers', $answerids[$j], $answer->id, $context->id);
            }
            if (isset($answer->response) && !is_array($answer->response) && strpos($answer->response, '@@PLUGINFILE@@') !== false) {
                $this->copy_page_files('page_responses', $answerids[$j], $answer->id, $context->id);
            }
            $j++;
        }
    }
1340170
public void initialize() {
		
        final JSONObject params = new JSONObject();
        params.put("page", page);
        params.put("size", size);
        
        getPage(params);     
	}
523925
public function initialize()
    {
        $this->data = new stdClass();
        $this->data->ownId = null;
        $this->data->orders = [];
    }
1068466
public function init() {
		
		if ($this->nextPageLabel === null) {
			$this->nextPageLabel = '&raquo;';
		}

		if ($this->prevPageLabel === null) {
			$this->prevPageLabel = '&laquo;';
		}

		$classes = array('pagination');

		/* TODO: move these to styles files! */
		$style = '';
		$containerStyle = '';
		
		$validAlignments = array(self::ALIGNMENT_CENTER, self::ALIGNMENT_RIGHT);

		if (in_array($this->alignment, $validAlignments)) {
			if($this->alignment == self::ALIGNMENT_RIGHT)
				$classes[] = 'pull-right';
			
			if($this->alignment == self::ALIGNMENT_CENTER) {
				// $style = 'margin-left: auto; margin-right: auto;'; // not needed!
				$containerStyle = 'text-align: center;';
			}
		}

		if (!empty($classes)) {
			$classes = implode(' ', $classes);
			if (isset($this->htmlOptions['class'])) {
				$this->htmlOptions['class'] = ' ' . $classes;
			} else {
				$this->htmlOptions['class'] = $classes;
			}
		}
		
		if(!empty($style)) {
			if(isset($this->htmlOptions['style']) && !empty($this->htmlOptions['style']))
				$this->htmlOptions['style'] .= ' '.$style;
			else 
				$this->htmlOptions['style'] = $style;
		}
		
		if(!empty($containerStyle)) {
			if(isset($this->containerHtmlOptions['style']) && !empty($this->containerHtmlOptions['style']))
				$this->containerHtmlOptions['style'] .= ' '.$containerStyle;
			else
				$this->containerHtmlOptions['style'] = $containerStyle;
		}

		parent::init();
	}
307476
public function initialize(array $initialData = []) : void
    {
        if ($this instanceof PropertyLimitable) {
            $initialData = array_intersect_key($initialData, array_fill_keys($this->concreteAttributes(), true));
        }
        $this->entityInitialize($initialData);
    }
319499
public function init()
    {
        parent::init();
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
        if (!$this->chartVariable) {
            $this->chartVariable = 'highchart_'.$this->options['id'];
        }
        $this->_renderTo = ArrayHelper::getValue($this->clientOptions, 'chart.renderTo');
    }
917518
protected function setPage($page_id)
    {
        $this->data_page = array();

        if (is_numeric($page_id)) {

            $conditions = array(
                'language' => 'und',
                'page_id' => $page_id
            );

            $this->data_page = $this->page->get($conditions);

            if (empty($this->data_page)) {
                $this->outputHttpStatus(404);
            }

            $this->preparePage($this->data_page);
        }
    }
521875
public function clearByPageId(int $pageId)
    {
        $cache = $this->get();
        $cacheEntries = \array_keys($cache->getByTag('pageId_' . $pageId));
        foreach ($cacheEntries as $cacheEntry) {
            $cache->remove($cacheEntry);
        }
    }
935331
public function init()
    {
        parent::init();

        foreach ($this->children as $child) {
            $child->init();
            foreach ($child->getPages() as $page) {
                $this->addPage($page);
            }
        }

        foreach ($this->pages as $page) {
            $page->init();
        }
    }
195423
public function findPageSettings($pageId)
    {
        $this->makeSelect();
        $this->sql .= ' and page_id = ?';
        $this->bindValues[] = $pageId;

        return $this->find();
    }
439814
protected function init() {
        global $PAGE;

        $this->data['crud'] = 'r';
        $this->data['edulevel'] = self::LEVEL_OTHER;
        $this->context = $PAGE->context;
    }
525598
@Override
    public void init(PageContext pc) throws IOException {
	if (init != null) {
	    try {
		init.invoke(monitor, new Object[] { pc });
	    }
	    catch (Exception e) {
		throw ExceptionUtil.toIOException(e);
	    }
	}
    }
494517
public function init()
	{
		if ($this->nextPageLabel === null)
			$this->nextPageLabel = '&rarr;';

		if ($this->prevPageLabel === null)
			$this->prevPageLabel = '&larr;';

		$classes = array();

		$validAlignments = array(self::ALIGNMENT_CENTER, self::ALIGNMENT_RIGHT);

		if (in_array($this->alignment, $validAlignments))
			$classes[] = 'pagination-'.$this->alignment;

		if (!empty($classes))
		{
			$classes = implode(' ', $classes);
			if (isset($this->htmlOptions['class']))
				$this->htmlOptions['class'] = ' '.$classes;
			else
				$this->htmlOptions['class'] = $classes;
		}

		parent::init();
	}
305994
public function setCurrentPageID($id)
    {
        $this->pageID = $id;
        $id = (int)$id;
        /** @deprecated */
        $this->getRequest()->getSession()->set($this->sessionNamespace() . ".currentPage", $id);
    }
873815
public static function init() : void
    {
        if ( ! empty($_SESSION[Notification::SESSION_KEY]) && is_array($_SESSION[Notification::SESSION_KEY])) {
            Notification::$notifications = $_SESSION[Notification::SESSION_KEY];
        }

        $_SESSION[Notification::SESSION_KEY] = [];
    }