Gets the value of a custom field, null if not set.

@param object $owningEntity
@param string $key

@return mixed
327573
public static function getValue($owningEntity, $key)
    {
        $entity = $owningEntity->getNonemptyCustomFields()->get($key);

        if ($entity) {
            $value = $entity->getValue();
        } else {
            self::checkCustomFieldExists($owningEntity, $key);
            $value = null;
        }

        return $value;
    }
1153036
protected function getDefaultValue(\Asgard\Entity\Entity $entity, $name, $property, $locale) {
		if($entity->get($name, $locale) !== null)
			return $entity->get($name, $locale);
	}
632338
public static function setValue($owningEntity, $key, $value)
    {
        if (!$value) {
            self::remove($owningEntity, $key);

            return;
        }
        $field = self::getField($owningEntity, $key);
        if (is_null($field)) {
            $field = self::createNewEntity($owningEntity, $key);
        }
        $field->setValue($value);
        self::setField($owningEntity, $key, $field);
    }
881455
private function prepEntity(TokenEntity $tokenEntity, ProfileEntity $profileEntity) {
        if(!$tokenEntity->issuer_url && $profileEntity->issuer_url) {
            $tokenEntity->issuer_url = $profileEntity->issuer_url;
            //$tokenEntity->issuer_url = EnvService::getUrl(API, 'v1/auth');
        }
        /*$userId = ArrayHelper::getValue($tokenEntity, 'subject.id');
        if($userId) {
            if(!$tokenEntity->subject_url) {
                $tokenEntity->subject_url = EnvService::getUrl(API, 'v1/user/' . $userId);
            }
        }*/
    }
1205327
protected function loadEntity($key)
    {
        $content = $this->getFileManager()->read($key);
        if($content) {
            return unserialize($content);
        }
        
        return null;
    }
233908
public function get($field_key)
	{
		if ( isset($this->fields[$field_key]) ) {
			return $this->fields[$field_key];
		}

		return null;
	}
179895
private static function getEntityProValue($entity, string $proName)
    {
        $tmpNodes     = \explode('_', $proName);
        $tmpNodes     = \array_map(function ($word) {
            return \ucfirst($word);
        }, $tmpNodes);
        $proName      = \implode('', $tmpNodes);
        $getterMethod = 'get' . $proName;

        if (!\method_exists($entity, $getterMethod)) {
            throw new \InvalidArgumentException('Entity object property getter method does not exist, properName=' . $proName);
        }

        return $entity->$getterMethod();
    }
773816
public function get($key, $defaultValue = null)
    {
        $rawValue = $this->getEnvironmentVariable($key);

        return $this->getValue($rawValue, $defaultValue);
    }
70354
protected IEntity getEntityFromCache(String key) throws CachingException {
        return (IEntity)
                EntityCachingService.instance().get(ICompositeGroupService.LEAF_ENTITY_TYPE, key);
    }
10005
public function getProperty($key, $defaultValue = null)
    {
        if (empty($this->properties[$key])) {
            return $defaultValue;
        }

        return $this->properties[$key];
    }
834532
protected function getKeys(array $entities, $key = null)
    {
        if (is_null($key)) {
            $key = $this->relatedMap->getKeyName();
        }

        $host = $this;

        return array_unique(array_values(array_map(function ($value) use ($key, $host) {
            if (!$value instanceof InternallyMappable) {
                $value = $host->factory->make($value);
            }

            return $value->getEntityAttribute($key);
        }, $entities)));
    }
646730
public function getValueByKey($key)
    {
        $model = Configuration::whereConfigurationKey($key)->first();

        if (null === $model) {
            return null;
        }

        return $model->configuration_value;
    }
850358
public function get(string $key, $field = null)
    {
        return null !== $field ? $this->getTable()->get($key, $field) : $this->getTable()->get($key);
    }
289540
private function getValue(
        string $path,
        $object,
        NormalizerContextInterface $context,
        NormalizerInterface $normalizer = null
    ) {
        if (null !== $this->accessor) {
            return $this->accessor->getValue($object);
        }

        return $this->fieldNormalizer->normalizeField($path, $object, $context, $normalizer);
    }
590625
public static function getValue($object, $propertyName)
    {
        $metadata = self::$entityManager->getClassMetadata(get_class($object));

        if (!$metadata->hasField($propertyName)) {
            throw new \InvalidArgumentException(
                'The class "' . get_class($object) . '" does not have the property "' . $propertyName . '"'
            );
        }

        return $metadata->getFieldValue($object, $propertyName);
    }
472949
protected function getPropertyValue($entity, $propertyPath)
    {
        try {
            if (!$this->propertyAccessor->isReadable($entity, $propertyPath)) {
                $message = sprintf(
                    'Unable to get value of "%s::$%s" property: it is not readable.',
                    ClassUtils::getClass($entity),
                    $propertyPath
                );

                throw new WidgetException($message);
            }
        } catch (TranslatableException $ex) {
            $message = sprintf(
                'Unable to get value of "%s::$%s" property: %s',
                ClassUtils::getClass($entity),
                $propertyPath,
                lcfirst($ex->getMessage())
            );

            throw new WidgetException($message);
        }

        return $this->propertyAccessor->getValue($entity, $propertyPath);
    }
24193
public function get(string $key, $defaultValue = null)
    {
        $key = $this->prepareKey($key);
        return Arr::get($this->properties, $key, $defaultValue);
    }