Get profile field.

@return \Assely\Input\Input|\Assely\Profile\Profile
961497
public function getField()
    {
        $singularity = $this->profile->getSingularity();

        if (isset($singularity)) {
            return $this->profile->getFields()->find($this->path);
        }

        return $this->profile;
    }
243993
public function getUser()
    {
        if ($user = $this->provider->getUser()) {
            return ($field = $this->field) ? (string) $user->{$field} : $user->getLogin();
        }
    }
303233
public function getModel()
    {
        if (!$this->model) {
            $this->model = $this->add($this->model_name);
        }
        /** @type Model $this->model */
        if ($this->display_field) {
            $this->model->title_field = $this->display_field;
        }
        if ($this->table_alias) {
            $this->model->table_alias = $this->table_alias;
        }

        return $this->model;
    }
628266
public function field()
    {
        if (strpos($this->wrappedObject->key, '_id')) {
            return str_replace('_id', '', $this->wrappedObject->key);
        }

        return $this->wrappedObject->key;
    }
604337
public function getFields()
    {
        $fields = FieldList::create($this->fields);
        
        foreach ($fields as $field) {
            
            $fields->insertAfter(
                $field->getName(),
                LiteralField::create(
                    sprintf('%s_ByLiteral', $field->getName()),
                    '<div class="by"><span class="icon"></span></div>'
                )
            );
            
        }
        
        return $fields;
    }
791734
public function profileGetFieldValue($field_name, ProfileInterface $user_profile = NULL) {
    if ($user_profile === NULL) {
      return '';
    }

    try {
      $value = $user_profile->get($field_name)->value;
    }
    catch (\Exception $e) {
      $value = '';
    }
    return $value;
  }
848201
public function getValue()
    {
        $value = $this->getField('Value');
        if (empty($value) && !self::allow_empty_values()) {
            return $this->Title;
        }
        return $value;
    }
1110984
public function getMetaFieldConfig()
    {
        // Obtain Default Config:
        
        $config = Config::inst()->get(self::class, 'default_meta_fields');
        
        // Merge Owner Config:
        
        if (is_array($this->owner->config()->meta_fields)) {
            $config = array_merge($config, $this->owner->config()->meta_fields);
        }
        
        // Answer Config:
        
        return $config;
    }
764937
private function GetProfileFields() {
      $Fields = C('ProfileExtender.Fields', array());

      if (!is_array($Fields))
         $Fields = array();

      // Data checks
      foreach ($Fields as $Name => $Field) {
         // Require an array for each field
         if (!is_array($Field) || strlen($Name) < 1) {
            unset($Fields[$Name]);
            //RemoveFromConfig('ProfileExtender.Fields.'.$Name);
         }

         // Verify field form type
         if (!isset($Field['FormType']))
            $Fields[$Name]['FormType'] = 'TextBox';
         elseif (!array_key_exists($Field['FormType'], $this->FormTypes))
            unset($this->ProfileFields[$Name]);
      }

      return $Fields;
   }
153432
public function getProfile(): Profile
    {
        if (is_null($this->profile)) {
            $this->profile = new Profile($this);
        }

        return $this->profile;
    }
859367
public function get_profile_fields($field = null, $default = null)
	{
		// collect all meta data
		$profile_fields = array();

		foreach ($this->user->metadata as $metadata)
		{
			if (empty($field))
			{
				$profile_fields[$metadata->key] = $metadata->value;
			}
			elseif ($field == $metadata->key)
			{
				return $metadata->value;
			}
		}

		// return the connected data
		return empty($profile_fields) ? $default : $profile_fields;
	}
849641
public function getAttributes()
    {
        $interfaces = $this->interfaces();

        $attributes = array_merge(
            $this->attributes(),
            [
                'fields' => function () {
                    return $this->getFields();
                },
            ]
        );

        if (!empty($interfaces)) {
            $attributes['interfaces'] = $interfaces;
        }

        return $attributes;
    }
285010
public function profile()
    {
        $user = $this->Users->get($this->Auth->user('id'));

        if ($this->request->is('put') && !empty($this->request->data)) {
            /** @var User $user */
            $user = $this->Users->patchEntity($user, $this->request->data);
            if ($this->Users->save($user)) {
                $this->Auth->setUser(Hash::merge($this->Auth->user(), $user->toArray()));
                $this->Flash->success(__d('wasabi_core', 'Your profile has been updated.'));
                $this->redirect(['action' => 'profile']);
                return;
            } else {
                $this->Flash->error($this->formErrorMessage);
            }
        }

        $this->set([
            'user' => $user,
            'languages' => Hash::map(Configure::read('languages.backend'), '{n}', function ($language) {
                return [
                    'value' => $language->id,
                    'text' => $language->name
                ];
            })
        ]);
    }
1326821
public function getValue()
    {
        $data      = $this->queryAttributes($this->model);
        $fieldData = FieldData::query()->where($data)->first(['data']);
        return !is_null($fieldData) ? $fieldData->data : null;
    }
1367665
public function actionProfile()
    {
        $model = UserProfile::findOne(['user_id' => Yii::$app->user->identity->getId()]);
        if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
            Yii::$app->response->format = Response::FORMAT_JSON;
            return ActiveForm::validate($model);
        }
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Your profile has been updated'));
            return $this->refresh();
        }
        return $this->render('profile', [
            'model' => $model,
        ]);
    }
885231
public function getFieldValue()
    {
        $field_name = $this->field->getAttribute('field_name');

        $oldInput = app('session')->getOldInput($this->getPrefixedFieldName());

        if ($oldInput === null) {
            if ($this->model) {
                $value = $this->model->getAttribute($field_name);

                if ($value !== null) {
                    return $value;
                }
            }

            return $this->field->getAttribute('value');
        }

        return $oldInput;
    }
1210032
public function getReportField()
    {
        /** @var GridField $gridField */
        $gridField = parent::getReportField();
        $gridField->setModelClass(self::class);
        $gridConfig = $gridField->getConfig();
        $gridConfig->removeComponentsByType([GridFieldPrintButton::class, GridFieldExportButton::class]);
        $gridConfig->addComponents(
            new GridFieldPrintReportButton('buttons-before-left'),
            new GridFieldExportReportButton('buttons-before-left')
        );
        return $gridField;
    }