Displays a Bootstrap glyphicon.

@param string $name The name.
@return string Returns the Bootstrap glyphicon.
2096
protected function bootstrapGlyphicon($name, $style) {

        $attributes = [];

        $attributes["class"][]     = "glyphicon";
        $attributes["class"][]     = null !== $name ? "glyphicon-" . $name : null;
        $attributes["aria-hidden"] = "true";
        $attributes["style"]       = $style;

        return static::coreHTMLElement("span", null, $attributes);
    }
815978
public function bootstrapGlyphiconFunction(array $args = []) {
        return $this->bootstrapGlyphicon(ArrayHelper::get($args, "name", "home"), ArrayHelper::get($args, "style"));
    }
809415
public function draw($name)
    {
        $this->bstall->load($name);
        
        $pixels = Input::get('pixels');
        foreach($pixels as $p) {
            if(isset($p['x']) 
            && isset($p['y']) 
            && isset($p['c'])) {
                $this->bstall->write($p['x'], $p['y'], $p['c']);
            }
        }
        
        $this->bstall->save($name);

        return Response::json(["success" => true]);
    }
323458
public static function icon($name, $color = '')
		{
			if (is_bool($name))
			{
				$color = $name ? 'success' : 'danger';
				$name = $name ? 'check' : 'times';
			}
			$class = "icon fa fa-$name";
			$style = '';
			if (preg_match('/(info|success|warning|danger)/', $color))
			{
				$class .= ' text-' . $color;
			}
			else if ($color !== '')
			{
				$style = ' style="color:' .$color. '"';
			}
			return '<i class="' .$class. '" ' .$style. '></i>';
		}
324276
public static function getCustomInteractionByName($name){
        $all = self::getCustomInteractions();
        if(isset($all[$name])){
            return $all[$name];
        }
        return '';
    }
1177389
protected function _getCacheId($name)
    {
        $oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        return $name . '_' . $oConfig->getShopId() . '_' . Registry::getLang()->getBaseLanguage() . '_' . (int) $oConfig->getShopCurrency();
    }
556500
public function getFormCode($name)
	{
		$templates = $this->getTemplates();
		return $templates->get($name, $this->plugin->name);
	}
992486
public function getByName($name)
    {
        if (!isset($this->nameMap[$name])) {
            return null;
        }

        return $this->get($this->nameMap[$name]);
    }
262889
protected function getPath($name)
    {
        $name = isset($this->map[$name]) ? $this->map[$name] : $name;

        return "{$this->basePath}/{$name}.svg";
    }
504665
public function methodName(string $name): string
    {
        $name = strtolower($name);

        return $this->methodNames[$name] ?? '';
    }
887605
public static function attrNameToOID(string $name): string
    {
        // if already in OID form
        if (preg_match('/^[0-9]+(?:\.[0-9]+)*$/', $name)) {
            return $name;
        }
        $map = self::_oidReverseMap();
        $k = strtolower($name);
        if (!isset($map[$k])) {
            throw new \OutOfBoundsException("No OID for $name.");
        }
        return $map[$k];
    }
555303
public function getAnnotation($name)
    {
        $result = null;

        if ($this->hasAnnotationAndReturn($name))
        {
            if (!string_ends_with($name, 'Annotation')) $name .= 'Annotation';

            $result = isset($this->annotations[$name]) ? $this->annotations[$name] : null;

            if ($result == null)
            {
                if (string_starts_with($name, '\\'))
                    $name = substr($name, 1, strlen($name) - 1);
                else
                    $name = '\\' . $name;

                $result = isset($this->annotations[$name]) ? $this->annotations[$name] : null;
            }

            $result = $this->evaluateAnnotation($result);
        }

        return $result;
    }
255009
public static function getConstantByName($name)
    {
        switch (strtolower($name)) {
            case 'default':
                return self::DEF;
            break;

            case 'rect':
                return self::RECT;
            break;

            case 'circle':
                return self::CIRCLE;
            break;

            case 'poly':
                return self::POLY;
            break;

            case 'ellipse':
                return self::ELLIPSE;
            break;

            default:
                return false;
            break;
        }
    }
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,
        ]);
    }
131305
public static function resolve($name)
    {
        $logger     = $GLOBALS['logger'];
        $app        = $GLOBALS['app'];
        $staticPath = 'public';
        
        if ($app->getConfiguration()->isLocal()) {
            $staticPath = 'views';
        }

        $session    = $app->getSessionManager()->getActiveSession();
        $category   = $session->getAttribute('category');
        $basePath   = '/'.$staticPath.'/resources/'.$category;
        $commonPath = '/'.$staticPath.'/resources/common';

        $searchFolder = '.';
        
        $isUrl = false;

        if(preg_match('/.*\.js$/', $name)) {
            $searchFolder = 'scripts';
        } else if(preg_match('/.*\.css$/', $name)) {
            $searchFolder = 'styles';
        } else if(preg_match('/.*\.(?:jpg|jpeg|gif|png)$/', $name)) {
            $searchFolder = 'images';
        } else {
            $isUrl = true;
            $name  = DIRECTORY_SEPARATOR.$app->getConfiguration()->getApplicationContext().DIRECTORY_SEPARATOR.$name;
        }

        if ($isUrl) {
            return $name;
        }

        if (file_exists(getcwd().$basePath.'/'.$searchFolder.'/'.$name)) {
            return '/'.$app->getConfiguration()->getApplicationContext().$basePath.'/'.$searchFolder.'/'.$name;
        } else if (file_exists(getcwd().$commonPath.'/'.$searchFolder.'/'.$name)) {
            return '/'.$app->getConfiguration()->getApplicationContext().$commonPath.'/'.$searchFolder.'/'.$name;
        }
        return $name;
    }
1103861
public static function renderIcon(Environment $twigEnvironment, $name, $style = null) {

        // Determines the handler.
        $handler = explode(":", $name);
        if (1 === count($handler)) {
            array_unshift($handler, "g");
        }
        if (2 !== count($handler)) {
            return "";
        }

        // Swith into handler.
        switch ($handler[0]) {

            case "b": // Bootstrap
            case "g": // Glyphicon
                $output = (new GlyphiconTwigExtension($twigEnvironment))->renderIcon($handler[1], $style);
                break;

            default:
                $output = parent::renderIcon($twigEnvironment, $name, $style);
                break;
        }

        return $output;
    }
345205
public function getTag($name)
		{
			$comment = $this->ref->getDocComment();
			preg_match('/@' .$name. '\s+(.+)/', $comment, $matches);
			return $matches ? $matches[1] : null;
		}