Add a CSS file to the registered assets.

@param  string           $name
@param  string           $source
@param  array            $dependencies
@param  array            $attributes
@return AssetContainer
437022
public function style($name, $source, $dependencies = array(), $attributes = array())
    {
        if ( ! array_key_exists('media', $attributes))
        {
            $attributes['media'] = 'all';
        }

        // Prepend path to theme.
        if ($this->isUsePath())
        {
            $source = $this->evaluatePath($this->getCurrentPath().$source);

            // Reset using path.
            $this->usePath(false);
        }

        $this->register('style', $name, $source, $dependencies, $attributes);

        return $this;
    }
562239
@Override
    public T add(NamedAsset namedAsset) {

        Validate.notNull(namedAsset, "No named asset was specified");

        return add(namedAsset, namedAsset.getName());

    }
241333
public function addContainer($name, $label = '', $attr = [])
    {
        $c = new Column\Container($name, $label, $attr);
        $this->addColumn($c);
        return $c;
    }
122033
public function addRss($name, $attributes = [])
    {
        $rssPath = $this->getAssetPath($name);

        if (isset($this->controller)) {
            $this->controller->addRss($rssPath, $attributes);
        }

        if (is_string($attributes)) {
            $attributes = ['build' => $attributes];
        }

        $rssPath = $this->getAssetScheme($rssPath);

        if (!in_array($rssPath, $this->assets['rss'])) {
            $this->assets['rss'][] = ['path' => $rssPath, 'attributes' => $attributes];
        }
    }
128062
public function addOption($name, array $attributes)
    {
        /**
         * @var Route $route
         */
        foreach ($this->routes as $route) {
            $route->addOption($name, $attributes);
        }
    }
1333011
public static function create($name, $attributes)
    {
        // Not supported is type=image, <button>, list, output, select-optgroup
        $types = [

            // Standard HTML 4.01
            'text'              => '\Anax\HTMLForm\FormElementText',
            'file'              => '\Anax\HTMLForm\FormElementFile',
            'password'          => '\Anax\HTMLForm\FormElementPassword',
            'hidden'            => '\Anax\HTMLForm\FormElementHidden',
            'textarea'          => '\Anax\HTMLForm\FormElementTextarea',
            'radio'             => '\Anax\HTMLForm\FormElementRadio',
            'checkbox'          => '\Anax\HTMLForm\FormElementCheckbox',
            'select'            => '\Anax\HTMLForm\FormElementSelect',
            'select-multiple'   => '\Anax\HTMLForm\FormElementSelectMultiple',
            'submit'            => '\Anax\HTMLForm\FormElementSubmit',
            'reset'             => '\Anax\HTMLForm\FormElementReset',
            'button'            => '\Anax\HTMLForm\FormElementButton',

            // HTML5
            'color'             => '\Anax\HTMLForm\FormElementColor',
            'date'              => '\Anax\HTMLForm\FormElementDate',
            'number'            => '\Anax\HTMLForm\FormElementNumber',
            'range'             => '\Anax\HTMLForm\FormElementRange',
            'tel'               => '\Anax\HTMLForm\FormElementTel',
            'email'             => '\Anax\HTMLForm\FormElementEmail',
            'url'               => '\Anax\HTMLForm\FormElementUrl',
            'search'            => '\Anax\HTMLForm\FormElementSearch',
            'file-multiple'     => '\Anax\HTMLForm\FormElementFileMultiple',
            'datetime'          => '\Anax\HTMLForm\FormElementDatetime',
            'datetime-local'    => '\Anax\HTMLForm\FormElementDatetimeLocal',
            'month'             => '\Anax\HTMLForm\FormElementMonth',
            'time'              => '\Anax\HTMLForm\FormElementTime',
            'week'              => '\Anax\HTMLForm\FormElementWeek',

            // Custom
            'search-widget'     => '\Anax\HTMLForm\FormElementSearchWidget',
            'checkbox-multiple' => '\Anax\HTMLForm\FormElementCheckboxMultiple',
            // Address
        ];

        // $attributes['type'] must contain a valid type creating an object
        // to succeed.
        $type = isset($attributes['type']) ? $attributes['type'] : null;
        if (!($type && isset($types[$type]))) {
            throw new Exception("Form element does not exists and can not be created: $name - $type");
        }
        return new $types[$type]($name, $attributes);
    }
188911
private function createPageCss(string $name, array $data, string $pathFile)
    {
        $minifier = new Minify\CSS("");

        if (!empty($this->param['css']) && is_array($this->param['css'])) {
            foreach ($this->param['css'] as $item) {
                $datum = array_values(array_filter(array_map(function ($d) use ($item) {
                    return $d['nome'] === $item ? $d : [];
                }, $data)));

                if (!empty($datum[0])) {
                    $datum = $datum[0];

                    if (!empty($datum['arquivos'])) {
                        foreach ($datum['arquivos'] as $file) {
                            if ($file['type'] === "text/css")
                                $minifier->add($file['content']);
                        }
                    }
                }
            }
        }

        if (file_exists(PATH_HOME . $pathFile . "assets/{$name}.css"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.css"));
        elseif (file_exists(PATH_HOME . $pathFile . "assets/{$name}.min.css"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.min.css"));

        $minifier->minify(PATH_HOME . "assetsPublic/view/{$name}.min.css");

        //Ajusta diretório dos assets
        $file = file_get_contents(PATH_HOME . "assetsPublic/view/{$name}.min.css");
        $file = str_replace("../", "", $file);
        $f = fopen(PATH_HOME . "assetsPublic/view/{$name}.min.css", "w");
        fwrite($f, $file);
        fclose($f);

    }
1008529
public function addStylesheet($name, $src, array $depends = array(), $version = false, $footer = false) {
			wp_enqueue_style($name, $src, $depends, $version, $footer);

			return $name;
		}
510921
public function add($name, $label = '', array $attributes = array(), array $rules = array())
	{
		return $this->fieldset()->add($name, $label, $attributes, $rules);
	}
883138
public function publish($name, $source)
	{
		$destination = $this->publishPath."/packages/{$name}";

		$success = $this->files->copyDirectory($source, $destination);

		if ( ! $success)
		{
			throw new \RuntimeException("Unable to publish assets.");
		}

		return $success;
	}
542139
public function getFilterByName($name, $attributes = [])
    {
        $filter = null;
        $name = str_replace('\\', DS, ucfirst($name)) . 'Filter.php';
        $file = $this->loader->findFirst($this->application->config('directory.filter') . DS . $name);
        if ($file) {
            $class = $file->getClassName();
            $filter = new $class();
        }

        // not found.
        if (! $filter) {
            throw new Exception\NotFoundException('No such filter. -> ' . $name);
        }
        
        $filter->setAttributes($attributes);
        $filter->setContainer($this->container);
        $this->container->injectDependency($filter);
        return $filter;
    }
1083240
public function css($name, $attributes = [])
    {
        $this->getLayout()->css($name, $attributes)->attachTo($this);
        return $this;
    }
230636
public function addAsset($type, $assetName, $fileName, $dependencies = array())
    {
        if (!isset($this->assets[$type]) || !is_array($this->assets[$type])) {
            $this->assets[$type] = array();
        }
        
        $asset = new Asset(
            $type,
            $assetName,
            $this->buildSourceFilePath($fileName),
            $dependencies
        );
        
        $this->assets[$type][$assetName] = $asset;
        $this->saveAssets();
    }
876057
public function add($element, $dependencies = array())
    {
        // Add
        $this->elements[$element] = (object)array(
            'id' => $element,
            'dependencies' => (array)$dependencies,
            'visited' => false
        );
    }
1121841
protected function createMenuItem($name, $attributes)
    {
        $icon = array_get($attributes, 'attributes.data-icon', '');
        return new Fluent([
            "icon"   => starts_with($icon, 'zmdi') ? $icon : 'zmdi-' . $icon,
            "link"   => array_get($attributes, 'url'),
            "title"  => array_get($attributes, 'title'),
            "id"     => $name,
            "childs" => []
        ]);
    }
1326717
public function add($name, $dependencyUnit, $arguments = array()) {
        if (is_object($dependencyUnit)) {
            $dependencyClass = get_class($dependencyUnit);
        } else {
            $dependencyClass = $dependencyUnit;
        }
        if (!is_array($arguments)) $arguments = array('arguments' => $arguments);

        $this->_dependencies[$name] = array_merge($arguments, array(
            'className' => $dependencyClass,
            'object'    => !empty($arguments['object']) ? $arguments['object'] : null
        ));
    }
1328465
public function script(
        $name,
        string $source,
        $dependencies = [],
        $attributes = [],
        $replaces = []
    ) {
        $this->register('script', $name, $source, $dependencies, $attributes, $replaces);

        return $this;
    }