get form_token html
@param  string $name
@param  array  $data
@return string
351745
static public function token($name=null, $data=null)
    {
        if (!is_null($name) && is_null($data) && (is_numeric($name) || is_array($name) || $name=='')) {
            $data = $name;
            $name = null;
        }
        
        return (new FormToken())->form($name, $data);
    }
924171
public function render($name, array $data = [])
    {
        $content = $this->partial($name, $data);

        if (isset($this->layout)) {
            $template = new PhpTemplate($this->manager);
            $template->sections['content'] = $content;
            return $template->render($this->layout, array_merge($data, $this->layoutData));
        }
        
        return $content;
    }
891675
protected function getAttribute($name)
    {
        if (isset($this->data[$name])) {
            return $this->data[$name];
        }

        return null;
    }
350381
public static function buildHtmlElement($name, array $attributes = [], $content = null, $closeEmptyTag = true, array $cssClasses = []): string
    {
        $html = '<' . $name . self::buildAttrs($attributes, $cssClasses);
        if ($content !== null) {
            $html .= '>' . $content . '</' . $name . '>';
        } else {
            $html .= $closeEmptyTag ? ' />' : '>';
        }
        return $html;
    }
1254583
public static function make($name, $data = []): string
    {
        $view = new static($name, $data);

        DebugBar::addView($name, $data);

        return $view->render();
    }
86240
public function anonymousEvent($name, $data)
    {
        $body = array_merge( array('name' => $name), $this->parseData($data) );

        try {
            $response = $this->client->post('/api/v1/events', array(
                'auth' => $this->auth,
                'json' => $body,
            ));
        } catch (BadResponseException $e) {
            $response = $e->getResponse();
        } catch (RequestException $e) {
            return new Response($e->getCode(), $e->getMessage());
        }

        return new Response($response->getStatusCode(), $response->getReasonPhrase());
    }
545673
public function createTemplate(array $data, $name = 'cookiebar')
    {
        $template = new FrontendTemplate($name);
        $this->setBasicData($template, $data);
        $this->setMoreLinkData($template, $data);
        $this->setAnalyticsCheckboxData($template, $data);

        // Cookie name
        $template->cookie = sprintf('COOKIEBAR_%s', $data['id']);

        return $template;
    }
171903
public function getHtml(string $name, string $default = '') : string
    {
        $contentArea = $this->content->getHtml($name);

        return $contentArea ? $contentArea->html->asString() : $default;
    }
1311643
protected function view($name, array $data = [])
    {
        $this->viewExistsOrFail($name);

        $this->data = array_merge($this->data, $data);

        $this->beforeViewRender();
        $view = $this->renderView($name);
        $this->afterViewRender();

        return $view;
    }
72316
protected function getHtml( $name )
	{
		$context = $this->getContext();
		$cache = $context->getCache();
		$key = md5( $name . 'product:detail-seen' );

		if( ( $html = $cache->get( $key ) ) === null )
		{
			$expire = null;
			$tags = [];
			$view = $this->getView();
			$config = $context->getConfig();

			$default = array( 'media', 'price', 'text' );
			$domains = $config->get( 'client/html/catalog/domains', $default );

			/** client/html/catalog/detail/seen/domains
			 * A list of domain names whose items should be available in the last seen view template for the product
			 *
			 * The templates rendering product details usually add the images,
			 * prices and texts, etc. associated to the product
			 * item. If you want to display additional or less content, you can
			 * configure your own list of domains (attribute, media, price, product,
			 * text, etc. are domains) whose items are fetched from the storage.
			 * Please keep in mind that the more domains you add to the configuration,
			 * the more time is required for fetching the content!
			 *
			 * @param array List of domain names
			 * @since 2014.07
			 * @category Developer
			 * @see client/html/catalog/domains
			 * @see client/html/catalog/lists/domains
			 * @see client/html/catalog/detail/domains
			 */
			$domains = $config->get( 'client/html/catalog/detail/seen/domains', $domains );

			$cntl = \Aimeos\Controller\Frontend::create( $context, 'product' );
			$view->seenProductItem = $cntl->uses( $domains )->resolve( $name );
			$this->addMetaItems( $view->seenProductItem, $expire, $tags );

			$output = '';
			foreach( $this->getSubClients() as $subclient ) {
				$output .= $subclient->setView( $view )->getBody( '', $tags, $expire );
			}
			$view->seenBody = $output;

			/** client/html/catalog/detail/seen/standard/template-body
			 * Relative path to the HTML body template of the catalog detail seen client.
			 *
			 * The template file contains the HTML code and processing instructions
			 * to generate the result shown in the body of the frontend. The
			 * configuration string is the path to the template file relative
			 * to the templates directory (usually in client/html/templates).
			 *
			 * You can overwrite the template file configuration in extensions and
			 * provide alternative templates. These alternative templates should be
			 * named like the default one but with the string "standard" replaced by
			 * an unique name. You may use the name of your project for this. If
			 * you've implemented an alternative client class as well, "standard"
			 * should be replaced by the name of the new class.
			 *
			 * @param string Relative path to the template creating code for the HTML page body
			 * @since 2014.03
			 * @category Developer
			 * @see client/html/catalog/detail/seen/standard/template-header
			 */
			$tplconf = 'client/html/catalog/detail/seen/standard/template-body';
			$default = 'catalog/detail/seen-partial-standard';

			$html = $view->render( $view->config( $tplconf, $default ) );

			$cache->set( $key, $html, $expire, $tags );
		}

		return $html;
	}
895703
public function outputJavascriptGlobal(string $name, array $data)
    {
        $output = "<script type=\"text/javascript\">\n\r";
        $output .= "/* <![CDATA[ */\n\r";
        $output .= "var {$name} = {\n\r";

        if (! empty($data) && is_array($data)) {
            foreach ($data as $key => $value) {
                $output .= $key.': '.json_encode($value).",\n\r";
            }
        }

        $output .= "};\n\r";
        $output .= "/* ]]> */\n\r";
        $output .= '</script>';

        return $output;
    }
1105939
protected function _getTemplateName($name, array &$data = []) {
        if (isset($this->_callbacks[$name])) {
            $data = call_user_func($this->_callbacks[$name], $data);
        }
        if ($this->_callback) {
            $data = call_user_func($this->_callback, $name, $data);
        }
        if (isset($data['templateName'])) {
            $name = $data['templateName'];
            unset($data['templateName']);
        }
        return $name;
    }
759284
public function required($name, $data = null)
	{
		if (null === $data)
		{
			return isset($this->data[$name]);
		}
		else
		{
			return isset($data[$name]);
		}
	}
1048573
public function renderIfPjax($name = null, $data = null, $layout_callback = null) {
        if (is_array($name)) {
            list($data, $layout_callback, $name) = [$name, $data, null];
        }
        if (empty($data)) {
            $data = [];
        }
        if (!app('request')->isPjax() && is_callable($layout_callback)) {
            $data = array_merge($data, call_user_func($layout_callback));
        }
        return $this->show($name, $data);
    }
524477
function GetHtmlAttribute($name)
        {
            if (isset($this->attributes[$name]))
                    return $this->attributes[$name];
            
            return null;
        }
573223
public function partial($name, array $data = [])
    {
        $file = $this->_getLayoutPartialPath($name);

        if (FS::isFile($file)) {
            return $this->_render($file, $data);
        }

        return null;
    }
529238
public function getAttribute($name)
    {
        return array_key_exists($name, $this->data['data']) ? $this->data['data'][$name] : null;
    }