Output a value. Give it the name of the group. In case of "default" return false.

@param array $submitvalues values submitted.
@param bool $assoc specifies if returned array is associative
@return array
180828
public function exportValue(&$submitvalues, $assoc = false) {
        $valuearray = array();
        foreach ($this->_elements as $element) {
            $thisexport = $element->exportValue($submitvalues[$this->getName()], true);
            if ($thisexport != null) {
                $valuearray += $thisexport;
            }
        }
        if (empty($valuearray['customize'])) {
            return $this->_prepareValue(false, $assoc);
        }
        return array_key_exists('value', $valuearray) ? $this->_prepareValue($valuearray['value'], $assoc) : [];
    }
733221
private function getManyToManyStatement(array $assoc, $sourceEntity, $offset = null, $limit = null)
    {
        $this->switchPersisterContext($offset, $limit);

        $sourceClass    = $this->em->getClassMetadata($assoc['sourceEntity']);
        $class          = $sourceClass;
        $association    = $assoc;
        $criteria       = array();
        $parameters     = array();

        if ( ! $assoc['isOwningSide']) {
            $class       = $this->em->getClassMetadata($assoc['targetEntity']);
            $association = $class->associationMappings[$assoc['mappedBy']];
        }

        $joinColumns = $assoc['isOwningSide']
            ? $association['joinTable']['joinColumns']
            : $association['joinTable']['inverseJoinColumns'];

        $quotedJoinTable = $this->quoteStrategy->getJoinTableName($association, $class, $this->platform);

        foreach ($joinColumns as $joinColumn) {

            $sourceKeyColumn    = $joinColumn['referencedColumnName'];
            $quotedKeyColumn    = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);

            switch (true) {
                case $sourceClass->containsForeignIdentifier:
                    $field = $sourceClass->getFieldForColumn($sourceKeyColumn);
                    $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);

                    if (isset($sourceClass->associationMappings[$field])) {
                        $value = $this->em->getUnitOfWork()->getEntityIdentifier($value);
                        $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
                    }

                    break;

                case isset($sourceClass->fieldNames[$sourceKeyColumn]):
                    $field = $sourceClass->fieldNames[$sourceKeyColumn];
                    $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);

                    break;

                default:
                    throw MappingException::joinColumnMustPointToMappedField(
                        $sourceClass->name, $sourceKeyColumn
                    );
            }

            $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value;
            $parameters[] = array(
                'value' => $value,
                'field' => $field,
                'class' => $sourceClass,
            );
        }

        $sql = $this->getSelectSQL($criteria, $assoc, null, $limit, $offset);
        list($params, $types) = $this->expandToManyParameters($parameters);

        return $this->conn->executeQuery($sql, $params, $types);
    }
952144
public function postProcessFormValues(array $formValues)
    {
        if (empty($formValues['defaultDeploymentPath']) === false) {
            $this->distributionSettings = Arrays::setValueByPath(
                $this->distributionSettings,
                'Lightwerk.SurfCaptain.frontendSettings.defaultDeploymentPath',
                $formValues['defaultDeploymentPath']
            );
        }
        if (empty($formValues['defaultUser']) === false) {
            $this->distributionSettings = Arrays::setValueByPath(
                $this->distributionSettings,
                'Lightwerk.SurfCaptain.frontendSettings.defaultUser',
                $formValues['defaultUser']
            );
        }
        $this->configurationSource->save(
            FLOW_PATH_CONFIGURATION . ConfigurationManager::CONFIGURATION_TYPE_SETTINGS,
            $this->distributionSettings
        );
    }
240497
function exportValue(&$submitValues, $assoc = false)
    {
        $value = $this->_findValue($submitValues);
        if (is_null($value)) {
            $value = $this->getValue();
        } elseif(!is_array($value)) {
            $value = array($value);
        }
        if (is_array($value) && !empty($this->_options)) {
            $cleanValue = null;
            foreach ($value as $v) {
                for ($i = 0, $optCount = count($this->_options); $i < $optCount; $i++) {
                    if ($v == $this->_options[$i]['attr']['value']) {
                        $cleanValue[] = $v;
                        break;
                    }
                }
            }
        } else {
            $cleanValue = $value;
        }
        if (is_array($cleanValue) && !$this->getMultiple()) {
            return $this->_prepareValue($cleanValue[0], $assoc);
        } else {
            return $this->_prepareValue($cleanValue, $assoc);
        }
    }
1355209
private function searchValue(array $values = [], array $requestInputs = []) {
    foreach($values as $value) {
      if (!array_key_exists($value, $requestInputs)) {
        continue;
      }

      return $requestInputs[$value];
    }
    
    return null;
  }
588605
public function postProcessFormValues(array $formValues)
    {
        $this->distributionSettings = Arrays::setValueByPath($this->distributionSettings, 'Neos.Flow.persistence.backendOptions.driver', $formValues['driver']);
        $this->distributionSettings = Arrays::setValueByPath($this->distributionSettings, 'Neos.Flow.persistence.backendOptions.dbname', $formValues['dbname']);
        $this->distributionSettings = Arrays::setValueByPath($this->distributionSettings, 'Neos.Flow.persistence.backendOptions.user', $formValues['user']);
        $this->distributionSettings = Arrays::setValueByPath($this->distributionSettings, 'Neos.Flow.persistence.backendOptions.password', $formValues['password']);
        $this->distributionSettings = Arrays::setValueByPath($this->distributionSettings, 'Neos.Flow.persistence.backendOptions.host', $formValues['host']);
        // Postgres natively supports multibyte-UTF8. It does not know utf8mb4, which is the default now
        if ($formValues['driver'] === 'pdo_pgsql') {
            $this->distributionSettings = Arrays::setValueByPath($this->distributionSettings, 'Neos.Flow.persistence.backendOptions.charset', 'utf8');
        }
        $this->configurationSource->save(FLOW_PATH_CONFIGURATION . ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->distributionSettings);

        $this->configurationManager->refreshConfiguration();

        $settings = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow');
        $connectionSettings = $settings['persistence']['backendOptions'];
        try {
            $this->connectToDatabase($connectionSettings);
        } catch (\Exception $exception) {
            if (!$exception instanceof DBALException && !$exception instanceof \PDOException) {
                throw $exception;
            }
            try {
                $this->createDatabase($connectionSettings, $formValues['dbname']);
            } catch (DBALException $exception) {
                throw new SetupException(sprintf('Database "%s" could not be created. Please check the permissions for user "%s". DBAL Exception: "%s"', $formValues['dbname'], $formValues['user'], $exception->getMessage()), 1351000841, $exception);
            } catch (\PDOException $exception) {
                throw new SetupException(sprintf('Database "%s" could not be created. Please check the permissions for user "%s". PDO Exception: "%s"', $formValues['dbname'], $formValues['user'], $exception->getMessage()), 1346758663, $exception);
            }
            try {
                $this->connectToDatabase($connectionSettings);
            } catch (DBALException $exception) {
                throw new SetupException(sprintf('Could not connect to database "%s". Please check the permissions for user "%s". DBAL Exception: "%s"', $formValues['dbname'], $formValues['user'], $exception->getMessage()), 1351000864);
            } catch (\PDOException $exception) {
                throw new SetupException(sprintf('Could not connect to database "%s". Please check the permissions for user "%s". PDO Exception: "%s"', $formValues['dbname'], $formValues['user'], $exception->getMessage()), 1346758737);
            }
        }

        $migrationExecuted = Scripts::executeCommand('neos.flow:doctrine:migrate', $settings, false);
        if ($migrationExecuted !== true) {
            throw new SetupException(sprintf('Could not execute database migrations. Please check the permissions for user "%s" and execute "./flow neos.flow:doctrine:migrate" manually.', $formValues['user']), 1346759486);
        }

        $this->resetPolicyRolesCacheAfterDatabaseChanges();
    }
1319342
public function getIncludable(bool $assoc = false): array
	{
		if ($this->includable === self::ALLOW_ALL) {
			return self::ALLOW_ALL;
		}

		return $assoc ? $this->includable : array_keys($this->includable);
	}
935771
public function plugin_data_preprocessing(&$defaultvalues) {
        foreach ($this->submissionplugins as $plugin) {
            if ($plugin->is_visible()) {
                $plugin->data_preprocessing($defaultvalues);
            }
        }
        foreach ($this->feedbackplugins as $plugin) {
            if ($plugin->is_visible()) {
                $plugin->data_preprocessing($defaultvalues);
            }
        }
    }
615814
private function getAttributeValues($attribute, $attributeValues)
    {
        $values = [];
        foreach ($attributeValues as $attributeValue) {
            if ($attribute['id'] == $attributeValue['attributeId']) {
                $values[] = $attributeValue;
            }
        }

        return $values;
    }
1370900
function fromAssociativeResultArray($values) {
		foreach (static::$_columns as $column_name => &$type) {
			if (array_key_exists($column_name, $values)) {
				$this->{$column_name} = $values[$column_name];
			}
		}
		if (static::$_primaryKeys && !$this->hasPrimaryKeyValues()) {
			return false;
		}
		$this->castInts();
		$this->setNew(false);
		return true;
	}
5070
public function getPostData($assoc = false)
    {
        $postData = $this->request->getJsonRawBody($assoc);

        if (!is_object($postData) && !$assoc) {
            return new stdClass();
        }

        if (!is_array($postData) && $assoc) {
            return [];
        }

        return $postData;
    }
559409
public static function createRedirectFromPostValues($postValues)
    {
        if (isset($postValues['title'], $postValues['fromUrl'], $postValues['toUrl'])) {
            $redirectObject = new \stdClass();
            $redirectObject->title = $postValues['title'];
            $redirectObject->slug = StringUtil::slugify($postValues['title']);
            $redirectObject->fromUrl = $postValues['fromUrl'];
            $redirectObject->toUrl = $postValues['toUrl'];
            $redirectObject->type = $postValues['type'];

            return $redirectObject;
        } else {
            throw new \Exception('Trying to create valuelist with invalid data.');
        }
    }
694440
public function exportValue(&$submitted, $assoc = false) {

        $value = '';
        $filetypeselement = null;

        foreach ($this->_elements as $key => $element) {
            if ($element->_attributes['name'] === 'filetypes') {
                $filetypeselement = $this->_elements[$key];
            }
        }

        if ($filetypeselement) {
            $formval = $filetypeselement->exportValue($submitted[$this->getName()], false);
            if ($formval) {
                $value = $this->util->normalize_file_types($formval);
                if ($value === ['*'] && !$this->allowall) {
                    $value = [];
                }
                $value = implode(',', $value);
            }
        }

        return $this->_prepareValue($value, $assoc);
    }
122585
public function getAssocColumn($table, $columnName, $defaultValue = null)
    {
        $values = [];
        foreach ($table as $key => $line) {
            if (array_key_exists($columnName, $line)) {
                $values[$key] = $line[$columnName];
            } else {
                $values[$key] = $defaultValue;
            }
        }

        return $values;
    }
876003
public function getJsonResponse($assoc = true)
    {
        //argument 1 must be a boolean
        Argument::i()->test(1, 'bool');

        $this->meta['response'] = $this->getResponse();
        return json_decode($this->meta['response'], $assoc);
    }
998997
public function Validate($FormPostValues) {
      $this->Validation->ApplySchema($this->Data);
      // Validate the form posted values
      return $this->Validation->Validate($FormPostValues);
   }
32123
public static function createUserFromPostValues($postValues)
    {
        if (isset($postValues['username'])) {
            $user = new \stdClass();
            $user->username = $postValues['username'];
            $user->slug = StringUtil::slugify($postValues['username']);
            $user->rights = array();
            if (isset($postValues['rights'])) {
                $user->rights = $postValues['rights'];
            }

            if (isset($postValues['password']) && empty($postValues['password']) === false) {
                $crypt = new Crypt();
                $user->password = $crypt->encrypt($postValues['password'], 16);
                $user->salt = $crypt->getLastSalt();
            } else {
                $user->password = $postValues['passHash'];
                $user->salt = $postValues['salt'];
            }

            return $user;
        } else {
            throw new \Exception('Trying to create user with invalid data.');
        }
    }