/*
Build the renderLog node, add it to the body and assign it's position
based on the monitored component
@return void
540751
function(){
            var self = this,
                renderLogContainer = document.createElement('div'),
                renderLogRenderCountNode = document.createElement("div"),
                renderLogDetailContainer = document.createElement("div"),
                renderLogNotesNode = document.createElement("div"),
                renderLogDetailNode = document.createElement("div");

            renderLogContainer.className = 'renderLog';

            // Apply styling
            this._applyCSSStyling(renderLogContainer, this.styling.renderLog);

            // Attach the click handler for toggling the detail log
            renderLogContainer.addEventListener('click', function(){

                // Show the detail Log
                if(renderLogRenderCountNode.style.display === 'none') {
                    renderLogRenderCountNode.style.display = 'block';
                    renderLogDetailContainer.style.display = 'none';
                    renderLogContainer.style.zIndex = '10000';

                // Hide it
                } else {
                    renderLogRenderCountNode.style.display = 'none';
                    renderLogDetailContainer.style.display = 'block';
                    renderLogContainer.style.zIndex = '10001';
                }
            });

            renderLogRenderCountNode.className = 'renderLogCounter';
            renderLogRenderCountNode.innerText = 1;

            renderLogDetailContainer.style.display = 'none';
            renderLogDetailNode.innerText = '';

            if (this.shouldComponentUpdate) {
                renderLogNotesNode.innerText = 'NOTE: This component uses a custom shouldComponentUpdate(), so the results above are purely informational';
            }

            this._applyCSSStyling(renderLogNotesNode, this.styling.renderLogDetailNotes);

            renderLogDetailContainer.appendChild(renderLogDetailNode);
            renderLogDetailContainer.appendChild(renderLogNotesNode);

            renderLogContainer.appendChild(renderLogRenderCountNode);
            renderLogContainer.appendChild(renderLogDetailContainer);

            this.renderLogContainer = renderLogContainer;
            this.renderLogDetail = renderLogDetailNode;
            this.renderLogNotes = renderLogNotesNode;
            this.renderLogRenderCount = renderLogRenderCountNode;

            // Append to the body
            document.getElementsByTagName('body')[0].appendChild(renderLogContainer);

            // Set initial position
            this._updateRenderLogPosition();

            //
            this._updateRenderLogNode();

        }
657724
protected function build()
    {
        $operation = $this->buildOperation('TransactionStatus');

        $merchantID = $this->document->createElement('merchantID', $this->merchantId);
        $operation->appendChild($merchantID);

        if ($this->mpayTid) {
            $xmlMPayTid = $this->document->createElement('mpayTID', $this->mpayTid);
            $operation->appendChild($xmlMPayTid);
        }

        if ($this->tid) {
            $xmlTid = $this->document->createElement('tid', $this->tid);
            $operation->appendChild($xmlTid);
        }
    }
532907
function() {

		 WireIt.WiringEditor.superclass.render.call(this);
	
	    /**
	     * @property layer
	     * @type {WireIt.Layer}
	     */
	    this.layer = new WireIt.Layer(this.options.layerOptions);
		 this.layer.eventChanged.subscribe(this.onLayerChanged, this, true);

		 // Left Accordion
		 this.renderModulesAccordion();

	    // Render module list
	    this.buildModulesList();
  	}
495188
protected function initComponents()
    {
        if (!$this->layout->isFallBack()) {
            foreach ($this->layout->settings['components'] as $component => $properties) {
                list($name, $alias) = strpos($component, ' ')
                    ? explode(' ', $component)
                    : [$component, $component];

                $this->addComponent($name, $alias, $properties, true);
            }
        }

        foreach ($this->page->settings['components'] as $component => $properties) {
            list($name, $alias) = strpos($component, ' ')
                ? explode(' ', $component)
                : [$component, $component];

            $this->addComponent($name, $alias, $properties);
        }

        /**
         * @event cms.page.initComponents
         * Fires after the components for the given page have been initialized
         *
         * Example usage:
         *
         *     Event::listen('cms.page.initComponents', function ((\Cms\Classes\Controller) $controller, (\Cms\Classes\Page) $page, (\Cms\Classes\Layout) $layout) {
         *         \Log::info($page->title . ' components have been initialized');
         *     });
         *
         * Or
         *
         *     $CmsController->bindEvent('page.initComponents', function ((\Cms\Classes\Page) $page, (\Cms\Classes\Layout) $layout) {
         *         \Log::info($page->title . ' components have been initialized');
         *     });
         *
         */
        $this->fireSystemEvent('cms.page.initComponents', [$this->page, $this->layout]);
    }
360140
public function onSystem()
    {
        Breadcrumbs::register('error-log', function($breadcrumbs) {
            $breadcrumbs->push('Error Log', handles('antares::logger/system/index'));
        });
        $view = !is_null(from_route('date')) ? view('antares/logger::admin.partials._breadcrumb')->render() : Breadcrumbs::render('error-log');
        view()->share('breadcrumbs', $view);
    }
1102983
protected function OnSuccess()
    {
        $action = Action::Update();
        $isNew = !$this->layout->Exists();
        if ($isNew)
        {
            $action = Action::Create();
            $this->layout->SetUser(self::Guard()->GetUser());
        }
        $oldFile = $isNew ? '' : PathUtil::LayoutTemplate($this->layout);
        $this->layout->SetName($this->Value('Name'));
        $this->layout->Save();
        $logger = new Logger(self::Guard()->GetUser());
        $logger->ReportLayoutAction($this->layout, $action);
        if ($this->CanAssignGroup())
        {
            $this->SaveRights();
        }
        if ($isNew)
        {
            $this->SaveAreas();
        }
        $this->UpdateFiles($oldFile);
        $args = array('layout'=>$this->layout->GetID());
        Response::Redirect(BackendRouter::ModuleUrl(new AreaList(), $args));
    }
1017598
public function render()
    {
        $script[] = $this->_getJavascriptTemplateBlockBegin();

        $trackingUserId = (null === $this->userId)
            ? ''
            : sprintf(", {'userId': '%s'}", $this->userId);

        if ($this->debug) {
            $script[] = "ga('create', '{$this->trackingId}', { 'cookieDomain': 'none' }, '{$this->trackerName}'{$trackingUserId});";
        } else {
            $script[] = "ga('create', '{$this->trackingId}', '{$this->trackingDomain}', '{$this->trackerName}'{$trackingUserId});";
        }

        if ($this->ecommerceTracking) {
            $script[] = "ga('require', 'ecommerce');";
        }

        if ($this->displayFeatures) {
            $script[] = "ga('require', 'displayfeatures');";
        }

        if ($this->anonymizeIp) {
            $script[] = "ga('set', 'anonymizeIp', true);";
        }

        if ($this->nonInteraction) {
            $script[] = "ga('set', 'nonInteraction', true);";
        }

        if ($this->campaign instanceof Campaign) {
            $script[] = (new CampaignRenderer($this->campaign))->render();
        }

        $trackingStack = $this->trackingBag->get();
        if (count($trackingStack)) {
            $script[] = implode("\n", $trackingStack);
        }

        if ($this->autoTrack) {
            $script[] = "ga('send', 'pageview');";
        }

        if ($this->ecommerceTracking) {
            $script[] = "ga('ecommerce:send');";
        }

        $script[] = $this->_getJavascriptTemplateBlockEnd();

        return implode('', $script);
    }
1343201
function init()
    {
        $rcube = rcube::get_instance();

        $this->add_hook('message_part_after', array($this, 'message_part_after'));
        $this->add_hook('message_outgoing_body', array($this, 'message_outgoing_body'));
        $this->add_hook('html2text', array($this, 'html2text'));
        $this->add_hook('html_editor', array($this, 'html_editor'));

        if ($rcube->task == 'settings') {
            $this->add_hook('preferences_list', array($this, 'preferences_list'));
            $this->add_hook('preferences_save', array($this, 'preferences_save'));
        }
    }
1099582
protected function on_created()
    {
        foreach( $this->model['components'] as $args )
        {
            $this->components[$args['name']] = $this->create_component($args);
        }
    }
33387
public function build()
    {
        if ($this->builded) {
            return;
        }

        $collection = $this->processFilter(false);

        $data = $collection->toArray();

        $this->prependRowSelectorColumn();
        $this->appendActionsColumn();

        Column::setOriginalGridModels($collection);

        $this->columns->map(function (Column $column) use (&$data) {
            $data = $column->fill($data);

            $this->columnNames[] = $column->getName();
        });

        $this->buildRows($data);

        $this->builded = true;
    }
189508
public function body()
    {
        $this->AddPage();

        foreach ($this->bodyElements as $key => $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->newPage();
            }
        }
    }
1133186
protected function addLogging()
    {
        $this->register(
            new MonologServiceProvider(),
            array(
                'monolog.name'      => 'phpDocumentor',
                'monolog.logfile'   => sys_get_temp_dir() . '/phpdoc.log',
                'monolog.debugfile' => sys_get_temp_dir() . '/phpdoc.debug.log',
                'monolog.level'     => Logger::INFO,
            )
        );

        $app = $this;
        /** @var Configuration $configuration */
        $configuration = $this['config'];
        $this['monolog.configure'] = $this->protect(
            function ($log) use ($app, $configuration) {
                $paths    = $configuration->getLogging()->getPaths();
                $logLevel = $configuration->getLogging()->getLevel();

                $app->configureLogger($log, $logLevel, $paths['default'], $paths['errors']);
            }
        );

        $this->extend(
            'console',
            function (ConsoleApplication $console) use ($configuration) {
                $console->getHelperSet()->set(new LoggerHelper());
                $console->getHelperSet()->set(new ConfigurationHelper($configuration));

                return $console;
            }
        );

        ErrorHandler::register($this['monolog']);
    }
331068
public function build()
    {
        $view = $this->getPostsListView();

        $postsPerPage = @$this->viewsData['postsPerPage'] ?: 5;

        $this->pagesData = array_chunk($this->viewsData['blogPosts'], $postsPerPage);

        foreach ($this->pagesData as $pageIndex => $posts) {
            $this->buildPage($pageIndex, $view, $posts);
        }
    }
1263482
function () {
            // Add properties //
            /**
            * Specifies whether the Module is visible on the page.
            * @config visible
            * @type Boolean
            * @default true
            */
            this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key, {
                handler: this.configVisible, 
                value: DEFAULT_CONFIG.VISIBLE.value, 
                validator: DEFAULT_CONFIG.VISIBLE.validator
            });

            /**
            * <p>
            * Object or array of objects representing the ContainerEffect 
            * classes that are active for animating the container.
            * </p>
            * <p>
            * <strong>NOTE:</strong> Although this configuration 
            * property is introduced at the Module level, an out of the box
            * implementation is not shipped for the Module class so setting
            * the proroperty on the Module class has no effect. The Overlay 
            * class is the first class to provide out of the box ContainerEffect 
            * support.
            * </p>
            * @config effect
            * @type Object
            * @default null
            */
            this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key, {
                suppressEvent: DEFAULT_CONFIG.EFFECT.suppressEvent, 
                supercedes: DEFAULT_CONFIG.EFFECT.supercedes
            });

            /**
            * Specifies whether to create a special proxy iframe to monitor 
            * for user font resizing in the document
            * @config monitorresize
            * @type Boolean
            * @default true
            */
            this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key, {
                handler: this.configMonitorResize,
                value: DEFAULT_CONFIG.MONITOR_RESIZE.value
            });

            /**
            * Specifies if the module should be rendered as the first child 
            * of document.body or appended as the last child when render is called
            * with document.body as the "appendToNode".
            * <p>
            * Appending to the body while the DOM is still being constructed can 
            * lead to Operation Aborted errors in IE hence this flag is set to 
            * false by default.
            * </p>
            * 
            * @config appendtodocumentbody
            * @type Boolean
            * @default false
            */
            this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key, {
                value: DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value
            });
        }
1236035
private function addLogs()
    {
        $createdBy = new GeneratorField();
        $createdBy->name = 'created_by';
        $createdBy->parseDBType('integer');
        $createdBy->parseOptions('if,n');
        $this->fields[] = $createdBy;

        $updatedBy = new GeneratorField();
        $updatedBy->name = 'updated_by';
        $updatedBy->parseDBType('integer');
        $updatedBy->parseOptions('if,n'); // edited by dandisy
        $this->fields[] = $updatedBy;
    }
182158
protected function render ()
  {
    $prop          = $this->props;
    $content       = exists ($prop->value) ? $prop->value : $this->getChildren ();
    $blocksService = $this->context->getBlocksService ();

    if ($prop->preRender && is_array ($content))
      $content = $this->attachSetAndGetContent ($content);

    if (exists ($name = $prop->of)) {
      if (!preg_match ('/^\w+$/', $name))
        throw new ComponentException($this, "Invalid block name: <kbd>$name</kbd>");
      if ($prop->byDefault && $blocksService->hasBlock ($name))
        return;
      $blocksService->getBlock ($name)->set ($content);
    }
    elseif (exists ($name = $prop->appendTo)) {
      if ($prop->byDefault && $blocksService->hasBlock ($name))
        return;
      $blocksService->getBlock ($name)->append ($content);
    }
    elseif (exists ($name = $prop->prependTo)) {
      if ($prop->byDefault && $blocksService->hasBlock ($name))
        return;
      $blocksService->getBlock ($name)->prepend ($content);
    }
    else throw new ComponentException($this,
      "One of these properties must be set:<p><kbd>of | appendTo | prependTo</kbd>");
  }
625073
public function indexAction()
    {
        if ($this->getRequest()->isAjax()) {
            try {
                $this->loadLayout(null, false, false);
                $this->getLayout()->getUpdate()->setCacheId(null);
                $this->getLayout()->getUpdate()->addHandle(strtolower($this->getFullActionName()) . '_AJAX');
            } catch (Exception $e) {
                Mage::logException($e);
                $this->getResponse()->setHeader('Content-Type', 'application/json');
                $this->getResponse()->setBody(Zend_Json::encode(['error' => true, 'message' => $e->getMessage()]));
            }
        }

        $this->loadLayout();
        $this->renderLayout();
    }