Umstellung auf static method
This commit is contained in:
parent
de73c3d2ec
commit
9f40e2f9d7
@ -36,12 +36,6 @@ namespace cgoIT\aeo;
|
|||||||
class AeoJavaScript
|
class AeoJavaScript
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* Current object instance (Singleton)
|
|
||||||
* @var Cache
|
|
||||||
*/
|
|
||||||
protected static $objInstance;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template
|
* Template
|
||||||
* @var string
|
* @var string
|
||||||
@ -59,7 +53,7 @@ class AeoJavaScript
|
|||||||
*/
|
*/
|
||||||
final private function __clone() {}
|
final private function __clone() {}
|
||||||
|
|
||||||
public function getContent($folder, $rot13 = true) {
|
public static function getContent($folder, $rot13 = true) {
|
||||||
$Template = new \FrontendTemplate(self::$strTemplate);
|
$Template = new \FrontendTemplate(self::$strTemplate);
|
||||||
$Template->rot13 = $rot13;
|
$Template->rot13 = $rot13;
|
||||||
$Template->folder = $folder;
|
$Template->folder = $folder;
|
||||||
@ -67,18 +61,6 @@ class AeoJavaScript
|
|||||||
$Template->tooltip_js_off = $GLOBALS['TL_LANG']['aeo']['tooltip_no_js'];
|
$Template->tooltip_js_off = $GLOBALS['TL_LANG']['aeo']['tooltip_no_js'];
|
||||||
return $Template->parse();
|
return $Template->parse();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiate a new cache object and return it (Factory)
|
|
||||||
* @return Cache
|
|
||||||
*/
|
|
||||||
public static function getInstance() {
|
|
||||||
if (!is_object(self::$objInstance)) {
|
|
||||||
self::$objInstance = new self();
|
|
||||||
}
|
|
||||||
|
|
||||||
return self::$objInstance;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -80,7 +80,6 @@ class AeoFrontendUtil extends \Frontend {
|
|||||||
protected $aeo;
|
protected $aeo;
|
||||||
|
|
||||||
protected $aeoUtil;
|
protected $aeoUtil;
|
||||||
protected $aeoJavaScript;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the object
|
* Initialize the object
|
||||||
@ -92,7 +91,6 @@ class AeoFrontendUtil extends \Frontend {
|
|||||||
if (TL_MODE == 'FE') {
|
if (TL_MODE == 'FE') {
|
||||||
global $objPage;
|
global $objPage;
|
||||||
$this->aeoUtil = new AeoUtil();
|
$this->aeoUtil = new AeoUtil();
|
||||||
$this->aeoJavaScript = AeoJavaScript::getInstance();
|
|
||||||
|
|
||||||
if ($GLOBALS['TL_CONFIG']['aeo_replace_standard_obfuscation'] === true) {
|
if ($GLOBALS['TL_CONFIG']['aeo_replace_standard_obfuscation'] === true) {
|
||||||
$this->use_rot_13 = $GLOBALS['TL_CONFIG']['aeo_use_rot_13'];
|
$this->use_rot_13 = $GLOBALS['TL_CONFIG']['aeo_use_rot_13'];
|
||||||
@ -498,7 +496,7 @@ class Aeo extends \System {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dropJS() {
|
function dropJS() {
|
||||||
$strContentJs = $this->aeoJavaScript->getContent(str_replace("/", "\/", $this->folder), $this->rot13);
|
$strContentJs = AeoJavaScript::getContent(str_replace("/", "\/", $this->folder), $this->rot13);
|
||||||
$strContentJs = "\n<script type=\"text/javascript\">\n$strContentJs\n</script>\n";
|
$strContentJs = "\n<script type=\"text/javascript\">\n$strContentJs\n</script>\n";
|
||||||
return $strContentJs;
|
return $strContentJs;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user