Processes each field in this Embeddable and updates the metadata.
498451
private void processFields() {
    List<Field> fields = IntrospectionUtils.getPersistableFields(embeddableClass);
    for (Field field : fields) {
      if (field.isAnnotationPresent(Embedded.class)) {
        processEmbeddedField(field);
      } else {
        processSimpleField(field);
      }
    }
  }
1173974
public function process()
    {
        $gridField = $this->getGridField();

        if ($this->Columns) {
            $columns = $this->Columns;
        } elseif ($dataCols = $gridField->getConfig()->getComponentByType(GridFieldDataColumns::class)) {
            $columns = $dataCols->getDisplayFields($gridField);
        } else {
            $columns = singleton($gridField->getModelClass())->summaryFields();
        }

        if ($this->IncludeHeader && !$this->HeadersOutput) {
            $this->outputHeader($gridField, $columns);
            $this->HeadersOutput = true;
        }

        $chunkSize = $this->config()->get('chunk_size');

        $this->outputRows($gridField, $columns, $this->currentStep, $chunkSize);

        $this->currentStep += $chunkSize;

        if ($this->currentStep >= $this->totalSteps) {
            // Check to see if we need to wait for some time for asset synchronisation to complete
            $sleepTime = (int) $this->config()->get('sync_sleep_seconds');
            if ($sleepTime > 0) {
                sleep($sleepTime);
            }

            $this->isComplete = true;
        }
    }
111927
public void processMetadata(Metadata metadata) {
        synchronized (frameListeners) {
            Iterator<FrameListener> it = frameListeners.iterator();
            while (it.hasNext()) {
                FrameListener listener = it.next();
                listener.processMetadata(metadata);
            }
        }
    }
300560
def update(self, *args, **kwargs):
        '''
        
        '''
        preprocess = kwargs.get('preprocess')
        for s in args:
            for e in s:
                self._dict_set(preprocess(e) if preprocess else e, True)
502124
public function processClassMetadata(ClassMetadata $metadata, $property, $prefix)
    {
        if (in_array($metadata->getName(), $this->processedClasses)) {
            return;
        }

        $metadata->mapEmbedded([
            'fieldName'    => $property,
            'class'        => $this->embeddableMetadata->getName(),
            'columnPrefix' => empty($prefix) ? false : $prefix,
        ]);

        $metadata->inlineEmbeddable($property, $this->embeddableMetadata);

        $this->processedClasses[] = $metadata->getName();
    }
364638
def _parse_metadata(self, meta):
        """"""
        formatted_fields = self.settings['FORMATTED_FIELDS']

        output = collections.OrderedDict()
        for name, value in meta.items():
            name = name.lower()
            if name in formatted_fields:
                rendered = self._render(value).strip()
                output[name] = self.process_metadata(name, rendered)
            else:
                output[name] = self.process_metadata(name, value)
        return output
753442
private void processModifiersAndVariablesOfFieldDeclaration( FieldDeclaration fieldDeclaration,
                                                                 FieldMetadata arrayTypeFieldMetadata ) {
        processModifiersOfFieldDeclaration(fieldDeclaration, arrayTypeFieldMetadata);
        processVariablesOfVariableDeclarationFragment(fieldDeclaration, arrayTypeFieldMetadata);
    }
954577
function processMetadata () {
				//only interprete the metadata if the analytics model was not initialised yet
				if (that.bIsInitialized) {
					return;
				}

				//mark analytics model as initialized
				that.bIsInitialized = true;

				/*
				 * add extra annotations if provided
				 */
				if (mParameter && mParameter.sAnnotationJSONDoc) {
					that.mergeV2Annotations(mParameter.sAnnotationJSONDoc);
				}

				that._interpreteMetadata(that._oModel.getServiceMetadata().dataServices);
			}
925210
private void handleField() {
        if (LOG.isDebugEnabled())
            LOG.debug("parsedField:  _fieldName={} _fieldValue={} {}", _fieldName, _fieldValue, this);

        if (_fieldName != null && _fieldValue != null)
            _handler.parsedField(_fieldName, _fieldValue);
        _fieldName = _fieldValue = null;
    }
627138
private void processKeyField(Field field) {
    String fieldName = field.getName();
    Class<?> type = field.getType();
    if (!type.equals(DatastoreKey.class)) {
      String message = String.format("Invalid type, %s, for Key field %s in class %s. ", type,
          fieldName, entityClass);
      throw new EntityManagerException(message);
    }
    KeyMetadata keyMetadata = new KeyMetadata(field);
    entityMetadata.setKeyMetadata(keyMetadata);
  }
1119962
public function process()
    {
        $this->processFields();

        $this->editableFields()->each(function (Field $field) {
            $field->placeholder($field->description());
            $field->setNewValue($this->getInput($field->elementName()));

            if ($field->hasValidNewValue()) {
                $field->applyFilter($this->query);
            }
        });

        if ($this->paginatorEnabled) {
            $this->paginator();
        }
    }
129895
public function process(MetadataInterface $metadata, $subject): void
    {
        $metadata->field = true;
        $metadata->fieldName = $subject->name ?? $metadata->name;
        $metadata->type = $subject->type;
        $metadata->multiple = $subject->multiple;
        $metadata->options = $subject->options;
        $metadata->lazy = $subject->lazy;
    }
1294146
protected function process()
    {

        // add the path => entity ID/store view code mapping
        $this->addPathEntityIdMapping($path = $this->getValue(ColumnKeys::PATH));
        $this->addPathStoreViewCodeMapping($path, $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN));

        // temporary persist the path
        $this->setLastPath($path);
    }
778085
protected function _process()
    {
        $name = $this->config('field');
        $this->value = $this->_registry->data($name);
        $this->_processed = true;
    }
1334664
def process_fields(self, field_names, depth):
        '''
        
        '''
        # List of field names in correct order.
        self.field_names = field_names
        # number of fields.
        self.num_fields = len(field_names)
        # Constrain depth.
        if (depth == 0) or (depth >= self.num_fields):
            self.depth = self.num_fields - 1
        else:
            self.depth = depth
94430
protected function processModuleFields()
    {
        $overrideCasts = array_get($this->overrides, 'attributes.casts', []);
        $removeCasts   = array_get($this->overrides, 'attributes.casts-remove', []);


        foreach ($this->module['fields'] as $fieldId => $fieldData) {

            $attributeName = $this->normalizeDb($fieldData['name']);
            $relationName  = camel_case($attributeName);

            switch ($fieldData['field_type_id']) {

                // references

                case FieldType::TYPE_REFERENCE:
                case FieldType::TYPE_REFERENCE_CROSS:
                case FieldType::TYPE_REFERENCE_NEGATIVE:

                    // add foreign key if it is different than the targeted model name
                    // (would break the convention) -- this is NOT necessary, since the convention
                    // for the CmsModel class is to use the relation name anyway!
                    //
                    // this only needs to be set if the relation name ends up being different
                    // from the relation name
                    //
                    // todo: so keep a close eye on the reversed relationships!
                    $keyName = null;
                    //if ($relationName !== studly_case($this->data->rawData['modules'][ $fieldData['refers_to_module'] ]['name'])) {
                    //    $keyName = $attributeName;
                    //}

                    // attribute names with numbers in them wreak havoc on the name conversion methods
                    // so always add the key for those
                    if (preg_match('#\d#', $relationName)) {
                        $keyName = $attributeName;
                    }

                    // in some weird cases, cmses have been destroyed by leaving in relationships
                    // that do not refer to any model; these should be skipped
                    if (empty($fieldData['refers_to_module'])) {
                        $this->context->log(
                            "Relation '{$relationName}', field #{$fieldId} does not refer to any module, skipped.",
                            Generator::LOG_LEVEL_ERROR
                        );
                        break;
                    }

                    $this->model['relationships']['normal'][ $relationName ] = [
                        'type'     => Generator::RELATIONSHIP_BELONGS_TO,    // reverse of hasOne
                        'model'    => $fieldData['refers_to_module'],
                        'single'   => ($fieldData['value_count'] == 1),
                        'count'    => $fieldData['value_count'],  // should always be 1 for single ref
                        'field'    => $fieldId,
                        'key'      => $keyName,
                        'negative' => ($fieldData['field_type_id'] == FieldType::TYPE_REFERENCE_NEGATIVE),
                        'special'  => CmsModel::RELATION_TYPE_MODEL,
                    ];

                    if (config('pxlcms.generator.models.hide_foreign_key_attributes')) {
                        $this->model['hidden'][] = $attributeName;
                    }
                    break;

                case FieldType::TYPE_REFERENCE_MANY:
                case FieldType::TYPE_REFERENCE_AUTOSORT:
                case FieldType::TYPE_REFERENCE_CHECKBOXES:

                    if (empty($fieldData['refers_to_module'])) {
                        $this->context->log(
                            "Relation '{$relationName}', field #{$fieldId} does not refer to any module, skipped.",
                            Generator::LOG_LEVEL_ERROR
                        );
                        break;
                    }

                    $this->model['relationships']['normal'][ $relationName ] = [
                        'type'     => Generator::RELATIONSHIP_BELONGS_TO_MANY,
                        'model'    => $fieldData['refers_to_module'],
                        'single'   => false,
                        'count'    => $fieldData['value_count'],    // 0 for no limit
                        'field'    => $fieldId,
                        'negative' => false,
                        'special'  => CmsModel::RELATION_TYPE_MODEL,
                    ];
                    break;


                // special references

                case FieldType::TYPE_IMAGE:
                case FieldType::TYPE_IMAGE_MULTI:
                    $this->model['relationships']['image'][ $relationName ] = [
                        'type'       => ($fieldData['value_count'] == 1)
                                            ? Generator::RELATIONSHIP_HAS_ONE
                                            : Generator::RELATIONSHIP_HAS_MANY,
                        'single'     => ($fieldData['value_count'] == 1),
                        'count'      => $fieldData['value_count'],
                        'field'      => $fieldId,
                        'translated' => (bool) $fieldData['multilingual'],
                        'resizes'    => $this->getImageResizesForField($fieldId),
                        'special'    => CmsModel::RELATION_TYPE_IMAGE,
                    ];
                    break;

                case FieldType::TYPE_FILE:
                    $this->model['relationships']['file'][ $relationName ] = [
                        'type'       => ($fieldData['value_count'] == 1)
                                            ? Generator::RELATIONSHIP_HAS_ONE
                                            : Generator::RELATIONSHIP_HAS_MANY,
                        'single'     => ($fieldData['value_count'] == 1),
                        'count'      => $fieldData['value_count'],
                        'field'      => $fieldId,
                        'translated' => (bool) $fieldData['multilingual'],
                        'special'    => CmsModel::RELATION_TYPE_FILE,
                    ];
                    break;

                case FieldType::TYPE_CHECKBOX:
                    $this->model['relationships']['checkbox'][ $relationName ] = [
                        'type'    => Generator::RELATIONSHIP_HAS_MANY,
                        'single'  => false,
                        'count'   => $fieldData['value_count'],
                        'field'   => $fieldId,
                        'special' => CmsModel::RELATION_TYPE_CHECKBOX,
                    ];
                    break;


                // normal fields

                case FieldType::TYPE_INPUT:
                case FieldType::TYPE_DROPDOWN:
                case FieldType::TYPE_LABEL:
                case FieldType::TYPE_COLORCODE:
                case FieldType::TYPE_TEXT:
                case FieldType::TYPE_TEXT_HTML_FLEX:
                case FieldType::TYPE_TEXT_HTML_RAW:
                case FieldType::TYPE_TEXT_HTML_FCK:
                case FieldType::TYPE_TEXT_HTML_ALOHA:
                case FieldType::TYPE_TEXT_LONG:
                case FieldType::TYPE_BOOLEAN:
                case FieldType::TYPE_INTEGER:
                case FieldType::TYPE_NUMERIC:
                case FieldType::TYPE_FLOAT:
                case FieldType::TYPE_DATE:
                case FieldType::TYPE_CUSTOM_HIDDEN:
                case FieldType::TYPE_CUSTOM:
                case FieldType::TYPE_SLIDER:
                case FieldType::TYPE_LOCATION:

                    switch ($fieldData['field_type_id']) {

                        case FieldType::TYPE_BOOLEAN:
                            $this->model['casts'][ $attributeName ] = 'boolean';
                            break;

                        case FieldType::TYPE_INTEGER:
                        case FieldType::TYPE_SLIDER:
                            $this->model['casts'][ $attributeName ] = 'integer';
                            break;

                        case FieldType::TYPE_NUMERIC:
                        case FieldType::TYPE_FLOAT:
                            $this->model['casts'][ $attributeName ] = 'float';
                            break;

                        case FieldType::TYPE_DATE:
                            if ( ! array_key_exists($attributeName, $overrideCasts)) {
                                $this->model['dates'][] = $attributeName;
                            }
                            break;

                        case FieldType::TYPE_LOCATION:
                            $this->model['casts'][ $attributeName ] = 'array';
                            break;

                        // default omitted on purpose
                    }

                    if ($fieldData['multilingual']) {
                        $this->model['is_translated']           = true;
                        $this->model['translated_attributes'][] = $attributeName;
                        $this->model['translated_fillable'][]   = $attributeName;
                    } else {
                        $this->model['normal_attributes'][] = $attributeName;
                        $this->model['normal_fillable'][]   = $attributeName;
                    }

                    // if a default is set, store it
                    if (    $fieldData['default'] !== null
                        &&  $fieldData['default'] !== ''
                    ) {

                        $default = "'" . $fieldData['default'] . "'";

                        if (array_key_exists($attributeName, $this->model['casts'])) {

                            switch ($this->model['casts'][ $attributeName ]) {

                                case 'boolean':
                                    $default = ($fieldData['default'] == '1' || $fieldData['default'] == 'true') ? 'true' : 'false';
                                    break;

                                case 'integer':
                                case 'float':
                                    $default = $fieldData['default'];
                                    break;

                                // default omitted on purpose
                            }
                        }

                        $this->model['defaults'][ $attributeName ] = $default;
                    }

                    break;

                case FieldType::TYPE_RANGE:
                default:
                    throw new Exception(
                        "Unknown/unhandled field type {$fieldData['field_type_id']} "
                        . "({$fieldData['field_type_name']})"
                    );
            }
        }

        // force hidden override
        if (count($this->model['hidden']) && ! count($this->overrideHidden)) {

            $this->model['hidden'] = array_merge(
                $this->model['hidden'],
                config('pxlcms.generator.models.default_hidden_fields', [])
            );
        }


        // clear, set or remove fillable attributes by override
        if (array_get($this->overrides, 'attributes.fillable-empty')) {

            $this->model['normal_fillable']     = [];
            $this->model['translated_fillable'] = [];

        } elseif ($overrideFillable = array_get($this->overrides, 'attributes.fillable', [])) {

            $this->model['normal_fillable']     = $overrideFillable;
            $this->model['translated_fillable'] = [];

        } elseif ($removeFillable = array_get($this->overrides, 'attributes.fillable-remove', [])) {

            $this->model['normal_fillable']     = array_diff($this->model['normal_fillable'], $removeFillable);
            $this->model['translated_fillable'] = array_diff($this->model['translated_fillable'], $removeFillable);
        }


        // force casts as overridden
        foreach ($overrideCasts as $attributeName => $type) {
            if (array_key_exists($attributeName, $this->model['casts'])) {
                $this->model['casts'][ $attributeName ] = $type;
            }
        }

        foreach ($removeCasts as $attributeName) {
            if (array_key_exists($attributeName, $this->model['casts'])) {
                unset ($this->model['casts'][ $attributeName ]);
            }
        }

        // enable timestamps?
        if (    config('pxlcms.generator.models.enable_timestamps_on_models_with_suitable_attributes')
            &&  in_array('created_at', $this->model['dates'])
            &&  in_array('updated_at', $this->model['dates'])
        ) {
            $this->model['timestamps'] = true;
        }
    }
368854
private void marshalEmbeddedFields() {
    for (EmbeddedMetadata embeddedMetadata : entityMetadata.getEmbeddedMetadataCollection()) {
      if (embeddedMetadata.getStorageStrategy() == StorageStrategy.EXPLODED) {
        marshalWithExplodedStrategy(embeddedMetadata, entity);
      } else {
        ValueBuilder<?, ?, ?> embeddedEntityBuilder = marshalWithImplodedStrategy(embeddedMetadata,
            entity);
        if (embeddedEntityBuilder != null) {
          entityBuilder.set(embeddedMetadata.getMappedName(), embeddedEntityBuilder.build());
        }
      }
    }

  }