Lines Matching refs:value

54      * @var string the alt attribute value (known as the title for dokuwiki)
140 * If an attribute has this value,
291 foreach ($componentAttributes as $key => $value) {
292 if (is_null($value)) {
331 * @param array|null $callStackArray - an array of key value pair
376 * @param $value
380 public static function toQualifiedCssValue($value): string
382 return ConditionalLength::createFromString($value)->toCssLength();
415 foreach ($tagAttributes->getStyleDeclarations() as $property => $value) {
416 $newTagAttributes->addStyleDeclarationIfNotSet($property, $value);
439 $value = $this->getValue(self::CLASS_KEY, $default);
440 if ($value !== null) {
441 return $value;
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);
524 * if this is a boolean value and the first value, it may be stored in the type
539 * att => 'value1 value 2'
651 foreach ($originalArray as $key => $value) {
654 if (is_null($value)) {
665 $tempHtmlArray[$key] = $value;
708 "value" => $once,
714 foreach ($tempHtmlArray as $name => $value) {
719 $sortedArray[$name] = $value;
722 $multipleValues[$name] = $value;
732 foreach ($tempHtmlArray as $name => $value) {
734 if (!is_null($value)) {
739 * The value of an HTML attribute may be empty
743 * will not accept any value, it must be implicitly said with the
747 $sortedArray[$name] = $value;
766 * @param $value
769 public function addOutputAttributeValue($key, $value): TagAttributes
772 if (blank($value)) {
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");
778 $this->outputAttributes[$key] = $value;
783 LogUtility::internalError("The output attribute ($key) was already set with the value ($actualValue), we have added the value ($value)");
786 $this->outputAttributes[$key] = "$value $actualValue";
792 public function addOutputAttributeValueIfNotEmpty($key, $value)
794 if (!empty($value)) {
795 $this->addOutputAttributeValue($key, $value);
802 * @return string|array|null a HTML value in the form 'value1 value2...'
816 * Get the value and remove it from the attributes
826 $value = $default;
828 $value = $this->getValue($attributeName);
839 return $value;
844 * @return array - an array of key string and value of the component attributes
866 foreach ($originalArray as $key => $value) {
868 * Only null value are not passed
873 if (!is_null($value)) {
874 $array[$key] = $value;
880 foreach ($this->outputAttributes as $key => $value) {
881 $array[$key] = $value;
899 $value = $default;
901 $value = $this->getValue($lowerAttribute);
903 return $value;
907 function addStyleDeclarationIfNotSet($property, $value)
909 ArrayUtility::addIfNotSet($this->styleDeclaration, $property, $value);
913 function setStyleDeclaration($property, $value): TagAttributes
915 $this->styleDeclaration[$property] = $value;
941 foreach ($htmlArray as $name => $value) {
944 * Empty value are authorized
947 if (!is_null($value)) {
952 if ($value === TagAttributes::UN_SET) {
962 if (!is_string($value)) {
963 $stringValue = StringUtility::toString($value);
965 $stringValue = $value;
1050 * @return mixed|null - the value deleted / null if it does not exist
1056 $value = $this->componentAttributesCaseInsensitive[$lowerAtt];
1058 return $value;
1120 $value = $this->getConditionalValueAndRemove($attributeName);
1121 return new ConditionalValue($value);
1156 foreach ($callStackArray as $key => $value) {
1161 $this->addComponentAttributeValue($key, $value);
1164 $this->setComponentAttributeValue($key, $value);
1194 $value = $this->getValue($attribute, $default);
1196 return $value;
1224 foreach ($this->getComponentAttributes() as $key => $value) {
1225 $attributeString .= "$key=\"$value\" ";
1263 $value = $this->getBooleanValue($attribute, $default);
1265 return $value;
1271 $value = $this->getValue($attribute);
1272 if ($value !== null) {
1273 return DataType::toBoolean($value);
1298 $value = $this->outputAttributes[$attribute] ?? null;
1299 if ($value === null) {
1302 return $value;
1313 * We follows the rule 2 to encode the unknown value
1331 foreach ($arrayToEscape as $name => $value) {
1338 if (is_bool($value)) {
1340 $returnedArray[$encodedName] = $value;
1342 $returnedArray[$subKey][$encodedName] = $value;
1369 $value = Html::encode($value);
1372 $returnedArray[$encodedName] = $value;
1374 $returnedArray[$subKey][$encodedName] = $value;
1392 $value = $this->getValue($WIDTH_KEY, $default);
1393 if ($value === null) {
1396 return DataType::toInteger($value);
1443 $value = $this->getValue($attributeName);
1444 if ($value === null) {
1447 if (!is_string($value)) {
1450 $value = preg_replace("/\s{2,}/", " ", trim($value));
1451 return explode(" ", $value);
1457 $value = $this->getComponentAttributeValue($attribute, $default);
1459 return $value;
1465 foreach ($this->componentAttributesCaseInsensitive as $key => $value) {
1466 $url->addQueryParameter($key, $value);