{@inheritdoc}

@see \Concrete\Core\Attribute\MulticolumnTextExportableAttributeInterface::updateAttributeValueFromTextRepresentation()
965998
public function updateAttributeValueFromTextRepresentation(array $textRepresentation, ErrorList $warnings)
    {
        $textRepresentation = array_map('trim', $textRepresentation);
        $value = $this->getAttributeValueObject();
        if ($value === null) {
            if (implode('', $textRepresentation) !== '') {
                $value = new AddressValue();
            }
        }
        if ($value !== null) {
            /* @var AddressValue $value */
            $value->setAddress1(trim(array_shift($textRepresentation)));
            $value->setAddress2(trim(array_shift($textRepresentation)));
            $value->setAddress3(trim(array_shift($textRepresentation)));
            $value->setCity(trim(array_shift($textRepresentation)));
            $value->setStateProvince(trim(array_shift($textRepresentation)));
            $value->setCountry(trim(array_shift($textRepresentation)));
            $value->setPostalCode(trim(array_shift($textRepresentation)));

            $countryCode = (string) $value->getCountry();
            if ($countryCode !== '') {
                $cl = $this->app->make(CountryList::class);
                /* @var CountryList $cl */
                $countries = $cl->getCountries();
                if (!isset($countries[$countryCode])) {
                    $warnings->add(t('"%1$s" is not a valid Country code for the attribute with handle %2$s', $countryCode, $this->attributeKey->getAttributeKeyHandle()));
                } else {
                    $countryName = $countries[$countryCode];
                    $stateProvinceCode = $value->getStateProvince();
                    if ($stateProvinceCode !== '') {
                        $spl = $this->app->make(StatesProvincesList::class);
                        /* @var StatesProvincesList $spl */
                        $statesProvinces = $spl->getStateProvinceArray($countryCode);
                        if ($statesProvinces !== null && !isset($statesProvinces[$stateProvinceCode])) {
                            $warnings->add(t('"%1$s" is not a valid State/Province code for the Country %2$s (attribute with handle %3$s)', $stateProvinceCode, $countryName, $this->attributeKey->getAttributeKeyHandle()));
                        }
                    }
                }
            }
        }

        return $value;
    }
1246195
public function setHasAttributeAvValue($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->has_attribute_av_value !== $v) {
            $this->has_attribute_av_value = $v;
            $this->modifiedColumns[AttributeTypeTableMap::HAS_ATTRIBUTE_AV_VALUE] = true;
        }


        return $this;
    }
691127
@Override
	public void assignValue(XAttribute attribute, Double value) {
		XCostExtension.instance().assignAmount(attribute, value);
	}
28237
public function updateAttributeValueFromTextRepresentation($textRepresentation, ErrorList $warnings)
    {
        $value = $this->getAttributeValueObject();
        $value->getSelectedLinks()->clear();
        $textRepresentation = trim($textRepresentation);
        if ($textRepresentation === '') {
            if ($value !== null) {
                $value->getSelectedLinks()->clear();
            }
        } else {
            $initialized = false;
            foreach (explode("\n", $textRepresentation) as $serviceAndInfo) {
                $serviceAndInfo = trim($serviceAndInfo);
                if ($serviceAndInfo === '') {
                    continue;
                }
                $chunks = explode(':', $serviceAndInfo, 2);
                if (!isset($chunks[1])) {
                    $warnings->add(t('"%1$s" is not a valid Social Link value for the attribute with handle %2$s', $serviceAndInfo, $this->attributeKey->getAttributeKeyHandle()));
                    continue;
                }
                $serviceHandle = trim($chunks[0]);
                $serviceInfo = trim($chunks[1]);
                $serviceObject = Service::getByHandle($serviceHandle);
                if ($serviceObject === null) {
                    $warnings->add(t('"%1$s" is not a valid Social Service handle for the attribute with handle %2$s', $serviceHandle, $this->attributeKey->getAttributeKeyHandle()));
                    continue;
                }
                if ($initialized === false) {
                    $initialized = true;
                    if ($value === null) {
                        $value = $this->createAttributeValue([]);
                    } else {
                        $value->getSelectedLinks()->clear();
                    }
                }
                $link = new SelectedSocialLink();
                $link->setAttributeValue($value);
                $link->setService($serviceHandle);
                $link->setServiceInfo($serviceInfo);
                $value->getSelectedLinks()->add($link);
            }
        }

        return $value;
    }
852928
public function setIsMultilingualAttributeAvValue($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->is_multilingual_attribute_av_value !== $v) {
            $this->is_multilingual_attribute_av_value = $v;
            $this->modifiedColumns[AttributeTypeTableMap::IS_MULTILINGUAL_ATTRIBUTE_AV_VALUE] = true;
        }


        return $this;
    }
1362103
private function updateAttribute($name, $value, $separator)
    {
        array_set($this->attribute, $name, implode($separator, $value));

        return $this;
    }
832806
private function updateAttribute($name, $value)
    {
        $attribute = $this->getAttr($name);

        if (! is_null($attribute)) {
            $attribute->addContent($value);

            $this->put($name, $attribute);
        }

        return $this;
    }
845177
@Override
    public void setValue(ELContext context, Object value)
            throws PropertyNotFoundException, PropertyNotWritableException,
            ELException {
        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
                this.varMapper);
        context.notifyBeforeEvaluation(getExpressionString());
        this.getNode().setValue(ctx, value);
        context.notifyAfterEvaluation(getExpressionString());
    }
498728
public function getAttributeValueTextRepresentation()
    {
        $result = '';
        $value = $this->getAttributeValueObject();
        if ($value !== null) {
            $topics = $value->getSelectedTopics();
            if (!empty($topics)) {
                $ids = [];
                foreach ($topics as $topic) {
                    /* @var \\Concrete\Core\Entity\Attribute\Value\Value\SelectedTopic $topic */
                    $ids[] = 'tid:' . $topic->getTreeNodeID();
                }
                $result = implode('|', $ids);
            }
        }

        return $result;
    }
268073
private static void updateAttribute(Element parent, String attrName, String value) {

        if (parent != null) {
            Attribute attribute = parent.attribute(attrName);
            if (value != null) {
                if (attribute == null) {
                    parent.addAttribute(attrName, value);
                } else {
                    attribute.setValue(value);
                }
            } else {
                // remove only if exists
                if (attribute != null) {
                    parent.remove(attribute);
                }
            }
        }
    }
766740
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $dataText = $originalContentObjectAttribute->attribute( "data_text" );
            $contentObjectAttribute->setAttribute( "data_text", $dataText );
        }
    }
107062
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement )
    {
        $dom = $namedParameters['dom'];
        if ( $dom instanceof eZContentObjectAttribute )
        {
            $this->ObjectAttributeId = $dom->attribute( 'id' );
            $content = $dom->attribute( 'content' );
            $xmlData = $content->attribute( 'xml_data' );

            $domTree = new DOMDocument( '1.0', 'utf-8' );
            $domTree->preserveWhiteSpace = false;
            $success = $domTree->loadXML( $xmlData );

            $tocText = '';
            if ( $success )
            {
                $this->HeaderCounter = array();
                $this->LastHeaderLevel = 0;

                $rootNode = $domTree->documentElement;
                $tocText .= $this->handleSection( $rootNode );

                while ( $this->LastHeaderLevel > 0 )
                {
                    $tocText .= "</li>\n</ul>\n";
                    $this->LastHeaderLevel--;
                }
            }
        }
        $operatorValue = $tocText;
    }
1147326
public function setTextValue($textValue)
    {
        if (\is_array($textValue) || \is_object($textValue)) {
            $m = "Invalid value type for attribute {$this->getFamilyCode()}.{$this->getAttributeCode()}, ";
            $m .= 'expecting string, got '.gettype($textValue);
            throw new \UnexpectedValueException($m);
        }
        $this->textValue = null === $textValue ? null : (string) $textValue;

        return $this;
    }
853569
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $dataText = $originalContentObjectAttribute->content();
            $contentObjectAttribute->setContent( $dataText );
        }
        else
        {
            $default = array( 'value' => array() );
            $contentObjectAttribute->setContent( $default );
        }
    }
74720
public static function prepare_attr_value ($text) {
		if (is_array($text)) {
			/** @noinspection ForeachSourceInspection */
			foreach ($text as &$t) {
				$t = static::prepare_attr_value($t);
			}
			return $text;
		}
		return strtr(
			$text,
			[
				'&'  => '&amp;',
				'"'  => '&quot;',
				'\'' => '&apos;',
				'<'  => '&lt;',
				'>'  => '&gt;'
			]
		);
	}
154584
public void updateContextWithElementAttributes(final Attributes attributes)
            throws XIncludeFatalException
    {
        extractCurrentBaseURI(attributes);
        if (ofNullable(this.currentBaseURI).isPresent())
        {
            addBaseURIPath(this.currentBaseURI);
        }
    }
395040
private function updateValue()
    {
        $session = $this->getSessionStorage();
        $input   = $this->getInputProvider();
        $value   = null;

        if ($input->hasValue($this->getPropertyName()) && $this->getPanel()->getContainer()->updateValues()) {
            $value = $input->getValue($this->getPropertyName());

            $this->setPersistent($value);
        }

        if ($session->has('filter')) {
            $persistent = $this->getPersistent();
            $value      = $persistent;
        }

        if (null !== $value) {
            $this->setValue($value);
        }
    }