@param string $name
@param string $imageHtmlTemplate

@return string
15791
public function getEmojiImageByUnicode($unicode, $imageHtmlTemplate = null)
    {
        $emoji = $this->index->findByUnicode($unicode);

        return $this->renderTemplate($emoji, $imageHtmlTemplate);
    }
1156422
public static function getByName(string $name): QuoteTemplateCollection
    {
        $invoiceTemplates = QuoteTemplate::get()->where("name", $name);

        return new QuoteTemplateCollection($invoiceTemplates->elements());
    }
788074
public function getTemplate($name)
    {
        if ($name === 'edit' && is_null($this->getSubject()->getId()) && !$this->request->get('pcode')) {
            $provider = $this->pool->getProvider($this->request->get('provider'));
            if ($provider instanceof FileProvider) {
                return '@NetworkingInitCms/MediaAdmin/multifileupload_jquery.html.twig';
            }
        }

        return $this->getTemplateRegistry()->getTemplate($name);
    }
856861
public static function getPluginByName($name) {

		$db = Database::getInstance();
		$db->setQuery('SELECT * FROM `templates` WHERE name=?');
		$obj = $db->loadObject($name);
		return (is_a($obj, 'stdClass') ? new Template($obj) : NULL);
		
	}
230480
public function getTemplateLabel($name, $templateSetName)
    {
        if (
            isset($this->templateSet[$templateSetName]) &&
            isset($this->templateSet[$templateSetName]['templates']) &&
            isset($this->templateSet[$templateSetName]['templates'][$name])
        ) {
            return $this->templateSet[$templateSetName]['templates'][$name]['label'];
        }

        throw new NonExistingTemplateException();
    }
1000900
public function getAttribute($name): string
    {
        if ($this->attributes->length === 0) { // Performance optimization
            return '';
        }
        $value = parent::getAttribute($name);
        return $value !== '' ? (strstr($value, 'html5-dom-document-internal-entity') !== false ? $this->updateResult($value) : $value) : '';
    }
1284379
public function getTemplateAreas($name, $templateSetName)
    {
        if (
            isset($this->templateSet[$templateSetName]) &&
            isset($this->templateSet[$templateSetName]['templates']) &&
            isset($this->templateSet[$templateSetName]['templates'][$name])
        ) {
            return $this->templateSet[$templateSetName]['templates'][$name]['areas'];
        }

        throw new NonExistingTemplateException();
    }
1253495
public function getBlendableTemplate($name)
    {
        /** @var \LCI\Blend\Blendable\Template $template */
        $template = new Template($this->modx, $this->blender, $name);
        return $template->setSeedsDir($this->blender->getSeedsDir());
    }
1152927
private function templateFile($name)
    {
        $filename = $this->viewPath . '/' . str_replace('.', DIRECTORY_SEPARATOR, $name) . '.blade.php';
        if (file_exists($filename)) {
            return $filename;
        }

        if (self::$manifest === null) {
            if (file_exists($this->pluginManifestOfViews)) {
                /** @noinspection PhpIncludeInspection */
                self::$manifest = include $this->pluginManifestOfViews;
            }
        }

        return isset(self::$manifest[$name]) ? base_path(self::$manifest[$name]) : null;
    }
904206
static function laraform($html, $name = null) {
        $el = new ElementStaticTwbs($name ? $name : uniqid());
        $el->setValue($html);

        return $el;
    }
1357068
public function getTemplate($domain, $name)
    {
        if (!isset($this->templates[$domain][$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Template with name "%s" in domain "%s" has not been registered',
                $name,
                $domain
            ));
        }

        return $this->templates[$domain][$name];
    }
892802
final public function printHtml($name) {
		
		// print standard ascii one or a predefined icon HTML as constant
		$printBoolean = function ($value) {
			if ($value) {
				print (defined('PAIR_CHECK_ICON') ? PAIR_CHECK_ICON : '<span style="color:green">√</span>');
			} else {
				print (defined('PAIR_TIMES_ICON') ? PAIR_TIMES_ICON : '<span style="color:red">×</span>');
			}
		};
		
		// print the class property in the proper way
		if (property_exists($this, $name)) {
		
			switch ($this->getPropertyType($name)) {
				
				case 'bool':
					$printBoolean($this->$name);
					break;
					
				case 'DateTime':
					print $this->formatDateTime($this->$name);
					break;
					
				case 'csv':
					print implode(', ', $this->$name);
					break;
					
				default:
					print htmlspecialchars($this->$name);
					break;
					
			}
			
		// name is a method with or without parentheses
		} else if ('()' == substr($name, -2) or method_exists($this, $name)) {
			
			$methodName = '()' == substr($name, -2) ? substr($name, 0, -2) : $name;
		
			if (!method_exists($this, $methodName)) {
				$this->addError('The ' . $methodName . '() method to printHtml was not found in the ' . get_called_class() . ' class');
				return;
			}
			
			// run the method
			$result = $this->$methodName();
			
			switch (gettype($result)) {
				
				case 'boolean':
					$printBoolean($result);
					break;

				case 'array':
					htmlspecialchars(implode(', ', $result));
					break;
					
				// integer, double, string, object, resource, NULL, unknown type
				default:
					print htmlspecialchars($result);
					break;
						
			}
			
		// property not found
		} else {
			
			$this->addError('You can not printHtml for the ' . $name . ' property of the class ' . get_called_class());
			
		}
			
	}
999585
public function loadTemplate($name)
    {
        $template = new Template();
        $template->app = $this;

        if (in_array($name[0], ['.', '/', '\\']) || strpos($name, ':\\') !== false) {
            return $template->load($name);
        } else {
            $dir = is_array($this->template_dir) ? $this->template_dir : [$this->template_dir];
            foreach ($dir as $td) {
                if ($t = $template->tryLoad($td.'/'.$name)) {
                    return $t;
                }
            }
        }

        throw new Exception(['Can not find template file', 'name'=>$name, 'template_dir'=>$this->template_dir]);
    }
382017
public function render(string $name, $params = []) : string
    {
        $params = $this->normalizeParams($params);
        return $this->template->make($name, $params)->render();
    }
239187
private function getRealName(string $name): string
    {
        if (mb_strpos($name, '@ngbm/') !== 0) {
            return $name;
        }

        if (!isset($this->templateMap[$name])) {
            $this->templateMap[$name] = str_replace(
                '@ngbm/',
                '@ngbm_' . $this->configuration->getParameter('design') . '/',
                $name
            );
        }

        return $this->templateMap[$name];
    }
1333489
protected function getTemplate($template, $name)
    {
        $this->template = $this->file->get($template);

        if ($this->needsScaffolding($template))
        {
            return $this->getScaffoldedTemplate($name);
        }

        // Otherwise, just set the file
        // contents to the file name
        return $name . PHP_EOL;
    }
1315791
public function getImageAltText(string $name, string $default = '') : string
    {
        $contentArea = $this->content->getImage($name);

        return ($contentArea ? $contentArea->altText : null) ?? $default;
    }