Returns the generated value to be inserted into DB for this field

@param array $data
@return string
19980
public function generate(array $data): string
    {
        /** @var RecordFinder $recordFinder */
        $recordFinder = GeneralUtility::makeInstance(RecordFinder::class);
        $demoImages = $recordFinder->findDemoFileObjects();
        $recordData = [];
        foreach ($demoImages as $demoImage) {
            $newId = StringUtility::getUniqueId('NEW');
            $recordData['sys_file_reference'][$newId] = [
                'table_local' => 'sys_file',
                'uid_local' => $demoImage->getUid(),
                'uid_foreign' => $data['fieldValues']['uid'],
                'tablenames' => $data['tableName'],
                'fieldname' => $data['fieldName'],
                'pid' => $data['fieldValues']['pid'],
            ];
        }
        if (!empty($recordData)) {
            // Populate page tree via recordDataHandler
            /** @var DataHandler $dataHandler */
            $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
            $dataHandler->start($recordData, []);
            $dataHandler->process_datamap();
        }
        return (string)count($demoImages);
    }
1269249
private function getChanges(array $data)
    {
        $changes = [
            'inserted' => Arr::dot($data),
            'updated'  => [],
            'deleted'  => [],
        ];

        foreach ($this->newQuery()->pluck($this->keyColumn) as $key) {
            if (Arr::has($changes['inserted'], $key))
                $changes['updated'][$key] = $changes['inserted'][$key];
            else
                $changes['deleted'][] = $key;

            Arr::forget($changes['inserted'], $key);
        }

        return $changes;
    }
1205611
public function saveRawData( array $data )
    {
        if ( ! parent::save( $data ) )
        {
            return null;
        }

        return isset( $data['id'] ) ? $data['id'] : null;
    }
397002
public function generate(array $data): string
    {
        /** @var RecordFinder $recordFinder */
        $recordFinder = GeneralUtility::makeInstance(RecordFinder::class);
        return implode(',', $recordFinder->findUidsOfDemoBeUsers());
    }
241272
public static function valueTrim(array $data)
    {
        if (is_scalar($data)) {
            return trim($data);
        }

        array_walk_recursive($data, function (&$value) {
            $value = trim($value);
        });

        return $data;
    }
569039
private function convertData(array $data = null)
    {
        if (!is_array($data)) {
            return $data;
        }

        foreach ($data as $key => $val) {
            /** convert dbrefs */
            if (is_array($val) && isset($val['$ref']) && isset($val['$id'])) {
                $data[$key] = $this->convertData(
                    $this->resolveObject($val['$ref'], $val['$id'])
                );
            } elseif (is_array($val)) {
                $data[$key] = $this->convertData($val);
            }
            /** convert mongodate to text dates **/
            if ($val instanceof \MongoDate) {
                $data[$key] = $this->dateConverter->formatDateTime($val->toDateTime());
            }
            /** convert mongoid */
            if ($val instanceof \MongoId) {
                $data[$key] = (string) $val;
            }
        }

        return $data;
    }
1215607
public static function createSelectString(array $data) : string
    {
        if (isset($data[0])) {
            $data = $data[0];
        }

        return implode(',', array_keys($data));
    }
549870
public function resolve(array $data): FieldGeneratorInterface
    {
        $generator = NULL;
        foreach ($this->fieldValueGenerators as $fieldValueGenerator) {
            $generator = GeneralUtility::makeInstance($fieldValueGenerator);
            if (!$generator instanceof FieldGeneratorInterface) {
                throw new Exception(
                    'Field value generator ' . $fieldValueGenerator . ' must implement FieldGeneratorInterface',
                    1457693564
                );
            }
            if ($generator->match($data)) {
                break;
            } else {
                $generator = null;
            }
        }
        if (is_null($generator)) {
            throw new GeneratorNotFoundException(
                'No generator found',
                1457873493
            );
        }
        return $generator;
    }
1202213
public function insert(array $data) {
		$data = $this->filterFields($data, $this->_allowed_insert_fields);
		$data['created_at'] = Factory::load('\datetime')->format('Y-m-d H:i:s');

		return $this->_db->insertSafe($this->_table, $data);
	}
456037
public function generate(array $data): string
    {
        // Nothing by default
        $value = '';
        // Set second value selected if there is more than one item
        if (isset($data['fieldConfig']['config']['items'])
            && is_array($data['fieldConfig']['config']['items'])
            && count($data['fieldConfig']['config']['items']) > 1
        ) {
            $values = $data['fieldConfig']['config']['items'];
            array_shift($values);
            $value = array_shift($values);
            $value = $value[1];
        }
        return (string)$value;
    }
433240
private function insertData($data)
    {
        $inserted = Yii::$app->db->createCommand()->batchInsert(
            $this->getName(),
            $this->cleanUpBatchInsertFields($this->getFields()),
            $this->cleanUpMatchRow($data)
        )->execute();

        return $inserted;
    }
26351
public function insert(array $data): string
    {
        // Set object ID as id of item
        $data['_id'] = $this->getID();

        // Set statement of bulk object
        $bulk = $this->getBulk();
        $bulk->insert($data);

        try {
            $this->getInstance()->executeBulkWrite(
                $this->getParam('database') . '.' . $this->getCollection(),
                $bulk,
                $this->getWrite()
            );

        } catch (BulkWriteException $e) {
            new Exception('Unable to write in database');
        }

        return (string) $data['_id'];
    }
1143745
protected function insert($data)
    {
        try {

            if ($this->creationTouch) {
                $data[$this->creationTouchName] = date('Y-m-d H:i:s');
            }

            $this->db->insert($this->table, $this->fromArray($data));

            $id = $this->db->lastInsertId($this->sequence ? $this->sequence : $this->primaryKey);

        } catch (\Exception $e) {
            throw $e;
        }

        return $id;
    }
180689
public function generate($data){
		if($data->result){
			$bRouter=BRouter::getInstance();
			$url=$bRouter->generateURL('users',array('view'=>'registerdone'),array('usehostname'=>true));
			$this->setLocation($url,0);
			return '';
			}
		$this->email=$data->email;
		$this->name=$data->name;
		$this->errors=$data->errors;
		$this->socLoginList=BSocialFabric::getSocialList();
		$this->setTitle(BLang::_('USERS_REGISTRATION_TITLE'));
		return $this->templateLoad();
		}
265117
protected function getId(array $data)
    {
        $result = null;

        if (isset($data['id'])) {
            $result = $data['id'];
        } elseif (isset($data['name'])) {
            $result = $data['name'];
        } else {
            #$result = sha1($data['action'] . $data['method']);
            $result = sha1(serialize($data));
        }

        return $result;
    }
1195514
public static function getGeneratorFromParametersData(array $data): string
    {
        assert(array_key_exists(self::KEY_ROUTER_PARAMS__GENERATOR, $data));
        $result = $data[self::KEY_ROUTER_PARAMS__GENERATOR];
        assert(empty($result) === false);
        assert(static::classImplements($result, DataGenerator::class));

        return $result;
    }
824257
public function insert(array $data)
    {
        $this->normalizeDataColumns($data);

        $this->setSearchIndexableData($data);

        return $this->app['db']->insert($this->getTable(), $data);
    }