Lines Matching defs:attribute

43  *   * declare component attribute after parsing
44 * * declare Html attribute during parsing
54 * @var string the alt attribute value (known as the title for dokuwiki)
74 self::SCRIPT_KEY, // no script attribute for security reason
101 * We could pass the plugin object into tag attribute in place of the logical tag
135 * to advertise that it will add attribute and close it
140 * If an attribute has this value,
142 * Child element can unset attribute this way
146 * to advertise that the title attribute should not be set
193 * TODO: This is because the request object and the response object are the same. We should add the request attribute in the {@link \TagAttributes}
201 * The dokuwiki name attribute to store
214 * @var ArrayCaseInsensitive attribute that were set on a component
224 * @var bool - set when the transformation from component attribute to html attribute
230 * @var array - output attribute are not the parsed attributes known as componentAttribute)
298 LogUtility::warning("The style attribute cannot be set or used due to security. Uses the combostrap style attribute or set a class attibute instead.");
308 * @param bool $allowFirstBooleanAttributesAsType - if the first attribute is a boolean, make it a type
332 * @param string|null $logicalTag - the logical tag for which this attribute will apply
387 * Function used to normalize the attribute name to the combostrap attribute name
467 * Add an attribute with its value if the value is not empty
476 LogUtility::msg("The value of the attribute ($attributeName) is empty. Use the nonEmpty function instead if it's the wanted behavior", LogUtility::LVL_MSG_WARNING, "support");
492 LogUtility::msg("The attribute ($attLower) stores an unique value and has already a value ($actual). to set another value ($attributeValue), use the `set` operation instead", LogUtility::LVL_MSG_ERROR, self::CANONICAL);
528 LogUtility::warning("Internal Error: The tag ({$this->getLogicalTag()}) has a boolean attribute ($attributeName) defined as a type. The possible types should be defined for this tag as it's deprecated.");
546 LogUtility::msg("This tag attribute ($this) was already finalized. You cannot finalized it twice", LogUtility::LVL_MSG_ERROR);
633 * Add the style has html attribute
663 // We only add the common HTML attribute
676 * * If it must be in the HTML output, you should add it via the output attribute methods during processing.
679 $message = "The component attribute ($key) is unknown or does not apply ";
692 * Sort by attribute
693 * https://datacadamia.com/web/html/attribute#order
694 * https://codeguide.co/#html-attribute-order
739 * The value of an HTML attribute may be empty
754 * To Html attribute encoding
773 LogUtility::error("The value of the output attribute is blank for the key ($key) - Tag ($this->logicalTag). Use the empty / boolean function if the value can be empty");
783 LogUtility::internalError("The output attribute ($key) was already set with the value ($actualValue), we have added the value ($value)");
878 * html attribute may also be in the callstack
950 * Unset attribute should not be added
1049 * @param $attribute
1052 public function removeComponentAttribute($attribute)
1054 $lowerAtt = strtolower($attribute);
1061 * Edge case, this is the first boolean attribute
1065 LogUtility::msg("Internal Error: The component attribute ($attribute) is not present. Use the ifPresent function, if you don't want this message");
1192 function getValueAndRemoveIfPresent($attribute, $default = null)
1194 $value = $this->getValue($attribute, $default);
1195 $this->removeAttributeIfPresent($attribute);
1215 * @return string - the marki tag made of logical attribute
1238 * @param string $key add an html attribute with the empty string
1250 function addEmptyComponentAttributeValue($attribute)
1252 $this->componentAttributesCaseInsensitive[$attribute] = "";
1256 * @param $attribute
1261 function getBooleanValueAndRemoveIfPresent($attribute, $default = null)
1263 $value = $this->getBooleanValue($attribute, $default);
1264 $this->removeAttributeIfPresent($attribute);
1269 function getBooleanValue($attribute, $default = null)
1271 $value = $this->getValue($attribute);
1278 public function hasAttribute($attribute): bool
1280 $hasAttribute = $this->hasComponentAttribute($attribute);
1284 return $this->hasHtmlAttribute($attribute);
1288 function hasHtmlAttribute($attribute): bool
1290 return isset($this->outputAttributes[$attribute]);
1296 function getOutputAttribute($attribute)
1298 $value = $this->outputAttributes[$attribute] ?? null;
1300 throw new ExceptionNotFound("No output attribute with the key ($attribute)");
1314 * We encode the component attribute to the target output (ie HTML)
1322 * https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html#rule-2-attribute-encode-before-inserting-untrusted-data-into-html-common-attributes
1351 * In the HTML attribute srcset (not in the img src), if we set,
1448 throw new ExceptionBadArgument("The attribute ($attributeName) does not contain a string, we can't return multiple values");
1455 public function getComponentAttributeValueAndRemoveIfPresent(string $attribute, $default = null)
1457 $value = $this->getComponentAttributeValue($attribute, $default);
1458 $this->removeComponentAttributeIfPresent($attribute);