Lines Matching refs:key

291         foreach ($componentAttributes as $key => $value) {
293 unset($this->componentAttributesCaseInsensitive[$key]);
296 if ($key === StyleAttribute::STYLE_ATTRIBUTE) {
297 unset($this->componentAttributesCaseInsensitive[$key]);
331 * @param array|null $callStackArray - an array of key value pair
651 foreach ($originalArray as $key => $value) {
659 if (isset($tempHtmlArray[$key])) {
664 if (in_array($key, self::HTML_ATTRIBUTES) || strpos($key, 'data-') === 0) {
665 $tempHtmlArray[$key] = $value;
668 if (!in_array($key, [
679 $message = "The component attribute ($key) is unknown or does not apply ";
765 * @param $key
769 public function addOutputAttributeValue($key, $value): TagAttributes
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");
776 $actualValue = $this->outputAttributes[$key] ?? null;
778 $this->outputAttributes[$key] = $value;
782 if (!in_array($key, self::MULTIPLE_VALUES_ATTRIBUTES)) {
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)
795 $this->addOutputAttributeValue($key, $value);
844 * @return array - an array of key string and value of the component attributes
866 foreach ($originalArray as $key => $value) {
874 $array[$key] = $value;
880 foreach ($this->outputAttributes as $key => $value) {
881 $array[$key] = $value;
1156 foreach ($callStackArray as $key => $value) {
1158 if ($this->hasComponentAttribute($key)) {
1159 $isMultipleAttributeValue = in_array($key, self::MULTIPLE_VALUES_ATTRIBUTES);
1161 $this->addComponentAttributeValue($key, $value);
1164 $this->setComponentAttributeValue($key, $value);
1224 foreach ($this->getComponentAttributes() as $key => $value) {
1225 $attributeString .= "$key=\"$value\" ";
1238 * @param string $key add an html attribute with the empty string
1241 function addBooleanOutputAttributeValue(string $key): TagAttributes
1244 $this->outputAttributes[$key] = null;
1300 throw new ExceptionNotFound("No output attribute with the key ($attribute)");
1465 foreach ($this->componentAttributesCaseInsensitive as $key => $value) {
1466 $url->addQueryParameter($key, $value);
1471 public function hasComponentAttributeAndRemove(string $key): bool
1473 $hasAttribute = $this->hasComponentAttribute($key);
1475 $this->removeComponentAttribute($key);