Lines Matching refs:tag

28 // The context is generally the parent tag but it may be also the grandfather.
31 const TAG = "tag";
47 const MARKUP_TAG = "markup-tag";
122 * Return a mode from a tag (ie from a {@link Plugin::getPluginComponent()}
123 * @param $tag
129 public static function getModeFromTag($tag)
131 return "plugin_" . self::getComponentName($tag);
136 * This pattern allows space after the tag name
137 * for an end tag
139 * @param $tag
142 public static function getEndTagPattern($tag)
144 return "</$tag\s*>";
148 * @param $tag
151 * Create a open tag pattern without lookahead.
155 public static function getVoidElementTagPattern($tag)
157 return ' < ' . $tag . ' .*?>';
163 * and return a HTML tag string
240 * Return the attribute of a tag
255 // Suppress the tag name (ie until the first blank)
258 // No space, meaning this is only the tag name
336 * @param $tag
338 * Create a pattern used where the tag is not a container.
345 * where the tag is just replaced
347 public static function getEmptyTagPattern($tag): string
351 * A tag should start with the tag
352 * `(?=[/ ]{1})` - a space or the / (lookahead) => to allow allow tag name with minus character
353 * `(?![^/]>)` - it's not a normal tag (ie a > with the previous character that is not /)
357 return '<' . $tag . '(?=[/ ]{1})(?![^/]>)[^>]*\/>';
369 * to get the tag name (ie the component plugin)
578 * A pattern for a container tag
584 * @param $tag
588 static function getLeafContainerTagPattern($tag)
590 return '<' . $tag . '.*?>.*?<\/' . $tag . '>';
594 * Return the content of a tag
606 LogUtility::msg("The match does not contain any opening tag. Match: {$match}", LogUtility::LVL_MSG_ERROR);
612 LogUtility::msg("The match does not contain any closing tag. Match: {$match}", LogUtility::LVL_MSG_ERROR);
618 LogUtility::msg("The match does not contain any closing tag. Match: {$match}", LogUtility::LVL_MSG_ERROR);
627 * Check if a HTML tag was already added for a request
750 * @return null|string - return the tag name or null if not found
759 LogUtility::msg("The match does not contain any tag. Match: {$match}", LogUtility::LVL_MSG_ERROR);
764 // if this is a empty tag with / at the end we delete it
772 // closing tag
777 LogUtility::msg("This is not a text tag because it does not start with the character `>`");
780 // Suppress the tag name (ie until the first blank)
783 // No space, meaning this is only the tag name
793 static function getComponentName($tag): string
795 return strtolower(PluginUtility::PLUGIN_BASE_NAME) . "_" . $tag;
892 * Utility methodPreprocess a start tag to be able to extract the name
909 LogUtility::msg("The match does not contain any tag. Match: {$match}", LogUtility::LVL_MSG_WARNING);
923 // Suppress the / for a leaf tag
931 * Retrieve the tag name used in the text document
943 // No space, meaning this is only the tag name