Will set up the page element.
If you want to ensure that you register some files, this would be the place to do this.
This should always be called before generateContent, at the latest right before.
@return void
761746
public function setUpElement()
    {
        parent::setUpElement();
        if ($this->userLibrary->getUserLoggedIn() !== null) {
            HTTPHeaderHelper::redirectToLocation("/");
        }
        if(count($this->userLibrary->listUsers()) == 0){
            $config = $this->container->getConfigInstance();
            $owner = $config->getOwner();
            $user = $this->userLibrary->createUser($owner['username'], "password", $owner['mail']);
            $user->getUserPrivileges()->addRootPrivileges();
        }
    }
1213087
private function pageHeaderEndHandler(): void
    {
        $this->print_data      = array_pop($this->print_data_stack);
        $this->current_element = $this->wt_report;
        $this->wt_report       = array_pop($this->wt_report_stack);
        $this->wt_report->addElement($this->current_element);
    }
691272
private function setLayout()
    {
        $this->layout = Html::tag('div', "{items}", ['class' => 'table-responsive']) .
            Html::tag(
                'div',
                Html::tag('div', "{summary}", ['class' => 'pagination-summary']) .
                Html::tag('div', "{pager}", ['class' => 'pagination-wrap']),
                ['class' => 'pagination-box']
            );
    }
22641
protected function _setup()
    {
        foreach ($this->_properties as $property) {
            $element = $this->_createElement($property);
            if ($element) {
                $this->addElement($element['name'], $element);
            }
        }
        $this->add(
            new Submit(
                ['value' => 'Save']
            )
        );
    }
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();
	}
1261651
public function init()
    {
        $this->fillFromConfig([
            'columns',
            'model',
            'recordUrl',
            'recordOnClick',
            'noRecordsMessage',
            'showPageNumbers',
            'recordsPerPage',
            'showSorting',
            'defaultSort',
            'showCheckboxes',
            'showSetup',
            'showTree',
            'treeExpanded',
            'showPagination',
            'customViewPath',
        ]);

        /*
         * Configure the list widget
         */
        $this->recordsPerPage = $this->getSession('per_page', $this->recordsPerPage);

        if ($this->showPagination == 'auto') {
            $this->showPagination = $this->recordsPerPage && $this->recordsPerPage > 0;
        }

        if ($this->customViewPath) {
            $this->addViewPath($this->customViewPath);
        }

        $this->validateModel();
        $this->validateTree();
    }
471306
public function generateContent()
    {
        parent::generateContent();
        $latest= null;
        $pageContent = new PageContentImpl($this->container, $this->container->getCurrentPageStrategyInstance()->getCurrentPage(), "mainContent");
        if(($latest = $pageContent->latestContent()) != null){
            return "<div class='editable' id='mainContent'>$latest</div>";
        }
        return "
        <div class='editable' id='mainContent'>
<h2>Lorem Ipsum</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In at lobortis nibh. Nullam lobortis nunc sed iaculis fermentum. Donec convallis sapien non nunc rhoncus rhoncus. Nulla et lorem sed nibh varius dignissim. Nullam quis libero a risus volutpat feugiat in eget sem. Sed quis vehicula ipsum, et laoreet tellus. Suspendisse nec lectus sit amet massa tristique ultrices. Maecenas vitae est tortor. Mauris quis mollis arcu. Nam blandit dictum erat dignissim pulvinar. Cras nec vehicula risus. Etiam viverra quam orci, at convallis tortor tincidunt a. Duis mollis, diam sed vestibulum tempus, justo augue venenatis enim, eu sodales ipsum est sollicitudin ligula. Proin vel laoreet enim.
</p>
<pre>initLib.registerInitializer(new UserSettings.UserSettingsInitializer(initLib));
initLib.registerInitializer(new BackgroundPositionInitializer());
initLib.registerInitializer(new TopMenuInitializer());
initLib.registerInitializer(new LoginFormulaInitializer());
initLib.registerInitializer(new EditorInitializer());
initLib.setUp();</pre>
<p>
Nunc varius tellus tellus, sed semper ligula hendrerit id. Fusce placerat lectus posuere quam imperdiet accumsan. Suspendisse non lacinia tellus. Etiam lacinia ullamcorper consectetur. Mauris dapibus ligula ac odio porttitor tempor. Mauris accumsan hendrerit pellentesque. Praesent suscipit lectus sit amet adipiscing aliquam. Praesent venenatis cursus lorem ac pretium. Proin ultricies libero nec neque aliquam fringilla. Etiam sed condimentum eros, id vulputate dui. Nunc consectetur volutpat risus. Cras venenatis libero eget viverra pulvinar.
</p>
<h3>Phasellus aliquam </h3>
<p>
Phasellus aliquam orci ut scelerisque fringilla. Donec accumsan erat vehicula lectus ultrices lacinia. Vivamus eu orci feugiat tellus porttitor mollis ac eu nisi. Curabitur quis turpis id tortor scelerisque placerat posuere et lectus. Proin cursus mi eget dui pretium, quis imperdiet arcu ultricies. Donec at nibh enim. Maecenas suscipit euismod turpis ut venenatis. Sed tincidunt lacus urna, non sodales mi dapibus a. Nulla nec enim eu magna accumsan dapibus. Nulla eu tincidunt orci, eget ornare ante.
</p>
<blockquote>
Nunc varius tellus tellus, sed semper ligula hendrerit id. Fusce placerat lectus posuere quam imperdiet accumsan. Suspendisse non lacinia tellus. Etiam lacinia ullamcorper consectetur. Mauris dapibus ligula ac odio porttitor tempor. Mauris accumsan hendrerit pellentesque. Praesent suscipit lectus sit amet adipiscing aliquam. Praesent venenatis cursus lorem ac pretium. Proin ultricies libero nec neque aliquam fringilla. Etiam sed condimentum eros, id vulputate dui. Nunc consectetur volutpat risus. Cras venenatis libero eget viverra pulvinar.
</blockquote>




        </div>
        ";
    }
1043915
public function newPage()
    {
        if ($this->lastpicpage > $this->getPage()) {
            $this->setPage($this->lastpicpage);
        }
        $this->AddPage();
    }
1144457
private function generatePageTemplateConfiguration()
    {
        $this->installDefaultPageTemplates($this->bundle);
        $this->installDefaultPagePartConfiguration($this->bundle);

        $this->assistant->writeLine('Generating template configuration : <info>OK</info>');
    }
460762
public function onDocumentStart()
    {
        $this->documentElement = new PHPTAL_Dom_Element('documentElement', 'http://xml.zope.org/namespaces/tal', array(), $this->getXmlnsState());
        $this->documentElement->setSource($this->file, $this->line);
        $this->_current = $this->documentElement;
    }
813207
public function init()
	{
		ob_start();
		ob_implicit_flush(false);

		if(isset($this->htmlOptions['id']))
			$this->id=$this->htmlOptions['id'];
		else
			$this->htmlOptions['id']=$this->id;
		echo CHtml::openTag($this->tagName,$this->htmlOptions)."\n";
		$this->renderDecoration();
		echo "<div class=\"{$this->contentCssClass}\">\n";

		$this->_openTag=ob_get_contents();
		ob_clean();
	}
550133
public function init() {
		
		$this->addCssClass($this->htmlOptions, 'panel');
		
		if($this->isValidContext())
			self::addCssClass($this->htmlOptions, 'panel-'.$this->getContextClass());

		if ($this->padContent)
			self::addCssClass($this->contentHtmlOptions, 'panel-body');

		if (!isset($this->contentHtmlOptions['id'])) {
			$this->contentHtmlOptions['id'] = $this->getId();
		}

		if (isset($this->headerHtmlOptions['class'])) {
			$this->headerHtmlOptions['class'] = 'panel-heading ' . $this->headerHtmlOptions['class'];
		} else {
			$this->headerHtmlOptions['class'] = 'panel-heading';
		}

		echo CHtml::openTag('div', $this->htmlOptions);

		$this->renderHeader();
		$this->renderContentBegin();
	}
811717
public function init()
    {
        $content = array();
        foreach ($this->request->files as $file) {
            $cacheFile = $this->generateCacheFile($file);

            if (! $fileContent = $this->checkCache($file, $cacheFile)) {
                $this->setupFile($file, $cacheFile);
                $fileContent = $this->getFileContent($file, $cacheFile);
            }

            $content[] = $this->afterGetFileContent($fileContent);
        }

        $this->content = implode("\n", $content);
    }
647903
protected function setPage ()
        {
            $urlTemplates = [];

            if ($this->arParams['SEF_MODE'] === 'Y')
            {
                $variables = [];

                $urlTemplates = \CComponentEngine::MakeComponentUrlTemplates (
                    $this->defaultUrlTemplates404,
                    $this->arParams['SEF_URL_TEMPLATES']
                );

                $variableAliases = \CComponentEngine::MakeComponentVariableAliases (
                    $this->defaultUrlTemplates404,
                    $this->arParams['VARIABLE_ALIASES']
                );

                $this->templatePage = \CComponentEngine::ParseComponentPath (
                    $this->arParams['SEF_FOLDER'],
                    $urlTemplates,
                    $variables
                );

                if (!$this->templatePage)
                {
                    if ($this->arParams['SET_404'] === 'Y')
                    {
                        $folder404 = str_replace ('\\', '/', $this->arParams['SEF_FOLDER']);

                        if ($folder404 != '/')
                        {
                            $folder404 = '/' . trim ($folder404, "/ \t\n\r\0\x0B") . "/";
                        }

                        if (substr ($folder404, - 1) == '/')
                        {
                            $folder404 .= 'index.php';
                        }

                        if ($folder404 != Main\Context::getCurrent ()->getRequest ()->getRequestedPage ())
                        {
                            $this->return404 ();
                        }
                    }

                    $this->templatePage = $this->defaultSefPage;
                }

                if ($this->isSearchRequest () && $this->arParams['USE_SEARCH'] === 'Y')
                {
                    $this->templatePage = 'search';
                }

                \CComponentEngine::InitComponentVariables (
                    $this->templatePage,
                    $this->componentVariables,
                    $variableAliases,
                    $variables
                );

                $models = $this->setModels ();
            } else
            {
                $this->templatePage = $this->defaultPage;
            }

            $this->sefFolder = $this->arParams['SEF_FOLDER'];
            $this->urlTemplates = $urlTemplates;
            $this->variables = $variables;
            $this->variableAliases = $variableAliases;
            $this->models = $models;
        }
412099
private function SaveContent()
    {
        $this->Content()->SetType($this->FrontendModule()->MyType());
        $this->Content()->SetCssClass($this->Value('CssClass'));
        $this->Content()->SetCssID($this->Value('CssID'));
        $this->Content()->SetTemplate($this->Value('Template'));
        $this->Content()->SetCacheLifetime((int) $this->Value('CacheLifetime'));
        $this->Content()->SetGuestsOnly((bool) $this->Value('GuestsOnly'));
        if ($this->AutoPublish())
        {
            $this->Content()->SetPublish(true);
        }
        else
        {
            $this->Content()->SetPublish((bool) $this->Value('Publish'));
        }
        $this->Content()->SetPublishFrom($this->PublishDate('PublishFrom'));
        $this->Content()->SetPublishTo($this->PublishDate('PublishTo'));

        $action = Action::Update();
        if (!$this->Content()->Exists()) {
            $action = Action::Create();
            $this->Content()->SetUser(self::Guard()->GetUser());
        }
        $this->Content()->Save();
        $logger = new Logger(self::Guard()->GetUser());
        $logger->ReportContentAction($this->Content(), $action);
        if ($this->CanAssignGroup()) {
            $this->SaveRights();
        }
        $this->SaveMemberGroups();
        $this->SaveWordings();
    }
1262709
private function _setContentFromFile() {
		
		// empty original template content
		$this->setContent('');
		
		// check for template file and load it
		if ($filename = $this->getTemplate()) {
			if (file_exists($filename)) {
				$content = trim(file_get_contents($this->_filename));
				$this->setContent($content);
			}
		}
	}
1363463
public function initHooks()
    {
        register_activation_hook($this->file, array($this , 'activate'));
        register_deactivation_hook($this->file, array($this, 'deactivate'));

        add_action('save_post', array($this, 'updateHtml'), 10, 2);
        add_action('admin_init', array($this, 'handlePost'));
        add_action('admin_init', array($this, 'update'));
        add_action('admin_menu', array($this, 'addMenu'));
        add_action('admin_notices', array(__CLASS__, 'displayNotices'));
    }