src/Charcoal/Property/StorablePropertyTrait.php
private function updatedFields($val)
    {
        if (empty($this->fields)) {
            return $this->generateFields($val);
        }

        if ($this->l10n()) {
            foreach ($this->translator()->availableLocales() as $langCode) {
                $this->fields[$langCode]->setVal($this->fieldVal($langCode, $val));
            }
        } else {
            $this->fields[0]->setVal($this->storageVal($val));
        }

        return $this->fields;
    }
private function updatedFields($val)
    {
        if (empty($this->fields)) {
            return $this->generateFields($val);
        }

        if ($this->l10n()) {
            foreach ($this->translator()->availableLocales() as $langCode) {
                $this->fields[$langCode]->setVal($this->fieldVal($langCode, $val));
            }
        } else {
            $this->fields[0]->setVal($this->storageVal($val));
        }

        return $this->fields;
    }
private function updatedFields ( $ val ) { if ( empty ( $ this -> fields ) ) { return $ this -> generateFields ( $ val ) ; } if ( $ this -> l10n ( ) ) { foreach ( $ this -> translator ( ) -> availableLocales ( ) as $ langCode ) { $ this -> fields [ $ langCode ] -> setVal ( $ this -> fieldVal ( $ langCode , $ val ) ) ; } } else { $ this -> fields [ 0 ] -> setVal ( $ this -> storageVal ( $ val ) ) ; } return $ this -> fields ; }
Update the property's storage fields.

@param  mixed $val The value to set as field value.
@return PropertyField[]
Update the property s storage fields .