Render style information

@param 	string	The style information
@param 	boolean	True, if the style information is a URL
@param 	array	Associative array of attributes
@return string
166969
protected function _renderStyle($style, $link, $attribs = array())
    {
        $attribs = AnHelperArray::toString($attribs);

        if (!$link) {
            $html  = '<style type="text/css" '.$attribs.'>'."\n";
            $html .= trim($style['data']);
            $html .= '</style>'."\n";
        } else {
            $html = '<link type="text/css" rel="stylesheet" href="'.$style.'" '.$attribs.' />'."\n";
        }

        return $html;
    }
720999
public function render($echo = false)
    {
        $name = $this->field->getName();
        $display = $this->field->getDisplayName();
        $bean = $this->field->getBean();
        $valueList = $this->getValue();

        $readOnly = $this->getDisabledString();
        $required = $this->getRequiredString();

        $html = <<<TAG
<label for="field-$name" >$display</label>
TAG;

        $html .= <<<TAG
       <div class="form-group checkboxes-group">
TAG;

        foreach ($this->options as $v =>$optionName) {

            if (isset($valueList[$v])) {
                $selected  = "checked";
            } else {
                $selected = "";
            }

            $nameAttr = 'name="'. $name .'[]"';

            $html  .= <<< HTML
                <div class="checkbox">
                    <label>
                        <input type="checkbox" value="$v" $nameAttr $required $readOnly $selected /> $optionName
                    </label>
                </div>
HTML;
        }

        $html .= " </div><br />";

        if ($echo)
            echo $html;

        return $html;
    }
1058017
function renderNext($tag = '&gt;&gt;') {
        if ($this->total_rows == 0)
            return FALSE;
         
        if ($this->page < $this->max_pages) {
            //return '<a href="' . $this->php_self . '?page=' . ($this->page + 1) . '&' . $this->append . '" title=\'next to\'>' . $tag . '</a>';
            $pageno = $this->page + 1;
            return " <a href='javascript:void(0);' OnClick='getdata( $pageno )' title='Próxima'>$tag</a> ";
        } else {
            return $tag;
        }
    }
1231699
public static function renderAttributes($attributes)
    {
        $attributes = self::mergeAttributes($attributes);

        $html = '';
        foreach ($attributes as $key => $value) {
            $html .= " {$key}=\"{$value}\"";
        }

        return new HtmlString(trim($html));
    }
1172735
public function render($round = false, $sort = null, $html = false)
    {
        $output = [];

        foreach ($this->getResults($sort) as $name => $result) {
            $output[] = $this->renderOne($name, $round);
        }

        $separator = $html ? "<br />\n" : "\n";

        return implode($output, $separator);
    }
187032
public function render($force = false) {

		if(empty($this->html) || $force) {

            if($this->template) {

                parent::render();

            }

            else {

                $name = $this->parentElement->getName();
                $value = $this->getValue();

                if($this->selected) {
                    $this->attributes['checked'] = 'checked';
                }
                else {
                    unset($this->attributes['checked']);
                }

                if(!isset($this->attributes['id'])) {
                    $formId = $this->parentElement->getForm()->getAttribute('id');
                    $this->attributes['id'] = ($formId ? ($formId . '_') : '') . $name . '_' . $value;
                }

                $this->attributes['value'] = $this->getValue();
                $this->attributes['name'] = $this->parentElement->getName();

                $attr = [];

                foreach($this->attributes as $k => $v) {
                    $attr[] = sprintf('%s="%s"', $k, $v);
                }

                $this->html = sprintf(
                    '<input type="radio" %s>',
                    implode(' ', $attr)
                );

                if($this->label) {
                    $this->html .= $this->label->setAttribute('for', $this->attributes['id'])->render();
                }

            }

		}

		return $this->html;

	}
756294
public function src($url, $render = false, array $attrs = array()) {
        return $this->_storeOrRender(
            'src',
            array(
                'value' => $url,
                'render' => $render,
                'attrs' => $attrs
            )
        );
    }
654857
public function style($href, $version=false) {

        $list = [];

        foreach((array)$href as $style) {

            $type = 'text/css';
            $rel  = 'stylesheet';
            $src  = $style;

            if (is_array($style)) {
                extract($style);
            }

            $ispath = strpos($src, ':') !== false && !preg_match('#^(|http\:|https\:)//#', $src);
            $list[] = '<link href="'.($ispath ? $this->pathToUrl($src):$src).($version ? "?ver={$version}":"").'" type="'.$type.'" rel="'.$rel.'">';
        }

        return implode("\n", $list);
    }
50784
function css($flush = true) {
        $css = $this->_css;
        if ($flush) $this->_css = [];
        $html = '';
        foreach ($css as $url => $inc) {
            $html .= '<link rel="stylesheet" href="'.$url.'">'.PHP_EOL;
        }
        if (!empty($this->_styles)) {
            $styles = $this->_styles;
            if ($flush) $this->_styles = [];
            $html .= '<style>'.PHP_EOL;
            foreach ($styles as $selector => $style)
            {
                if ($selector) {
                    $html .= $selector . ' { ' . $style . ' }' . PHP_EOL;
                } else {
                    $html .= $style;
                }
            }
            $html .= '</style>';
        }
        return $html;
    }
156100
public function render($raw = false)
	{
		// no links if we only have one page
		if ($this->config['total_pages'] == 1)
		{
			return $raw ? array() : '';
		}

		$this->raw_results = array();

		$html = str_replace(
			'{pagination}',
			$this->first().$this->previous().$this->pages_render().$this->next().$this->last(),
			$this->template['wrapper']
		);

		return $raw ? $this->raw_results : $html;
	}
1130228
public function render($caching = false, $params = array())
	{
		$this->_caching = $caching;

		if (!empty($this->_template))
		{
			$data = $this->_renderTemplate();
		}
		else
		{
			$this->parse($params);
			$data = $this->_renderTemplate();
		}

		parent::render();
		return $data;
	}
626475
public function style($style)
    {
        if (is_array($style)) {
            $style = implode('', array_map(function ($key, $val) {
                return "$key:$val";
            }, array_keys($style), array_values($style)));
        }

        if (is_string($style)) {
            $this->attributes['style'] = $style;
        }
    }
237313
protected function _render($nav) {
		extract($nav);
		$items = Navigation::order(Navigation::items($path));

		if (empty($items)) {
			return false;
		}

		$defaults = array($this->_tag => array(), $this->_tags[$this->_tag] => array(), 'a' => array());
		$list = array();

		foreach ($items as $key => $options) {
			$title = Inflector::humanize($key);
			extract($options);
			$htmlAttributes = Hash::merge($defaults, $htmlAttributes);

			Reveal::addRule('Page.current', array('self', '__isPageCurrent'), Router::normalize($url));
			if (Reveal::is('Page.current')) {
				$class = 'active';
				if (!empty($htmlAttributes[$this->_tags[$this->_tag]]['class'])) {
					$class = $htmlAttributes[$this->_tags[$this->_tag]]['class'] . ' ' . $class;
				}
				$htmlAttributes = Hash::merge($htmlAttributes, array($this->_tags[$this->_tag] => compact('class')));
			}

			if (method_exists($this->Html, 'icon') && !empty($icon) && count(explode(' ', $icon)) == 1) {
				$icon = $this->Html->icon($icon);
			}

			$title = $icon . $title;

			// Link-ify item's title when it does not match the current page.
			if (!empty($url)) {
				// Allow for link tag customization using `HtmlHelper::loadConfig()`.
				$configPath = dirname(__FILE__) . DS . 'Navigation' . DS;
				$reset = false;

				if (!empty($htmlAttributes['a']['tag'])) {
					$this->Html->loadConfig($htmlAttributes['a']['tag'], $configPath);
					$reset = true;
					unset($htmlAttributes['a']['tag']);
				}

				if (isset($url['prefix']) && false === $url['prefix'] && !empty($this->_View->request->prefix)) {
					$url[$this->_View->request->prefix] = false;
				}

				if (is_array($url) && !isset($url['plugin'])) {
					$url['plugin'] = null;
				}

				$title = $this->Html->link($title, $url, $htmlAttributes['a'], $confirmMessage);
				$reset && $this->Html->loadConfig('reset', $configPath);
			}

			if (!empty($children)) {
				// if (!)$title = $this->Html->tag('span', $title, array('class' => 'title'));
				$title .= $this->_render(array('path' => "$path.$key.children", 'attrs' => $htmlAttributes[$this->_tag]));
			}
			$list[] = $this->Html->tag($this->_tags[$this->_tag], $title, $htmlAttributes[$this->_tags[$this->_tag]]);
		}

		return $this->Html->tag($this->_tag, implode('', $list), $attrs);
	}
1269597
public function assetsinfoAllActivity():Renderer
    {
        /**
         * 0 : AppName
         * 1 : Have assets (1 ==> contains assets, 0 ==> not exist,  2 ==> Empty)
         * 3 : Perms on Dev
         * 4 : Perms on Prod
         * 5 : Status dev (0==> "Need to publish (redColor)", 1==> "OK (Green Color)")
         * 6 : Status prod (0==> "Need to publish (redColor)", 1==> "OK (Green Color)")
         * 7 : Action (Modal with url clear prod and dev , url publish prod and dev)
         */

        $appm = $this->getMaster("Apps");
        $apps = $appm->getAllApps();
        $diff = new Diff();
        $assetsapp = array();
        foreach ($apps as $app => $val) {
            $appname = $val->name;
            $app_assets = FEnv::get("framework.root") . "apps/" . ($appname) . "/Front/Resources/";
            $app_webassets_dev = FEnv::get("framework.root") . "public/components/apps/dev/" . strtolower($appname);
            $app_webassets_prod = FEnv::get("framework.root") . "public/components/apps/prod/" . strtolower($appname);

            $hassets = 0;
            $prod_hassets = 0;
            $dev_hassets = 0;

            if (is_dir($app_assets)) {
                $hassets++;
            }
            if (is_dir($app_webassets_dev)) {
                $dev_hassets++;
            }
            if (is_dir($app_webassets_prod)) {
                $prod_hassets++;
            }
            if ($hassets == 1 && $this->dirIsEmpty($app_assets)) {
                $hassets = 2;
            }


            $perm_dev =
                ($dev_hassets == 1)? substr(sprintf('%o', fileperms($app_webassets_dev)), -4) : 0000;
            $perm_prod =
                ($prod_hassets == 1)? substr(sprintf('%o', fileperms($app_webassets_prod)), -4) : 0000;

            $clear_dev = $this->generateRoute(
                "iumio_manager_assets_manager_clear",
                array("appname" => $appname, "env" => "dev"),
                null,
                true
            );
            $publish_dev = $this->generateRoute(
                "iumio_manager_assets_manager_publish",
                array("appname" => $appname, "env" => "dev"),
                null,
                true
            );
            ;
            $clear_prod = $this->generateRoute(
                "iumio_manager_assets_manager_clear",
                array("appname" => $appname, "env" => "prod"),
                null,
                true
            );
            ;
            $publish_prod = $this->generateRoute(
                "iumio_manager_assets_manager_publish",
                array("appname" => $appname, "env" => "prod"),
                null,
                true
            );

            $clear_all = $this->generateRoute(
                "iumio_manager_assets_manager_clear",
                array("appname" => $appname, "env" => "all"),
                null,
                true
            );
            ;
            $publish_all = $this->generateRoute(
                "iumio_manager_assets_manager_publish",
                array("appname" => $appname, "env" => "all"),
                null,
                true
            );

            $status_dev = 1;
            $status_prod = 1;


            if ($hassets == 1) {
                $webapp = ($this->recursiveScandir($app_assets));

                foreach ($webapp as $key => $value) {
                    $webapp[$key] = str_replace(FEnv::get("framework.root") . "apps/" . ($appname) .
                        "/Front/Resources/", "", $value);
                }
            }

            //// DEV ///

            if ($dev_hassets == 1 && $hassets == 1) {
                $webdev = ($this->recursiveScandir($app_webassets_dev));

                foreach ($webdev as $key => $value) {
                    $webdev[$key] = str_replace(FEnv::get("framework.root") . "public/components/apps/dev/" .
                        strtolower($appname), "", $value);
                }

                if (count(array_diff($webapp, $webdev)) > 0) {
                    $status_dev = 0;
                }

                if ($dev_hassets == 1 && $status_dev == 1 && $hassets == 1) {
                    for ($i = 0; $i < count($webapp); $i++) {
                        if (!file_exists(FEnv::get("framework.root") .
                            "public/components/apps/dev/" . strtolower($appname) .
                            "/" . $webdev[$i])) {
                            $status_dev = 0;
                            break;
                        }
                        $def = $diff::compareFiles(FEnv::get("framework.root") .
                            "public/components/apps/dev/" . strtolower($appname) .
                            "/" . $webdev[$i], FEnv::get("framework.root") .
                            "apps/" . ($appname) . "/Front/Resources/" . $webapp[$i]);
                        for ($u = 0; $u < count($def); $u++) {
                            if ($def[$u][1] > 0) {
                                $status_dev = 0;
                                break;
                            }
                        }
                        if ($status_dev == 0) {
                            break;
                        }
                    }
                }
            } else {
                $status_dev = 0;
            }

            /// END ///


            //// PROD ///

            if ($prod_hassets == 1 &&  $hassets == 1) {
                $webprod = ($this->recursiveScandir($app_webassets_prod));

                foreach ($webprod as $key => $value) {
                    $webprod[$key] = str_replace(FEnv::get("framework.root") .
                        "public/components/apps/prod/" . strtolower($appname), "", $value);
                }

                if (count(array_diff($webapp, $webprod)) > 0) {
                    $status_prod = 0;
                }

                if ($prod_hassets == 1 && $status_prod == 1) {
                    for ($i = 0; $i < count($webapp); $i++) {
                        if (!file_exists(FEnv::get("framework.root") . "public/components/apps/prod/" .
                            strtolower($appname) . "/" . $webprod[$i])) {
                            $status_dev = 0;
                            break;
                        }
                        $def = $diff::compareFiles(FEnv::get("framework.root") .
                            "public/components/apps/prod/" . strtolower($appname) .
                            "/" . $webprod[$i], FEnv::get("framework.root") . "apps/" .
                            ($appname) . "/Front/Resources/" . $webprod[$i]);
                        for ($u = 0; $u < count($def); $u++) {
                            if ($def[$u][1] > 0) {
                                $status_prod = 0;
                                break;
                            }
                        }
                        if ($status_prod == 0) {
                            break;
                        }
                    }
                }
            } else {
                $status_prod = 0;
            }

            /// END ///
            ///
            array_push(
                $assetsapp,
                array("name" => $appname,
                    "haveassets" => $hassets,
                    "dev_perms" => $perm_dev,
                    "prod_perms" => $perm_prod,
                    "status_dev" => $status_dev,
                    "status_prod" => $status_prod,
                    "clear" => array("dev" => $clear_dev, "prod" => $clear_prod, "all" => $clear_all),
                    "publish" => array("dev" => $publish_dev, "prod" => $publish_prod, "all" => $publish_all)
                )
            );
        }

        return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK", "results" => $assetsapp)));
    }
1250129
public static function style($file, array $attributes = NULL, $protocol = NULL, $index = FALSE)
    {
        if (strpos($file, '://') === FALSE)
        {
            // Add the base URL
            $file = Ioc::url($file);
        }
    
        // Set the stylesheet link
        $attributes['href'] = $file;
    
        // Set the stylesheet rel
        $attributes['rel'] = 'stylesheet';
    
        // Set the stylesheet type
        $attributes['type'] = 'text/css';
        
        return '<link' . self::attributes($attributes) .' />';
    }
930045
static public function renderLinkCSSTag(array $node) {
		if (isset($node['@attrib']))
			// detect stylesheet link tags
			if ((isset($node['@attrib']['type']) &&
				$node['@attrib']['type'] == 'text/css') ||
				(isset($node['@attrib']['rel']) &&
					$node['@attrib']['rel'] == 'stylesheet')) {
				$node['@attrib']['type']='css';
				return static::renderAssetTag($node);
			} else {
				// skip other other <link> nodes and render them directly
				$as=\Assets::instance();
				$params = '';
				if (isset($node['@attrib'])) {
					$params = $as->resolveAttr($node['@attrib']);
					unset($node['@attrib']);
				}
				return "\t".'<link'.$params.' />';
			}
	}
509899
public function render($cache = false, $params = array())
	{
		// Get the feed type
		$type = \Request::getCmd('type', 'Rss');

		// Instantiate feed renderer and set the mime encoding
		$renderer = $this->loadRenderer(($type) ? $type : 'rss');

		if (!($renderer instanceof Renderer))
		{
			\App::abort(404, \Lang::txt('Resource Not Found'));
		}

		$this->setMimeEncoding($renderer->getContentType());

		// output
		// Generate prolog
		$data  = '<?xml version="1.0" encoding="' . $this->_charset . '"?>' . "\n";
		$data .= '<!-- generator="' . $this->getGenerator() . '" -->' . "\n";

		// Generate stylesheet links
		foreach ($this->_styleSheets as $src => $attr)
		{
			$data .= '<?xml-stylesheet href="' . $src . '" type="' . $attr['mime'] . '"?>' . "\n";
		}

		// Render the feed
		$data .= $renderer->render();

		parent::render();

		return $data;
	}