Returns the client script component.
@return CClientScript the component.
964208
protected function getClientScript()
    {
        if (isset($this->_clientScript)) {
            return $this->_clientScript;
        } else {
            if (!Yii::app()->hasComponent('clientScript')) {
                return false;
            }
            return $this->_clientScript = Yii::app()->getComponent('clientScript');
        }
    }
284508
public function build(): GetScriptSourceRequest
	{
		$instance = new GetScriptSourceRequest();
		if ($this->scriptId === null) {
			throw new BuilderException('Property [scriptId] is required.');
		}
		$instance->scriptId = $this->scriptId;
		return $instance;
	}
308251
public RenderScript getRenderScript() {
        if (renderScript == null) {
            renderScript = RenderScript.create(context, renderScriptContextType);
        }
        return renderScript;
    }
1127435
public static ScriptFactory getScriptFactory() {
    ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
    if (processEngineConfiguration != null) {
      return processEngineConfiguration.getScriptFactory();
    }
    else {
      return new ScriptFactory();
    }
  }
1116765
public com.google.appengine.v1.ScriptHandler getScript() {
    if (handlerTypeCase_ == 3) {
       return (com.google.appengine.v1.ScriptHandler) handlerType_;
    }
    return com.google.appengine.v1.ScriptHandler.getDefaultInstance();
  }
571315
private function _getScript()
    {
        $aVars = $this->getOptionVars();
        $sYesScript = 'jaxon.ajax.response.process(command.response)';
        $sNoScript = 'jaxon.confirm.skip(command);jaxon.ajax.response.process(command.response)';
        $sConfirmScript = jaxon()->dialog()->confirm('msg', $sYesScript, $sNoScript);
        $aVars['sConfirmScript'] = $this->render('jaxon::plugins/confirm.js', ['sConfirmScript' => $sConfirmScript]);

        return $this->render('jaxon::plugins/config.js', $aVars) . "\n" . $this->sJsReady . "\n";
    }
857902
protected function getInlineJavaScript()
    {
        $show_processing_throbber = $this->show_processing_throbber
            ? 'true'
            : 'false';

        $javascript = sprintf(
            "var %s_obj = new %s('%s', %s);",
            $this->id,
            $this->getJavaScriptClass(),
            $this->id,
            $show_processing_throbber
        );

        if ($this->show_processing_throbber) {
            $javascript .= sprintf(
                "\n%s_obj.setProcessingMessage(%s);",
                $this->id,
                SwatString::quoteJavaScriptString(
                    $this->processing_throbber_message
                )
            );
        }

        if ($this->confirmation_message !== null) {
            $javascript .= sprintf(
                "\n%s_obj.setConfirmationMessage(%s);",
                $this->id,
                SwatString::quoteJavaScriptString($this->confirmation_message)
            );
        }

        return $javascript;
    }
59130
public function getScript()
    {
        $_script = $this->script;
        $script = [
            $_script['form-create']
        ];
        if ($this->loadCityAreaData == true)
            $script[] = $_script['city-area-data'];
        if ($this->loadCityData == true)
            $script[] = $_script['city-data'];
        if ($this->linkJq)
            $script[] = $_script['jq'];
        if ($this->linkIview) {
            $script[] = $_script['iview'];
            $script[] = $_script['iview-css'];
        }
        if ($this->linkVue)
            $script[] = $_script['vue'];
        return array_reverse($script);
    }
659736
public function getScript()
    {
        $di = jaxon()->di();
        $code = '';
        foreach(array_keys($this->aFunctions) as $sName)
        {
            $xFunction = $di->get($sName);
            $code .= $xFunction->getScript();
        }
        return $code;
    }
957284
public function registerClientScript()
	{
		/** @var $cs CClientScript */
		$cs = Yii::app()->getClientScript();

		$cs->registerPackage('picker');

		$pickerOptions = CJavaScript::encode($this->pickerOptions);
		$gridId = $this->grid->id;
		$class = preg_replace('/\s+/', '.', $this->class);

		// Registering script to properly open *only* the picker for which corresponding toggler was clicked,
		// and close all other pickers.
		$cs->registerScript(
			__CLASS__ . '#' . $this->id,
			<<<ENDL
$(document).on('click','#{$gridId} a.{$class}', function() {
	if ($(this).hasClass('pickeron')) {
		$(this).removeClass('pickeron').picker('toggle');
		return;
	}
	$('#{$gridId} a.pickeron')
		.removeClass('pickeron')
		.each(function (i, elem) {
			$(elem).picker('toggle');
		});
	$(this)
		.picker({$pickerOptions})
		.picker('toggle').addClass('pickeron'); return false;
});
ENDL
		);
	}
1129336
public function getJavaScriptCode()
    {
        $fieldsJavaScriptCode = [];
        $formConfiguration = $this->getFormObject()->getConfiguration();

        foreach ($formConfiguration->getFields() as $field) {
            $fieldsJavaScriptCode[] = $this->processField($field);
        }

        $formName = GeneralUtility::quoteJSvalue($this->getFormObject()->getName());
        $fieldsJavaScriptCode = implode(CRLF, $fieldsJavaScriptCode);

        return <<<JS
(function() {
    Fz.Form.get(
        $formName,
        function(form) {
            var field = null;

$fieldsJavaScriptCode
        }
    );
})();
JS;
    }
1195595
function GetScriptFolder()
  {
      if ('' != $this->GetBaseDir()) {
          $current_script_folder_detected = $this->ConvertToUnixPath($this->GetBaseDir());
      } else {
          $current_script_folder_detected = $this->ConvertToUnixPath(dirname(__FILE__));
      }

      if (substr($current_script_folder_detected,-1) != "/") {
          $current_script_folder_detected.="/";
      }
      return $this->ConvertToWindowsPathIfNeeded($current_script_folder_detected);
  }
302415
public function registerCustomClientScript()
	{
		/** @var $cs CClientScript */
		$cs = Yii::app()->getClientScript();

		$fixedHeaderJs = '';
		if ($this->fixedHeader) {
            Booster::getBooster()->registerAssetJs('jquery.stickytableheaders' . (!YII_DEBUG ? '.min' : '') . '.js');
			$fixedHeaderJs = "$('#{$this->id} table.items').stickyTableHeaders({fixedOffset:{$this->headerOffset}});";
			$this->componentsAfterAjaxUpdate[] = $fixedHeaderJs;
		}

		if ($this->sortableRows) {
			$afterSortableUpdate = '';
			if ($this->afterSortableUpdate !== null) {
				if (!($this->afterSortableUpdate instanceof CJavaScriptExpression) && strpos(
					$this->afterSortableUpdate,
					'js:'
				) !== 0
				) {
					$afterSortableUpdate = new CJavaScriptExpression($this->afterSortableUpdate);
				} else {
					$afterSortableUpdate = $this->afterSortableUpdate;
				}
			}

			$this->selectableRows = 1;
			$cs->registerCoreScript('jquery.ui');
            Booster::getBooster()->registerAssetJs('jquery.sortable.gridview.js');

			if ($this->sortableAjaxSave && $this->sortableAction !== null) {
				$sortableAction = Yii::app()->createUrl(
					$this->sortableAction,
					array('sortableAttribute' => $this->sortableAttribute)
				);
			} else {
				$sortableAction = '';
			}

			$afterSortableUpdate = CJavaScript::encode($afterSortableUpdate);
			if (Yii::app()->request->enableCsrfValidation)
			{
				$csrfTokenName = Yii::app()->request->csrfTokenName;
				$csrfToken = Yii::app()->request->csrfToken;
				$csrf = "{'$csrfTokenName':'$csrfToken' }";
			} else
				$csrf = '{}';

			$this->componentsReadyScripts[] = "$.fn.yiiGridView.sortable('{$this->id}', '{$sortableAction}', {$afterSortableUpdate}, $csrf);";
			$this->componentsAfterAjaxUpdate[] = "$.fn.yiiGridView.sortable('{$this->id}', '{$sortableAction}', {$afterSortableUpdate}, $csrf);";
		}

		if ($this->selectableCells) {
			$afterSelectableCells = '';
			if ($this->afterSelectableCells !== null) {
				if (!($this->afterSelectableCells instanceof CJavaScriptExpression) && strpos($this->afterSelectableCells,'js:') !== 0) {
					$afterSelectableCells = new CJavaScriptExpression($this->afterSelectableCells);
				} else {
					$afterSelectableCells = $this->afterSelectableCells;
				}
			}
			$cs->registerCoreScript('jquery.ui');
            Booster::getBooster()->registerAssetJs('jquery.selectable.gridview.js');
			$afterSelectableCells = CJavaScript::encode($afterSelectableCells);
			$this->componentsReadyScripts[] = "$.fn.yiiGridView.selectable('{$this->id}','{$this->selectableCellsFilter}',{$afterSelectableCells});";
			$this->componentsAfterAjaxUpdate[] = "$.fn.yiiGridView.selectable('{$this->id}','{$this->selectableCellsFilter}', {$afterSelectableCells});";
		}

		$cs->registerScript(
			__CLASS__ . '#' . $this->id . 'Ex',
			'
			var $grid = $("#' . $this->id . '");
			' . $fixedHeaderJs . '
			if ($(".' . $this->extendedSummaryCssClass . '", $grid).length)
			{
				$(".' . $this->extendedSummaryCssClass . '", $grid).html($("#' . $this->id . '-extended-summary", $grid).html());
			}
			' . (count($this->componentsReadyScripts) ? implode(PHP_EOL, $this->componentsReadyScripts) : '') . '
			$.ajaxPrefilter(function (options, originalOptions, jqXHR) {
				var qs = $.deparam.querystring(options.url);
				if (qs.hasOwnProperty("ajax") && qs.ajax == "' . $this->id . '")
				{
				    if (typeof (options.realsuccess) == "undefined" || options.realsuccess !== options.success)
				    {
                        options.realsuccess = options.success;
                        options.success = function(data)
                        {
                            if (options.realsuccess) {
                                options.realsuccess(data);
                                var $data = $("<div>" + data + "</div>");
                                // we need to get the grid again... as it has been updated
                                if ($(".' . $this->extendedSummaryCssClass . '", $("#' . $this->id . '")))
                                {
                                    $(".' . $this->extendedSummaryCssClass . '", $("#' . $this->id . '")).html($("#' . $this->id . '-extended-summary", $data).html());
                                }
                                ' . (count($this->componentsAfterAjaxUpdate) ? implode(
                    PHP_EOL,
                    $this->componentsAfterAjaxUpdate
                ) : '') . '
                            }
                        }
				    }
				}
			});'
		);
	}
558756
public function getScriptsContent(): string
    {
        $content = '';
        if(isset($this->scripts))
            foreach($this->scripts as $script)
                if(isset($script['content']))
                    $content .= $script['content'];

        return $content;
    }
1074050
public function getScript() : ?string 
    {
        if ( ! $this->hasScript()) {
            $this->setScript($this->getDefaultScript());
        }
        return $this->script;
    }
966869
protected static function getCurrentScriptName()
    {
        $url = '';
        if (!empty($_SERVER['PATH_INFO'])) {
            $url = $_SERVER['PATH_INFO'];
        } else {
            if (!empty($_SERVER['REQUEST_URI'])) {
                if (($pos = strpos($_SERVER['REQUEST_URI'], '?')) !== false) {
                    $url = substr($_SERVER['REQUEST_URI'], 0, $pos);
                } else {
                    $url = $_SERVER['REQUEST_URI'];
                }
            }
        }
        if (empty($url)) {
            $url = $_SERVER['SCRIPT_NAME'];
        }

        if ($url[0] !== '/') {
            $url = '/' . $url;
        }

        return $url;
    }
1122299
@Override
  public X509Certificate getClientCertificate()
    throws CertificateException
  {
    X509Certificate []certs = getClientCertificates();

    if (certs == null || certs.length == 0)
      return null;
    else
      return certs[0];
  }