@param \EzSystems\EzPlatformAdminUi\Form\Data\Content\Translation\MainTranslationUpdateData $data

@return \eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct
546475
public function reverseMap($data)
    {
        if (!$data instanceof MainTranslationUpdateData) {
            throw new InvalidArgumentException('value', sprintf('must be an instance of %s', MainTranslationUpdateData::class));
        }

        return new ContentMetadataUpdateStruct([
            'mainLanguageCode' => $data->getLanguageCode(),
            'name' => $data->getContent()->getName($data->getLanguageCode()),
        ]);
    }
505590
public function update($data)
    {
        if (isset($data['stackName'])) {
            $txt = Core::make('helper/text');
            $data['cName'] = $data['stackName'];
            $data['cHandle'] = str_replace('-', Config::get('concrete.seo.page_path_separator'), $txt->urlify($data['stackName']));
        }
        $worked = parent::update($data);

        if (isset($data['stackName'])) {
            // Make sure the stack path is always up-to-date after a name change
            $this->rescanCollectionPath();

            $db = Database::connection();
            $stackName = $data['stackName'];
            $db->Execute('update Stacks set stName = ? WHERE cID = ?', [$stackName, $this->getCollectionID()]);
        }

        return $worked;
    }
537903
public function setData($data)
    {
        foreach ($data as $key => $dtoData) {
            $this->data[$key] = new SummonerSpellDto($dtoData);
        }
    
        return $this;
    }
1258901
public function update($property, $data)
    {
        if (Session::has('multi_language_enabled')) {
            $languageId = $data['language_id'];
            $languaModel = Language::find($languageId);
            
            if ($languaModel->is_default) {
                return $property->update($data);
            } else {
                $translatedModel = $property
                    ->translations()
                    ->whereLanguageId($languageId)
                    ->first();
                if (null === $translatedModel) {
                    return PropertyTranslation::create(
                        array_merge($data, ['property_id' => $property->id])
                    );
                } else {
                    $translatedModel->update(
                        $data,
                        $property->getTranslatedAttributes()
                    );

                    return $translatedModel;
                }

            }
        } else {
            return $category->update($data);
        }
    }
485926
public function deleteLanguages(
        LanguagesDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(LanguagesDeleteType::class);

        return $this->formFactory->createNamed($name, LanguagesDeleteType::class, $data);
    }
313918
public function update($data = array()) {
    foreach ($data as $key => $value) {
      $this->{$key} = $value;
    }

    $postData = array();
    foreach (static::$properties as $name) {
      $postData[$name] = $this->data[$name];
    }

    $this->client->put(static::$path . '/' . $this->id(), $postData);

    return $this;
  }
1068762
public function editLanguage($data) {
        $response=CodeBank_ClientAPI::responseBase();
        
        try {
            if(SnippetLanguage::get()->filter('Name:nocase', Convert::raw2sql($data->language))->Count()>0) {
                $response['status']='EROR';
                $response['message']=_t('CodeBankAPI.LANGUAGE_EXISTS', '_Language already exists');
            
                return $response;
            }
            
            
            $lang=SnippetLanguage::get()->byID(intval($data->id));
            if(empty($lang) || $lang===false || $lang->ID==0) {
                $response['status']='EROR';
                $response['message']=_t('CodeBankAPI.LANGUAGE_NOT_FOUND', '_Language not found');
                
                return $response;
            }
            
            
            //Update language and write
            if($lang->UserLanguage==true) {
                $lang->Name=$data->language;
                $lang->FileExtension=$data->fileExtension;
            }
            
            $lang->Hidden=$data->hidden;
            $lang->write();
            
            
            $response['status']='HELO';
            $response['message']="Language edited successfully";
        }catch (Exception $e) {
            $response['status']='EROR';
            $response['message']=_t('CodeBankAPI.SERVER_ERROR', '_Server error has occured, please try again later');
        }
        
        return $response;
    }
652532
public function deleteTranslation(
        TranslationDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('delete-translations');

        return $this->formFactory->createNamed($name, TranslationDeleteType::class, $data);
    }
696354
public function updateFromFormData($data)
    {
        $cmsFields = $this->getCMSFields();

        foreach ($data as $field => $datum) {
            $field = $cmsFields->dataFieldByName($field);

            if (!$field) {
                continue;
            }

            $field->setSubmittedValue($datum);
            $field->saveInto($this);
        }
    }
20886
public function reverseMap($data): PolicyCreateStruct
    {
        if (!$data instanceof PolicyCreateData) {
            throw new InvalidArgumentException('data', 'must be an instance of ' . PolicyCreateData::class);
        }

        $policyCreateStruct = new PolicyCreateStruct([
            'module' => $data->getModule(),
            'function' => $data->getFunction(),
        ]);

        foreach ($data->getLimitations() as $limitation) {
            if (!empty($limitation->limitationValues)) {
                $policyCreateStruct->addLimitation($limitation);
            }
        }

        return $policyCreateStruct;
    }
939551
public function createLanguage(
        ?LanguageCreateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(LanguageCreateType::class);

        return $this->formFactory->createNamed(
            $name,
            LanguageCreateType::class,
            $data ?? new LanguageCreateData()
        );
    }
227817
protected function buildUpdateStruct(URL $url, URLUpdateStruct $data)
    {
        $updateStruct = new SPIUrlUpdateStruct();

        if ($data->url !== null && $url->url !== $data->url) {
            $updateStruct->url = $data->url;
            // Reset URL validity
            $updateStruct->lastChecked = 0;
            $updateStruct->isValid = true;
        } else {
            $updateStruct->url = $url->url;

            if ($data->lastChecked !== null) {
                $updateStruct->lastChecked = $data->lastChecked->getTimestamp();
            } elseif ($data->lastChecked !== null) {
                $updateStruct->lastChecked = $url->lastChecked->getTimestamp();
            } else {
                $updateStruct->lastChecked = 0;
            }

            if ($data->isValid !== null) {
                $updateStruct->isValid = $data->isValid;
            } else {
                $updateStruct->isValid = $url->isValid;
            }
        }

        return $updateStruct;
    }
311514
public function removeContentTypeTranslation(
        TranslationRemoveData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: 'delete-translations';

        return $this->formFactory->createNamed($name, TranslationRemoveType::class, $data);
    }
329574
private function resolveMainLanguageCode($data): string
    {
        return $data->isNew()
            ? $data->mainLanguageCode
            : $data->contentDraft->getVersionInfo()->getContentInfo()->mainLanguageCode;
    }
1141994
public function updateContentMainLocation(
        ?ContentMainLocationUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(ContentMainLocationUpdateType::class);
        $data = $data ?? new ContentMainLocationUpdateData();

        return $this->formFactory->createNamed(
            $name,
            ContentMainLocationUpdateType::class,
            $data
        );
    }
844884
public function updateContentObjectState(
        ContentObjectStateUpdateData $data,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-content-%d-object-state-group-%d', $data->getContentInfo()->id,
            $data->getObjectStateGroup()->id);

        return $this->formFactory->createNamed($name, ContentObjectStateUpdateType::class, $data);
    }
309014
public function updateLocation(
        LocationUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(LocationUpdateType::class);

        return $this->formFactory->createNamed($name, LocationUpdateType::class, $data);
    }