Get Javascript page settings.
@return string
513655
public function getSettings()
    {
        $storeId = $this->getMagentoStoreId();

        return json_encode([
            'connect_url'              => $this->getConnectJsUrl(),
            'publishable_key_payment'  => $this->configHelper->getPublishableKeyPayment($storeId),
            'publishable_key_checkout' => $this->configHelper->getPublishableKeyCheckout($storeId),
            'publishable_key_back_office' => $this->configHelper->getPublishableKeyBackOffice($storeId),
            'create_order_url'         => $this->getUrl(Config::CREATE_ORDER_ACTION),
            'save_order_url'           => $this->getUrl(Config::SAVE_ORDER_ACTION),
            'selectors'                => $this->getReplaceSelectors(),
            'shipping_prefetch_url'    => $this->getUrl(Config::SHIPPING_PREFETCH_ACTION),
            'prefetch_shipping'        => $this->configHelper->getPrefetchShipping($storeId),
            'save_email_url'           => $this->getUrl(Config::SAVE_EMAIL_ACTION),
            'quote_is_virtual'         => $this->getQuoteIsVirtual(),
            'totals_change_selectors'  => $this->getTotalsChangeSelectors(),
            'additional_checkout_button_class' => $this->getAdditionalCheckoutButtonClass(),
            'initiate_checkout'        => $this->getInitiateCheckout(),
            'toggle_checkout'          => $this->getToggleCheckout(),
        ]);
    }
875675
public function javascript()
    {
        $scriptContent = file_get_contents($this->pagseguro->getUrl()['javascript']);

        return response()->make($scriptContent, '200')
            ->header('Content-Type', 'text/javascript');
    }
1111366
protected function getConfiguration()
    {
        return array(
            'minHeight' => 200,
            'toolbar' => array(),
            'buttons' => array('html', '|', 'formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'image', 'video', 'file', 'table', 'link', '|', 'alignment', '|', 'horizontalrule'),
            'buttonsAdd' => array(),
            'formattingTags' => array('p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4'),
            'buttonSource' => true,
            'iframe' => false,
            'fullpage' => false,
            'css' => false,
            'focus' => false,
            'shortcuts' => true,
            'autoresize' => true,
            'cleanup' => true,
            'toolbarFixed' => false,
            'toolbarFixedTopOffset' => 0,
            'toolbarFixedBox' => false,
            'toolbarFixedTarget' => 'document',
            'paragraphy' => true,
            'convertLinks' => true,
            'convertDivs' => true,
            'autosave' => false,
            'autosaveInterval' => 60,
            'modalOverlay' => true,
            'tabindex' => false,
            'observeImages' => true,
            'air' => false,
            'airButtons' => array('formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent'),
            'wym' => false,
            'mobile' => true,
            'linkProtocol' => 'http://',
            'placeholder' => false,
            'linebreaks' => false,
            'allowedTags' => false,
            'deniedTags' => array('html', 'head', 'link', 'body', 'meta', 'script', 'style', 'applet'),
            'boldTag' => 'strong',
            'italicTag' => 'em',
            'linkEmail' => false,
            'linkAnchor' => false,
            'formattingPre' => false,
            'phpTags' => false,
            'visual' => true,
            's3' => false,
            'tabFocus' => true,
            'removeEmptyTags' => true,
            'convertImageLinks' => false,
            'convertVideoLinks' => false,
            'pastePlainText' => false,
            'linkNoFollow' => false,
            'clipboardUpload' => true,
            'dragUpload' => true,
            'tidyHtml' => false,
            'imageFloatMargin' => '10px',
            'tabSpaces' => false,
            'observeLinks' => false,
            'plugins' => array(),
        );
    }
291860
public function getSettings()
    {
        return json_encode([
            'connect_url'                   => $this->getConnectJsUrl(),
            'publishable_key_back_office'   => $this->getBackOfficeKey(),
            'create_order_url'              => $this->getUrl(Config::CREATE_ORDER_ACTION),
            'save_order_url'                => $this->getUrl(Config::SAVE_ORDER_ACTION),
        ]);
    }
945161
public function scriptVariables()
    {
        $lang = trans('sleeping_owl::lang');
        if ($lang == 'sleeping_owl::lang') {
            $lang = trans('sleeping_owl::lang', [], 'en');
        }

        return [
            'debug' => config('app.debug'),
            'env' => $this->app->environment(),
            'locale' => $this->app['translator']->getLocale(),
            'url' => $this->app['url']->to('/'),
            'lang' => $lang,
            'wysiwyg' => $this->config['wysiwyg'],
            'template' => $this->app[TemplateInterface::class]->toArray(),
            'user_id' => auth()->id(),
        ];
    }
618323
public function get_setting() {
        global $CFG;

        $value = $this->config_read($this->name);
        $flag  = $this->config_read($this->name.'_flag');

        if (is_null($value) or is_null($flag)) {
            return NULL;
        }

        $flag   = (int)$flag;
        $forced = (boolean)(1 & $flag); // first bit
        $adv    = (boolean)(2 & $flag); // second bit

        return array('value' => $value, 'forced' => $forced, 'adv' => $adv);
    }
197362
public function getApplyFormSettings()
    {
        if (!$this->applyFormSettings) {
            $settings = new DisableElementsCapableFormSettings();
            $settings->setForm('Applications/Apply');
            $this->applyFormSettings = $settings;
        }
        return $this->applyFormSettings;
    }
443949
public function fetchJS()
    {
        $string = "<script>baseURL = '" . $this->router->baseURL() . "/'</script>\r\n";

        if (empty($this->queuedJS)) {
            return $string;
        }

        foreach ($this->queuedJS as $script) {
            $string .= '<script src="' . $script . '"></script>' . "\r\n";
        }

        return $string;
    }
346963
public function get_setting() {
        $result = $this->config_read($this->name);
        if (is_null($result)) {
            return NULL;
        }
        if (!$this->load_choices()) {
            return NULL;
        }
        $result = str_pad($result, count($this->choices), '0');
        $result = preg_split('//', $result, -1, PREG_SPLIT_NO_EMPTY);
        $setting = array();
        foreach ($this->choices as $key=>$unused) {
            $value = array_shift($result);
            if ($value) {
                $setting[$key] = 1;
            }
        }
        return $setting;
    }
1037908
protected function getInlineJavaScript()
    {
        $javascript = sprintf(
            "var %s_obj = new %s(%s, %s);",
            $this->id,
            $this->getJavaScriptClass(),
            SwatString::quoteJavaScriptString($this->id),
            SwatString::quoteJavaScriptString($this->connection_close_uri)
        );

        if ($this->autofocus) {
            $focusable = true;
            if ($this->default_focused_control === null) {
                $control = $this->getFirstDescendant('SwatControl');
                if ($control === null) {
                    $focusable = false;
                } else {
                    $focus_id = $control->getFocusableHtmlId();
                    if ($focus_id === null) {
                        $focusable = false;
                    }
                }
            } else {
                $focus_id = $this->default_focused_control->getFocusableHtmlId();

                if ($focus_id === null) {
                    $focusable = false;
                }
            }

            if ($focusable) {
                $javascript .= "\n{$this->id}_obj.setDefaultFocus('{$focus_id}');";
            }
        }

        if (!$this->autocomplete) {
            $javascript .= "\n{$this->id}_obj.setAutocomplete(false);";
        }

        return $javascript;
    }
1060203
protected function getInlineJavaScript()
    {
        $javascript = '';

        foreach ($this->fields as $field) {
            $field_javascript = $field->getRendererInlineJavaScript();
            if ($field_javascript != '') {
                $javascript .= "\n" . $field_javascript;
            }
        }

        foreach ($this->fields as $field) {
            $field_javascript = $field->getInlineJavaScript();
            if ($field_javascript != '') {
                $javascript .= "\n" . $field_javascript;
            }
        }

        return $javascript;
    }
779460
private function getJS()
    {

        if (strlen($this->JSrenderDocReady . $this->JSrender) == 0) {
            return "";
        }

        $js = "
                    <script type=\"text/javascript\">

                    ";
        if (strlen($this->JSrenderDocReady) > 0) {
            $js .= "   $(document).ready(function()
                        {
                        {$this->JSrenderDocReady}
                        } )
                      ";
        }
        $js .= $this->JSrender . "


                    </script>"
        ;

        return $js;
    }
1284428
public function getSettingsFields()
    {
        $fields = parent::getSettingsFields();

        $settings = FieldGroup::create(
            FieldGroup::create(
                NumericField::create('Width', _t('CarouselPage.db_Width')),
                NumericField::create('Height', _t('CarouselPage.db_Height')),
                CheckboxField::create('Captions', _t('CarouselPage.db_Captions'))
            )
        );
        $settings->setName('Carousel');
        $settings->setTitle(_t('CarouselPage.SINGULARNAME'));
        $fields->addFieldToTab('Root.Settings', $settings);

        return $fields;
    }
1294501
public static function getSettings()
    {
        try {
            return self::getCurrent()->settings;
        } catch (Exception $exception) {
            // No application running.
            throw new SettingsException(
                $exception->getMessage(),
                $exception->getCode(),
                $exception
            );
        }
    }
848222
protected function getOptions()
	{
		// Initialize variables.
		$options = array();

		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			$label = (isset($option[0]) ? $option[0] : $option['label']);

			// Create a new option object based on the <option /> element.
			$tmp = Dropdown::option(
				(string) $option['value'], trim((string) $label), 'value', 'text',
				((string) $option['disabled'] == 'true')
			);
			foreach ($option->attributes() as $index => $value)
			{
				$dataCheck = strtolower(substr($index, 0, 4));
				if ($dataCheck == 'data')
				{
					$tmp->$index = (string) $value;
				}
			}

			// Set some option attributes.
			$tmp->class = (string) $option['class'];

			// Set some JavaScript option attributes.
			$tmp->onclick = (string) $option['onclick'];

			// Add the option object to the result set.
			$options[] = $tmp;
		}

		reset($options);

		return $options;
	}
1225909
public static function getRootPageSettingList()
    {
        static $cache = null;

        if ($cache === null) {
            $query = 'SELECT seosr.*
                        FROM tx_metaseo_setting_root seosr
                             INNER JOIN pages p
                                 ON p.uid = seosr.pid
                                AND p.is_siteroot = 1
                                AND p.deleted = 0
                       WHERE seosr.deleted = 0';
            $cache = DatabaseUtility::getAllWithIndex($query, 'pid');
        }

        return $cache;
    }
537028
public function getScript()
    {
        $sJsCode = '';
        switch($this->sType)
        {
        case Jaxon::FORM_VALUES:
            $sJsCode = $this->getJsCall('getFormValues', $this->xValue);
            break;
        case Jaxon::INPUT_VALUE:
            $sJsCode = $this->getJsCall('$', $this->xValue) . '.value';
            break;
        case Jaxon::CHECKED_VALUE:
            $sJsCode = $this->getJsCall('$', $this->xValue) . '.checked';
            break;
        case Jaxon::ELEMENT_INNERHTML:
            $sJsCode = $this->getJsCall('$', $this->xValue) . '.innerHTML';
            break;
        case Jaxon::QUOTED_VALUE:
            $sJsCode = $this->getQuotedValue(addslashes($this->xValue));
            break;
        case Jaxon::BOOL_VALUE:
            $sJsCode = ($this->xValue) ? 'true' : 'false';
            break;
        case Jaxon::PAGE_NUMBER:
            $sJsCode = (string)$this->xValue;
            break;
        case Jaxon::NUMERIC_VALUE:
            $sJsCode = (string)$this->xValue;
            break;
        case Jaxon::JS_VALUE:
            if(is_array($this->xValue) || is_object($this->xValue))
            {
                // Unable to use double quotes here because they cannot be handled on client side.
                // So we are using simple quotes even if the Json standard recommends double quotes.
                $sJsCode = str_replace(['"'], ["'"], json_encode($this->xValue, JSON_HEX_APOS | JSON_HEX_QUOT));
            }
            else
            {
                $sJsCode = (string)$this->xValue;
            }
            break;
        }
        return $sJsCode;
    }