Lines Matching defs:level

46     public const LEVEL = 'level';
60 * The default level if not set
61 * Not level 1 because this is the top level heading
62 * Not level 2 because this is the most used level and we can confound with it
117 $openingAttributes = $openingTag->getAttributes(); // for level
196 $level = $tagAttributes->getValue(HeadingTag::LEVEL);
198 $renderer->header($text, $level, $pos);
200 if ($level === 1) {
226 $level = $tagAttributes->getValue(HeadingTag::LEVEL);
227 $renderer->header($text, $level, 0);
272 $level = $tagAttributes->getValueAndRemove(HeadingTag::LEVEL);
282 $type = "h$level";
286 $displayClass = "display-$level";
391 if ($level === 1) {
405 $tag = self::getTagFromContext($context, $level);
418 $level = $tagAttributes->getValueAndRemove(HeadingTag::LEVEL);
419 if ($level == null) {
420 LogUtility::msg("The level is mandatory when closing a heading", self::CANONICAL);
422 $tag = self::getTagFromContext($context, $level);
506 $level = $tagAttributes->getValue(HeadingTag::LEVEL);
507 if ($level === null) {
515 $level = $type;
517 $type = "d$level";
519 $type = "h$level";
526 if ($level == null) {
528 $level = substr($type, 1);
532 * Still null, default level
534 if ($level == null) {
536 $level = HeadingTag::DEFAULT_LEVEL_OUTLINE_CONTEXT;
538 $level = HeadingTag::DEFAULT_LEVEL_TITLE_CONTEXT;
542 * Set the level
544 $tagAttributes->addComponentAttributeValue(HeadingTag::LEVEL, $level);
562 * @param int $level
565 private static function getTagFromContext(string $context, int $level): string
568 return "h$level";