@param MetaSetField $field

@return null|array
421932
public function resolve(MetaSetField $field)
    {
        $type = $field->getType();

        if ($type === 'select') {
            $options = [];
            foreach (explode(',', $field->getOptions()) as $value) {
                $option = [$value];

                $translationIdentifier = $value;
                if ($this->useTitlePrefix) {
                    $translationIdentifier = $field->getMetaSet()->getName().'.'.$translationIdentifier;
                }

                foreach ($this->languages as $language) {
                    $option[] = $this->translator->trans($translationIdentifier, [], $this->domain, $language);
                }

                $options[] = $option;
            }

            return $options;
        } elseif ($type === 'suggest') {
            $dataSourceId = $field->getOptions();
            $options = [
                'source_id' => $dataSourceId,
            ];

            return $options;
        }

        return null;
    }
271176
protected function getValue($field) {
		$value = null;
		$readField = 'get'.$field;

		foreach($this->readProfiles as $profile) {
			
			$value = $profile->$readField();
			if($value !== null) {
				$this->setValue($field, $value);
				break;
			}
		}
		

		return $value;
	}
1243158
public function mapFromField($toField)
    {
        if (false !== $key = array_search($toField, $this->mapping)) {
            return $key;
        }

        return null;
    }
115415
private function convertToCustomField($field)
    {
        if (!empty($field->attributes())) {
            if (isset($field->attributes()->{'field-name'}) && isset($field->attributes()->{'field-value'})) {
                $rawName = (string)$field->attributes()->{'field-name'};
                list($normalizedName, $prefix) = $this->splitFieldNameAndPrefix($rawName);
                $value = (string)$field->attributes()->{'field-value'};
                if (!empty($normalizedName)) {
                    return new CustomField($normalizedName, $value, $prefix);
                }
            }
        }
        return null;
    }
1143073
public function getFieldValue($field, $data = null)
    {
        if ($data !== null && isset($data[$field])) {
            return $data[$field];
        }
        if (isset($this->{$field})) {
            return $this->{$field};
        }
        return null;
    }
392926
public function add($field, SectionInterface $section = null): MetaboxInterface
    {
        if ($field instanceof SectionInterface) {
            $section = $field;

            if ($section->hasItems()) {
                foreach ($section->getItems() as $item) {
                    /** @var FieldTypeInterface $item */
                    $item->setOptions([
                        'group' => $section->getId()
                    ]);

                    $this->add($item, $section);
                }
            }

            return $this;
        }

        $field->setLocale($this->getLocale());
        $field->setPrefix($this->getPrefix());

        if (is_null($section)) {
            if ($this->repository()->hasGroup($field->getOption('group'))) {
                $section = $this->repository()->getGroup($field->getOption('group'));
            } else {
                $section = new Section($field->getOption('group'));
            }
            $section->addItem($field);
        }

        $this->repository()->addField($field, $section);

        return $this;
    }
1229563
def meta_get(self, key, metafield, default=None):
        '''  '''
        return self._meta.get(key, {}).get(metafield, default)
992014
public function setField($field = null)
    {
        $this->field = null;

        if (!$field = $this->internalResolveField($field)) {
            $this->field = $this->fieldId = null;
        } else {
            $this->fieldId = $field->id;
            $this->field = $field;
        }

        return $this;
    }
967051
public function getField($field)
	{
		$result = $this->client->get("fields/{$field}");
		return $result ? new Resources\Field($this, $result) : null;
	}
472686
final public function getRowFieldValue($field)
    {

        //If value exists;
        if (array_key_exists($field, $this->schema)) {
            return $this->schema[$field]->Value;
        }
        return null;
    }
1093917
protected function _schemaDefault($field)
    {
        $field = $this->_form->schema()->field($field);
        if ($field) {
            return $field['default'];
        }

        return null;
    }
1316740
private function getRelation($field)
    {
        $relations = $this->getRelations();
        return isset($relations[$field]) ? $relations[$field] : null;
    }
905770
protected function isValidField(ClassMetadataInfo $meta, $field)
    {
        $mapping = $meta->getFieldMapping($field);

        if (!$mapping || !in_array($mapping['type'], $this->validTypes)) {
            throw new InvalidArgumentException('Sluggable field is not a valid field type');
        }

        return true;
    }
241518
def __meta_metadata(self, field, key):
        """"""
        mf = ''
        try:
            mf = str([f[key] for f in self.metadata
                     if f['field_name'] == field][0])
        except IndexError:
            print("%s not in metadata field:%s" % (key, field))
            return mf
        else:
            return mf
1063458
def get_meta_fields(self, fields, kwargs={}):
        '''
        
        '''
        fields = to_list(fields)
        meta = self.get_meta()
        return {field: meta.get(field) for field in fields}
846180
public function addMetaField(array $fields)
    {
        $this->setMeta($this->constructFieldMeta($fields));
        $fields[static::Meta] = array(
            'type' => 'hidden',
            'value' => json_encode($this->getMeta()),
        );
        return $fields;
    }
1088165
private function getTypes($field, $value, ClassMetadata $class)
    {
        $property = $class->getProperty($field);
        $types    = [];

        switch (true) {
            case $property instanceof FieldMetadata:
                $types = array_merge($types, [$property->getType()]);
                break;

            case $property instanceof AssociationMetadata:
                $class = $this->em->getClassMetadata($property->getTargetEntity());

                if (! $property->isOwningSide()) {
                    $property = $class->getProperty($property->getMappedBy());
                    $class    = $this->em->getClassMetadata($property->getTargetEntity());
                }

                $joinColumns = $property instanceof ManyToManyAssociationMetadata
                    ? $property->getJoinTable()->getInverseJoinColumns()
                    : $property->getJoinColumns();

                foreach ($joinColumns as $joinColumn) {
                    /** @var JoinColumnMetadata $joinColumn */
                    $referencedColumnName = $joinColumn->getReferencedColumnName();

                    if (! $joinColumn->getType()) {
                        $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
                    }

                    $types[] = $joinColumn->getType();
                }

                break;

            default:
                $types[] = null;
                break;
        }

        if (is_array($value)) {
            return array_map(static function ($type) {
                return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
            }, $types);
        }

        return $types;
    }