src/Ease/Html/HeadTag.php
public function draw()
    {
        if (isset($this->easeShared->cascadeStyles) && count($this->easeShared->cascadeStyles)) {
            $cascadeStyles = [];
            foreach ($this->easeShared->cascadeStyles as $StyleRes => $Style) {
                if ($StyleRes == $Style) {
                    $this->addItem('<link href="'.$Style.'" rel="stylesheet" type="text/css" media="'.'screen'.'" />');
                } else {
                    $cascadeStyles[] = $Style;
                }
            }
            $this->addItem(
                '<style>'.implode(
                    '
', $cascadeStyles
                ).'</style>'
            );
        }
        if (isset($this->easeShared->javaScripts) && count($this->easeShared->javaScripts)) {
            ksort($this->easeShared->javaScripts, SORT_NUMERIC);
            $ODRStack = [];
            foreach ($this->easeShared->javaScripts as $Script) {
                $ScriptType = $Script[0];
                $ScriptBody = substr($Script, 1);
                switch ($ScriptType) {
                    case '#':
                        $this->addItem(
                            '
'.'<script src="'.$ScriptBody.'"></script>'
                        );
                        break;
                    case '@':
                        $this->addItem(self::jsEnclosure($ScriptBody));
                        break;
                    case '$':
                        $ODRStack[] = $ScriptBody;
                        break;
                }
            }
            if (count($ODRStack)) {
                $this->addItem(
                    self::jsEnclosure(
                        '$(document).ready(function () { '.implode(
                            '
', $ODRStack
                        ).' });'
                    )
                );
            }
        }
        parent::draw();
    }
public function draw()
    {
        if (isset($this->easeShared->cascadeStyles) && count($this->easeShared->cascadeStyles)) {
            $cascadeStyles = [];
            foreach ($this->easeShared->cascadeStyles as $StyleRes => $Style) {
                if ($StyleRes == $Style) {
                    $this->addItem('<link href="'.$Style.'" rel="stylesheet" type="text/css" media="'.'screen'.'" />');
                } else {
                    $cascadeStyles[] = $Style;
                }
            }
            $this->addItem(
                '<style>'.implode(
                    '
', $cascadeStyles
                ).'</style>'
            );
        }
        if (isset($this->easeShared->javaScripts) && count($this->easeShared->javaScripts)) {
            ksort($this->easeShared->javaScripts, SORT_NUMERIC);
            $ODRStack = [];
            foreach ($this->easeShared->javaScripts as $Script) {
                $ScriptType = $Script[0];
                $ScriptBody = substr($Script, 1);
                switch ($ScriptType) {
                    case '#':
                        $this->addItem(
                            '
'.'<script src="'.$ScriptBody.'"></script>'
                        );
                        break;
                    case '@':
                        $this->addItem(self::jsEnclosure($ScriptBody));
                        break;
                    case '$':
                        $ODRStack[] = $ScriptBody;
                        break;
                }
            }
            if (count($ODRStack)) {
                $this->addItem(
                    self::jsEnclosure(
                        '$(document).ready(function () { '.implode(
                            '
', $ODRStack
                        ).' });'
                    )
                );
            }
        }
        parent::draw();
    }
Vykreslí hlavičku HTML stránky.