/* Method is executed before render.
438390
protected function beforeRender()
    {

        // secured page
        if (is_object($this->actualPage)) {
            if (!$this->getUser()->isLoggedIn() && $this->actualPage->getSecured()) {
                $this->redirect(':Frontend:Login:');
            }
        }

        if (is_object($this->actualPage)) {
            if ($this->actualPage->getLayout()) {
                $this->setLayout($this->actualPage->getLayout());
            } elseif ($this->actualPage->getDefault()) {
                $this->setLayout("layoutDefault");
            } else {
                $this->setLayout("layout");
            }
        }

        if ($this->isAjax()) {
            $this->invalidateControl('flashMessages');
        }

        $this->template->registerHelperLoader('\WebCMS\Helpers\SystemHelper::loader');

        // get top page for sidebar menu
        if (is_object($this->actualPage)) {
            $top = $this->actualPage;
            while ($top->getParent() != NULL && $top->getLevel() > 1) {
                $top = $top->getParent();
            }
        }

        // set up boxes
        $this->setUpBoxes();

        // load user defined scripts & styles
        $this->setPageScripts();
        $this->setPageStyles();

        // set default seo settings
        if (is_object($this->actualPage)) {
            $this->template->breadcrumb = $this->getBreadcrumbs();
            $this->template->sidebar = $this->getStructure($this, $top, $this->em->getRepository('WebCMS\Entity\Page'), false, $this->settings->get('Sidebar class', \WebCMS\Settings::SECTION_BASIC, 'text')->getValue(), false, false, null, $this->settings->get('Sidebar class', \WebCMS\Settings::SECTION_BASIC, 'text')->getValue());
        }

        $this->template->abbr = $this->abbr;
        $this->template->settings = $this->settings;
        // !params load from settings
        $this->template->structuresRaw = $this->em->getRepository('WebCMS\Entity\Page')->findBy(array(
            'language' => $this->language
        ));
        $this->template->structures = $this->getStructures(!$this->settings->get('Navbar dropdown', \WebCMS\Settings::SECTION_BASIC, 'text')->getValue(), $this->settings->get('Navbar class', \WebCMS\Settings::SECTION_BASIC, 'text')->getValue(), $this->settings->get('Navbar dropdown', \WebCMS\Settings::SECTION_BASIC, 'text')->getValue(), $this->settings->get('Navbar id', \WebCMS\Settings::SECTION_BASIC, 'text')->getValue());
        $this->template->setTranslator($this->translator);
        $this->template->actualPage = $this->actualPage;
        $this->template->user = $this->getUser();
        $this->template->activePresenter = $this->getPresenter()->getName();
        $this->template->language = $this->language;
        $this->template->languages = $this->em->getRepository('WebCMS\Entity\Language')->findAll();
    }
1247483
protected function BeforeGather()
    {  
        if ($this->IsTriggered() && $this->Elements()->Check(Request::MethodArray($this->Method())))
        {
            return $this->OnSuccess();
        }
        return parent::BeforeGather();
    }
879597
void onRendererSelected() {
        if (view.getRendererSelected() != null) {
            rendererLibrary = rendererManager.getRendererByName(view.getRendererSelected());
            selectCommand.execute();
        }
    }
10223
public function beforeRender(Event $event): void
    {
        $this->setJson('isAjax', $this->_controller->request->is('ajax'));
        $this->setJson('isMobile', $this->_controller->request->is('mobile'));
        $this->setBoth('isDialog', $this->_controller->request->is('dialog'));
        $this->setBoth('isJson', $this->_controller->request->is('json'));
        $this->setJson('debug', Configure::read('debug'));

        $ssl = false;
        if (env('HTTPS') || $this->_controller->request->is('ssl') || $this->_controller->request->env('HTTP_X_FORWARDED_PROTO') == 'https') {
            $ssl = true;
        }

        $appData = array(
            'jsonData' => $this->_jsonData,
            'webroot' => 'http' . ($ssl ? 's' : '') . '://' . env('HTTP_HOST') . $this->_controller->request->webroot,
            'url' => $this->_controller->request->url,
            // 'controller' => $this->_controller->name,
            // 'action' => $this->_controller->request->action,
            // 'plugin' => $this->_controller->request->plugin,
            'request' => array(
                'query' => $this->_controller->request->query,
                'pass' => $this->_controller->request->params['pass'],
                'plugin' => $this->_controller->request->plugin,
                'controller' => Inflector::underscore($this->_controller->name),
                'action' => $this->_controller->request->action
            )
        );

        // merge in the additional frontend data
        $appData = Hash::merge($appData, $this->_additionalAppData);
        $this->_controller->set('frontendData', $appData);
        $this->_controller->set('closeDialog', $this->_closeDialog);
    }
74963
public function beforeRenderIndexType()
    {
        if (!($this->_action() instanceof IndexAction)) {
            return;
        }

        $controller = $this->_controller();
        $controller->set('indexFinderScopes', $this->_getIndexFinderScopes());
        $controller->set('indexFormats', $this->_getIndexFormats());
        $controller->set('indexType', $this->_getIndexType());
        $controller->set('indexTitleField', $this->_getIndexTitleField());
        $controller->set('indexBodyField', $this->_getIndexBodyField());
        $controller->set('indexImageField', $this->_getIndexImageField());
        $controller->set('indexGalleryCssClasses', $this->_getIndexGalleryCssClasses());
    }
608425
function(renderer) {
        var root = this.root;
        if(renderer.root.parentNode == this.rendererRoot) {
            root = renderer.root;
        }
        root.parentNode.removeChild(root);
        renderer.rendererRoot.appendChild(root);
    }
694454
protected void beforeEndElement() {
        if (depth > 0 && stack[depth] == WROTE_MARKUP) { // but not data
            try {
                writeNewLine(depth - 1);
            } catch (Exception ignored) {
                ignored.printStackTrace();
            }
        }
    }
606521
function GraphicsRenderer(renderer)
{
    ObjectRenderer.call(this, renderer);

    this.graphicsDataPool = [];

    this.primitiveShader = null;
    this.complexPrimitiveShader = null;
}
922430
public function beforeRender(Event $event)
    {
        parent::beforeRender($event);

        $this->set('detect', $this->detect);
    }
363063
public void executeBeforeMethods(final Object obj) {
        // Invoke element only if not parameterized
        if (this.element.getDataProvider() == null) {
            // invoking once the beforeFirstRun-method
            if (!beforeFirstRun) {
                beforeFirstRun = true;

                Method[] beforeFirst = null;
                try {
                    beforeFirst = element.findBeforeFirstRun();
                    if (beforeFirst.length != 0) {
                        checkAndExecuteBeforeAfters(obj, BeforeFirstRun.class, beforeFirst);
                    }
                } catch (final PerfidixMethodCheckException e) {
                    BENCHRES.addException(e);
                }
            }

            // invoking the beforeEachRun-method
            Method[] beforeEach = null;
            try {
                beforeEach = element.findBeforeEachRun();
                if (beforeEach.length != 0) {
                    checkAndExecuteBeforeAfters(obj, BeforeEachRun.class, beforeEach);
                }
            } catch (final PerfidixMethodCheckException e) {
                BENCHRES.addException(e);
            }
        }
    }
719863
@Override
	public void render() {
		final String callback = Request.getParam(callbackParamName, Response.DEFAULT_CALLBACK_NAME);
		this.text = StrUtil.format("{}({})", callback, this.text);
		super.render();
	}
733769
public function beforeCompile(): void
	{
		$config = $this->validateConfig($this->defaults);

		$definitions = $config['all'] === true
			? $this->getContainerBuilder()->getDefinitions()
			: array_map(
				[$this->getContainerBuilder(), 'getDefinition'],
				array_keys($this->getContainerBuilder()->findByTag(self::TAG_INJECT_VALUE))
			);

		foreach ($definitions as $def) {
			// If class is not defined, then skip it
			if ($def->getType() === null) continue;

			// Inject @value into definitin
			$this->inject($def);
		}
	}
519388
function(){

    var gl = this.gl;
    gl.bindRenderbuffer(    RENDERBUFFER,  this.id );
    gl.renderbufferStorage( RENDERBUFFER,  this.format , this.width, this.height );
    gl.bindRenderbuffer(    RENDERBUFFER,  null );

  }
1230471
@Override
    public void before(final Method method, final Object[] params, final Object arg2) throws Throwable {
        AuditManager.getInstance().audit(method.getClass(), method, params);
    }
822614
public function onBeforeWrite()
    {
        parent::onBeforeWrite();
        if ($this->UrlSegment) {
            $this->UrlSegment = Convert::raw2url($this->UrlSegment);
        } else {
            $this->UrlSegment = Convert::raw2url($this->ClassName.'-'.$this->ID);
        }
    }
96438
function () {
    var draw = this.el.components.draw;
    var selector = this.data.asset;
    var width = draw.data.width;
    var height = draw.data.height;

    if (this.rendering) {
      return;
    }

    this.rendering = true;

    var node = document.querySelector(selector);

    if (!node) {
      console.error('Could not find html element with selector "' + selector + '"');
      return;
    }

    if (!this.observer) {
      this.observer = new MutationObserver(function (mutations) {
        queueRender(node, width, height, function (canvas) {
          renderedCanvas = canvas;
          draw.render();
        });
      });

      var config = { attributes: true, childList: true, characterData: true, subtree: true };
      this.observer.observe(node, config);
    }

    queueRender(node, width, height, function (canvas) {
      renderedCanvas = canvas;
      draw.render();
    });
  }
346825
@Override
    public void beforeCompletion() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { 
            Tr.entry(this, tc, "beforeCompletion");
            Tr.exit(this, tc, "beforeCompletion");
        }
    }