Alias for the `iconIdentifier` function.

@param string $iconKey The icon key
@param string $separator The optional separator, defaults to `_`
@return string The icon identifier
186640
public static function getIconIdentifier(string $iconKey, string $separator = '_'): string {
    return self::iconIdentifier($iconKey, $separator);
  }
1133373
public final String getChainIdentity(String separator) throws KSIException {
        StringBuilder identity = new StringBuilder();

        for (int i = chain.size()-1; i >=0 ; i--) {
            AggregationChainLink aggregationChainLink = chain.get(i);
            Identity linkIdentity = aggregationChainLink.getLinkIdentity();
            String id = linkIdentity == null ? "" : linkIdentity.getDecodedClientId();
            if (identity.length() > 0 && id.length() > 0) {
                identity.append(separator);
            }
            identity.append(id);
        }
        return identity.toString();
    }
830082
private function tokenize($string, $separator = '')
    {
        if (!strcmp($separator, '')) {
            $separator = $string;
            $string = $this->headerNextToken;
        }

        for ($character = 0; $character < strlen($separator); $character++) {
            if (gettype($position = strpos($string, $separator[$character])) == 'integer') {
                $found = (isset($found) ? min($found, $position) : $position);
            }
        }

        if (isset($found)) {
            $this->headerNextToken = substr($string, $found + 1);

            return substr($string, 0, $found);
        } else {
            $this->headerNextToken = '';

            return $string;
        }
    }
145303
public function encodeDivIcon(DivIcon $icon, Encoder $encoder)
    {
        return sprintf(
            '%s = L.divIcon(%s);',
            $encoder->encodeReference($icon),
            $encoder->encodeArguments(array($icon->getOptions()))
        );
    }
178665
public function icon($icon, $icon2 = null)
    {
        $this->icon = trim($icon);

        if (! str_empty($icon2)) {
            $this->icon2 = trim($icon2);
        }

        return $this;
    }
517624
public function getAssetPath($icon, array $params = [])
    {
        $overlay = [];

        if (!empty($params['status'])) {
            $overlay['status'] = $params['status'];
        }

        if (!empty($params['timer'])) {
            $overlay['timer'] = $params['timer'];
        }

        if (!empty($params['lock'])) {
            $overlay['lock'] = $params['lock'];
        }

        if (!empty($params['instance'])) {
            $overlay['instance'] = $params['instance'];
        }

        if (!empty($params['sort'])) {
            $overlay['sort'] = $params['sort'];
        }

        $fallback = $this->locator->locate('@PhlexibleElementtypeBundle/Resources/public/elementtypes/icon_notfound.gif');

        if ($icon === null) {
            $filename = $fallback;
        } else {
            $prefix = '@PhlexibleElementtypeBundle/Resources/public/elementtypes/';
            $filename = $this->locator->locate($prefix.$icon);

            if (!file_exists($filename)) {
                $filename = $fallback;
            }
        }

        $cacheFilename = $this->cacheDir.'/'.md5(basename($filename).'__'.implode('__', $overlay)).'.png';

        if (!file_exists($cacheFilename) || (time() - filemtime($cacheFilename)) > 60 * 60 * 24 * 30) {
            $target = imagecreate(18, 18);
            $black = imagecolorallocate($target, 0, 0, 0);
            imagecolortransparent($target, $black);

            $iconSource = imagecreatefromgif($filename);
            imagecopy($target, $iconSource, 0, 0, 0, 0, 18, 18);
            imagedestroy($iconSource);

            $overlayDir = '@PhlexibleElementBundle/Resources/public/overlays/';

            if (!empty($overlay['status'])) {
                // apply status overlay
                $overlayIcon = imagecreatefromgif(
                    $this->locator->locate($overlayDir.'status_'.$overlay['status'].'.gif')
                );
                imagecopy($target, $overlayIcon, 9, 9, 0, 0, 8, 8);
                imagedestroy($overlayIcon);
            }

            if (!empty($overlay['timer'])) {
                // apply timer overlay
                $overlayIcon = imagecreatefromgif(
                    $this->locator->locate($overlayDir.'timer.gif')
                );
                imagecopy($target, $overlayIcon, 10, 0, 0, 0, 8, 8);
                imagedestroy($overlayIcon);
            }

            if (!empty($overlay['sort'])) {
                // apply timer overlay
                $overlayIcon = imagecreatefromgif(
                    $this->locator->locate($overlayDir.'sort_'.$overlay['sort'].'.gif')
                );
                imagecopy($target, $overlayIcon, 10, 0, 0, 0, 8, 8);
                imagedestroy($overlayIcon);
            }

            if (!empty($overlay['instance'])) {
                // apply alias overlay
                $overlayIcon = imagecreatefromgif(
                    $this->locator->locate($overlayDir.'instance_'.$overlay['instance'].'.gif')
                );
                imagecopy($target, $overlayIcon, 0, 10, 0, 0, 8, 8);
                imagedestroy($overlayIcon);
            }

            if (!empty($overlay['lock'])) {
                // apply lock overlay
                $overlayIcon = imagecreatefromgif(
                    $this->locator->locate($overlayDir.'lock_'.$overlay['lock'].'.gif')
                );
                imagecopy($target, $overlayIcon, 0, 0, 0, 0, 8, 8);
                imagedestroy($overlayIcon);
            }

            if (!file_exists($this->cacheDir)) {
                mkdir($this->cacheDir, 0777, true);
            }

            imagepng($target, $cacheFilename);
        }

        return $cacheFilename;
    }
978539
protected function normalizeIconClass( $icon_class ) {
		$icon_class = trim( $icon_class );

		if ( stripos( $icon_class, 'fa-' ) === false ) {
			$icon_class = 'fa-' . $icon_class;
		}

		return $icon_class;
	}
1347454
public static function unqualify($qualifiedName, $separator = '.')
    {
        // if false, then will be 0
        $pos = strrpos($qualifiedName, $separator);
        if ($pos === false) {
            return $qualifiedName; // there is no '.' in the qualifed name
        } else {
            return substr($qualifiedName, $pos + 1); // start just after '.'
        }
    }
569195
public function getLinkFontIconTag($icon = null)
    {
        if ($icon) {
            $self = clone $this;
            $self->FontIcon = $icon;
            return $self->getFontIconTag();
        }
        
        return $this->getFontIconTag();
    }
363364
public function getDefinition($separator=',')
	{
		$commands = self::$commands;

		if (sizeof($commands) > 0) {
			return implode($separator, $commands);
		}

		return null;
	}
195022
public function getIconName( $icon_class ) {
		$icon_class = $this->normalizeIconClass( $icon_class );
		$result     = false;

		if ( ! empty( $this->icons_array ) && array_key_exists( $icon_class, $this->icons_array ) ) {
			$result = $this->generateName( $icon_class );
		}

		return $result;
	}
678129
public function compile(string $separator = ""): string
    {
        // Boundaries
        $uniqueId = md5(uniqid(sprintf("%s-%s", $this->subject, microtime(false))));
        $boundaries[] = "--Comely_B1" . $uniqueId;
        $boundaries[] = "--Comely_B2" . $uniqueId;
        $boundaries[] = "--Comely_B3" . $uniqueId;

        // Headers
        $headers[] = $this->sender->name ?
            sprintf('From: %1$s <%2$s>', $this->sender->name, $this->sender->email) :
            sprintf('From:<%1$s>', $this->sender->email);
        $headers[] = sprintf('Subject: %1$s', $this->subject);
        $headers[] = "MIME-Version: 1.0";
        $headers[] = sprintf('X-Mailer: Comely %1$s', Comely::VERSION);
        $headers[] = sprintf('Content-Type: multipart/mixed; boundary="%1$s"', substr($boundaries[0], 2));
        foreach ($this->headers as $key => $value) {
            $headers[] = sprintf('%1$s: %2$s', $key, $value);
        }

        $headers[] = $separator; // Separator line between headers and body

        // Body
        $body[] = "This is a multi-part message in MIME format.";
        $body[] = $boundaries[0];
        $body[] = sprintf('Content-Type: multipart/alternative; boundary="%1$s"', substr($boundaries[1], 2));
        $body[] = ""; // Empty line

        // Body: text/plain
        if ($this->body->plain) {
            $encoding = $this->checkBodyEncoding($this->body->plain);
            $body[] = $boundaries[1];
            $body[] = sprintf('Content-Type: text/plain; charset=%1$s', $encoding[0]);
            $body[] = sprintf('Content-Transfer-Encoding: %1$s', $encoding[1]);
            $body[] = ""; // Empty line
            $body[] = $this->body->plain;
        }

        // Body: text/html
        if ($this->body->html) {
            $encoding = $this->checkBodyEncoding($this->body->html);
            $body[] = $boundaries[1];
            $body[] = sprintf('Content-Type: text/html; charset=%1$s', $encoding[0]);
            $body[] = sprintf('Content-Transfer-Encoding: %1$s', $encoding[1]);
            $body[] = ""; // Empty line
            $body[] = $this->body->html;
        }

        // Attachments
        foreach ($this->attachments as $attachment) {
            /** @var $attachment Attachment */
            $body[] = $boundaries[0];
            $body[] = implode($this->eol, $attachment->mime());
        }

        // Compile
        $mime = array_merge($headers, $body);
        return implode($this->eol, $mime);
    }
152161
public function iconTag($icon = null, $options = []) {
		$icon = mb_strtolower((string)$icon);
		$dataStr = serialize(compact('icon', 'options')) . '_' . $this->_currUIlang;
		$cachePath = 'iconTag.' . md5($dataStr);
		$cached = Cache::read($cachePath, CAKE_THEME_CACHE_KEY_HELPERS);
		if (!empty($cached)) {
			return $cached;
		}

		$result = '';
		if (empty($options)) {
			$options = [];
		} elseif (!is_array($options)) {
			$options = [$options];
		}

		$iconClass = $this->_getClassForElement($icon);
		if (empty($iconClass)) {
			return $result;
		}

		$options['class'] = $iconClass;
		$result = $this->Html->tag('span', '', $options);
		Cache::write($cachePath, $result, CAKE_THEME_CACHE_KEY_HELPERS);

		return $result;
	}
566342
public function getIdentifier($appendIdentifier = null)
    {
        $identifierParts = array_merge($this->parentScopes, [$this->scopeIdentifier, $appendIdentifier]);

        return implode('.', array_filter($identifierParts));
    }
447808
protected function createIcon($iconName)
	{
		if (is_callable($this->createIconCallback)) {
			return call_user_func($this->createIconCallback, $iconName);
		} else {
			return Icon::create($iconName);
		}
	}
736660
public function get_icon_name_map() {
        if ($this->map === []) {
            $cache = \cache::make('core', 'fontawesomeiconmapping');

            $this->map = $cache->get('mapping');

            if (empty($this->map)) {
                $this->map = $this->get_core_icon_map();
                $callback = 'get_fontawesome_icon_map';

                if ($pluginsfunction = get_plugins_with_function($callback)) {
                    foreach ($pluginsfunction as $plugintype => $plugins) {
                        foreach ($plugins as $pluginfunction) {
                            $pluginmap = $pluginfunction();
                            $this->map += $pluginmap;
                        }
                    }
                }
                $cache->set('mapping', $this->map);
            }

        }
        return $this->map;
    }
471619
public static function icon($icon, $options = [])
    {
        Html::addCssClass($options, $icon . ' icon');
        return Html::tag(ArrayHelper::remove($options, 'tag', 'i'), '', $options);
    }