Add Css includes to the page

@param string $name
@param string $file
@param int $order
@param int $active
763529
public function addCss($name, $file, $order = 10, $active = 1)
    {
       $this->getResponse()
            ->getTheme()
            ->addCss($name, $file, $order,$active);
    }
1213787
public static function setStyleDefinition($name, TableStyle $style)
    {
        if (!self::$styles) {
            self::$styles = self::initStyles();
        }

        self::$styles[$name] = $style;
    }
286321
protected function doFilterFile($name /*, $file*/)
    {
        // check include ...
        if (\in_array($name, $this->include['file'], true)) {
            return true;
        }

        // check exclude file ...
        if (\in_array($name, $this->exclude['file'], true)) {
            return false;
        }

        $ext = implode('|', $this->getInclude('ext'));

        // check include ext ...
        if ($ext && preg_match("/\.($ext)$/i", $name)) {
            // have been set custom file Filter
            if ($fileFilter = $this->fileFilter) {
                return $fileFilter($name);
            }

            return true;
        }

        $noExt = implode('|', $this->getExclude('ext'));

        // check exclude ext ...
        if ($noExt && preg_match("/\.($noExt)$/i", $name)) {
            return false;
        }

        // have been set custom file Filter
        if ($fileFilter = $this->fileFilter) {
            return $fileFilter($name);
        }

        return true;
    }
211037
public function addFile($file, $name = 'attachment', $mime = Mime::TXT) {
        $this->_fileTransfert = 'multipart/mixed';
        $this->_hasAttachment = true;

        if (file_exists($file)) {
            $data = file_get_contents($file);

            if ($name == self::ATTACHMENT) {
                $name = $name . uniqid();
            }

            if (isset($this->_attachments[$name])) {
                $name = $name . uniqid();
            }

            $this->_attachments[$name] = [chunk_split(base64_encode($data), $mime)];
        }
    }
704855
public function addInstallScript($name, $file, $url)
    {
        $scriptElement = new InstallScript($name, $file, $url);
        return $this->addElement($scriptElement);
    }
532545
public function addCss($file, $path='/css', $attr = [])
    {
        $attr = array_merge(['rel' => 'stylesheet'], $attr);
        $output = [];
        foreach ($attr as $name => $value) {
            $output[] = "{$name}=\"{$value}\"";
        }
        $attr = implode(' ', $output);
        $file = str_replace('//', '', "{$path}/{$file}");
        return sprintf('<link href="%s" %s>', $file, $attr);
    }
178993
public function addAttachment($file, $name = false)
    {
        if (file_exists($file)) {
            $this->attachemnts[] = array(
                $file => $name
            );
        }
        
        return $this;
    }
166999
public function css($file, $media = null)
    {
        $file = ModuleResourceLoader::singleton()->resolvePath($file);

        $this->css[$file] = [
            "media" => $media
        ];
    }
887699
public function addHtml($menuName, $data, $displayedForCurrentUser, $order, $tooltip)
    {
        if ($displayedForCurrentUser) {
            if (!isset($this->menu[$menuName])) {
                $this->menu[$menuName]['_name'] = $menuName;
                $this->menu[$menuName]['_html'] = $data;
                $this->menu[$menuName]['_order'] = $order;
                $this->menu[$menuName]['_url'] = null;
                $this->menu[$menuName]['_icon'] = '';
                $this->menu[$menuName]['_hasSubmenu'] = false;
                $this->menu[$menuName]['_tooltip'] = $tooltip;
            }
        }
    }
557945
public function styleHistoryAction($name)
    {
        $em = $this->get('doctrine.orm.entity_manager');

        $histories = $em->getRepository(AppearanceHistory::class)->findBy([
            'path'       => '/Resources/public/css/',
            'filename'   => $name,
        ], ['created_at' => 'DESC']);

        return $this->render('@CMS/AdminAppearance/style_history.html.twig', [
            'name' => $name,
            'histories' => $histories,
        ]);
    }
155886
public function addInstallPack($name, $file, $url)
    {
        $packElement = new InstallPack($name, $file, $url);
        return $this->addElement($packElement);
    }
101889
public function addDirective($name, Aoe_ExtendedFilter_Model_Directive_Interface $handler)
    {
        $name = strtolower(trim($name));
        $this->directives[$name] = $handler;
        return $this;
    }
390368
public function uploadAssetFile(Locator $locator, $name, $file)
    {
        Validate::isString($name, 'name');
        Validate::notNull($file, 'file');

        $urlFile = $locator->getBaseUri().'/'.$name;
        $url = $urlFile.$locator->getContentAccessComponent();

        if (is_resource($file)) {
            $this->_uploadAssetFileFromResource($url, $file);
        } else {
            $this->_uploadAssetFileFromString($url, $file);
        }
    }
1237388
public function addStylesheet($file, $ext = '.css', $template = false)
    {
        if (strpos($file, 'http') === 0) {
            parent::addOnReady('$.atk4.includeCSS("'.$file.'")');

            return $this;
        }
        $url = $this->app->locateURL('css', $file.$ext);

        if (!$this->atk4_initialised || $template) {
            return parent::addStylesheet($file, $ext);
        }

        parent::addOnReady('$.atk4.includeCSS("'.$url.'")');
    }
811598
public function addStylesheet($file, $ext = '.css', $locate = 'css')
    {
        //$file = $this->app->locateURL('css', $file . $ext);
        if (@$this->included[$locate.'-'.$file.$ext]++) {
            return;
        }

        if (strpos($file, 'http') !== 0 && $file[0] != '/') {
            $url = $this->locateURL($locate, $file.$ext);
        } else {
            $url = $file;
        }

        $this->template->appendHTML(
            'js_include',
            '<link type="text/css" href="'.$url.'" rel="stylesheet" />'."\n"
        );

        return $this;
    }
1018840
protected function loadCss($file, array $properties = [])
    {
        if (!isset($this->loaded_css[$file])) {
            $this->loaded_css[$file] = true;

            $properties = array_merge($properties, [
                'rel' => 'stylesheet',
                'type' => 'text/css',
                'href' => $file,
            ]);

            echo $this->buildElement('link', $properties);
        }
    }
830277
public function index($name, $field, $order = null) {
        $this->index[$name] = [$field, $order];
        return $this;
    }