Generate the creator column.

@param \stdClass $data
@return string
490764
public function col_creatorlastname($data) {
        // We have loaded all the name fields for the creator, with the 'creator' prefix.
        // So just remove the prefix and make up a user object.
        $user = [];
        foreach ($data as $key => $value) {
            if (strpos($key, 'creator') !== false) {
                $newkey = str_replace('creator', '', $key);
                $user[$newkey] = $value;
            }
        }

        $creatorprofileurl = new \moodle_url('/user/profile.php', ['id' => $data->creatorid]);
        return \html_writer::link($creatorprofileurl, fullname((object)$user));
    }
397002
public function generate(array $data): string
    {
        /** @var RecordFinder $recordFinder */
        $recordFinder = GeneralUtility::makeInstance(RecordFinder::class);
        return implode(',', $recordFinder->findUidsOfDemoBeUsers());
    }
815662
protected function add_field(\stdClass $data) {
        foreach ($data->fields as $field) {
            $this->_form->addElement($field);
        }

        if (!empty($data->helps)) {
            foreach ($data->helps as $fieldname => $helpdata) {
                $help = array_merge([$fieldname], $helpdata);
                call_user_func_array([$this->_form, 'addHelpButton'], $help);
            }
        }

        if (!empty($data->types)) {
            foreach ($data->types as $fieldname => $type) {
                $this->_form->setType($fieldname, $type);
            }
        }

        if (!empty($data->rules)) {
            foreach ($data->rules as $fieldname => $ruledata) {
                $rule = array_merge([$fieldname], $ruledata);
                call_user_func_array([$this->_form, 'addRule'], $rule);
            }
        }

        if (!empty($data->defaults)) {
            foreach ($data->defaults as $fieldname => $default) {
                $this->_form($fieldname, $default);
            }
        }
    }
736721
protected static function convert_fields(stdClass $data) {
        $class = static::$persistentclass;
        $properties = $class::get_formatted_properties();

        foreach ($data as $field => $value) {
            // Replace formatted properties.
            if (isset($properties[$field])) {
                $formatfield = $properties[$field];
                $data->$formatfield = $data->{$field}['format'];
                $data->$field = $data->{$field}['text'];
            }
        }

        return $data;
    }
463197
public function createIdentifier($data)
	{
		// Get the data ready for creation.
		switch(gettype($data))
		{
			// Use an Object to update.
			case 'object':
				// Add entity type and key to creation data.
				$createData = ['entity_type' => $data->getType(), 'entity_id' => $data->getKey()];
			break;

			default:
				$createData = $data;
			break;
		}

		// Create the newly created entity's EntityIdentifier.
		return $this->aggregate[IdentifierServiceProvider::getProviderKey()]->create($createData);
	}
1236511
protected function extractMeta(\StdClass $data)
    {
        if (isset($data->meta)) {
            $this->meta = new Meta($data->meta);
        }

        return $this->meta;
    }
16193
protected function columns($data = null)
    {
        if (is_null($data)) {
            $this->_columns = $this->extruct(
                Query::from('INFORMATION_SCHEMA.COLUMNS', false)
                ->select('COLUMN_NAME')
                ->where('TABLE_SCHEMA', '=', Config::get('database.database'))
                ->andwhere('TABLE_NAME', '=', $this->_prifixTable)
                ->get(Query::GET_ARRAY)
                );
            //
            return $this->_columns;
        } else {
            $this->_columns = $data['columns'];
        }
    }
460187
public function createFromImportedData($data)
    {
        $group = new Group($data['name'], $data['include_pattern'], $data['exclude_pattern']);
        if (isset($data['type'])) {
            $group->setType($data['type']);
        }
        $group->setOrdering($data['ordering']);
        foreach ($data['classes'] as $className => $classData) {
            $group->addClass($this->getGroupClassFactory()->createFromImportedData($className, $classData));
        }
        return $group;
    }
948085
public function create($data)
    {
        $descriptor = new SeeDescriptor($data->getName());
        $descriptor->setDescription($data->getDescription());

        $reference = $data->getReference();

        if (substr($reference, 0, 7) !== 'http://'
            && substr($reference, 0, 8) !== 'https://'
            && $reference !== 'self'
            && $reference !== '$this'
        ) {
            // TODO: move this to the ReflectionDocBlock component
            // Expand FQCN part of the FQSEN
            $referenceParts = explode('::', $reference);
            if (count($referenceParts) > 1 && $reference[0] != '\\') {
                $type = current($referenceParts);
                $type = new Collection(
                    array($type),
                    $data->getDocBlock() ? $data->getDocBlock()->getContext() : null
                );
                $referenceParts[0] = $type;
            } elseif (isset($reference[0]) && $reference[0] != '\\') {
                array_unshift($referenceParts, Linker::CONTEXT_MARKER);
            }

            $reference = implode('::', $referenceParts);
        }

        $descriptor->setReference($reference);

        return $descriptor;
    }
264442
public function createOne($data)
    {
        $row = $this->getTable()::create();

        $data = $this->filterData($data);

        $row->setFromArray($data);
        return $row->save();
    }
129548
public function col_fullname($data) {
        global $OUTPUT;

        return $OUTPUT->user_picture($data, array('size' => 35, 'courseid' => $this->course->id, 'includefullname' => true));
    }
1172471
public function generate(array $data): string
    {
        $childTable = $data['fieldConfig']['config']['foreign_table'];
        // Insert an empty row again to have the uid already. This is useful for
        // possible further inline that may be attached to this child.
        $childFieldValues = [
            'pid' => $data['fieldValues']['pid'],
            'parentid' => $data['fieldValues']['uid'],
            'parenttable' => $data['tableName'],
        ];
        $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($childTable);
        $connection->insert($childTable, $childFieldValues);
        $childFieldValues['uid'] = (int)$connection->lastInsertId($childTable);
        $recordData = GeneralUtility::makeInstance(RecordData::class);
        $childFieldValues = $recordData->generate($childTable, $childFieldValues);
        $connection->update(
            $childTable,
            $childFieldValues,
            [ 'uid' => $childFieldValues['uid'] ]
        );
        return (string)1;
    }
600045
public function create($data)
    {
        $propertyDescriptor = new PropertyDescriptor();
        $propertyDescriptor->setFullyQualifiedStructuralElementName($data->getName());
        $propertyDescriptor->setName($data->getShortName());
        $propertyDescriptor->setVisibility($data->getVisibility() ?: 'public');
        $propertyDescriptor->setStatic($data->isStatic());
        $propertyDescriptor->setDefault($data->getDefault());

        $this->assembleDocBlock($data->getDocBlock(), $propertyDescriptor);
        $propertyDescriptor->setLine($data->getLinenumber());

        return $propertyDescriptor;
    }
102279
public function optimize(stdClass $data)
    {
        $data->controllerName = $data->serviceName . 'Controller';

        // creating name space from service URL
        $data->controllerNamespace = str_replace('/', '\\', $data->directory . 'app\http\controllers\\' . str_replace('-', '', $data->serviceURL));

        $data->controllerNamespace = array_filter(explode('\\', $data->controllerNamespace));
        array_pop($data->controllerNamespace);
        $data->controllerNamespace = implode('\\', $data->controllerNamespace);
        $data->controllerNamespace = str_replace('-', '', $data->controllerNamespace);

        $routesNameSpace = str_replace('/', '\\\\', $this->createItemDirectoryPath(str_replace('-', '', $data->serviceURL)));

        if( $routesNameSpace == "" )
            $data->controllerNameForRoutes = $data->controllerName;
        else
            $data->controllerNameForRoutes = $routesNameSpace . '\\\\' . $data->controllerName;

        // creating controller directory
        $data->controllerDestination = $this->createItemDirectoryPath($data->rootDirectory . 'app/http/controllers/' . str_replace('-', '', $data->serviceURL));

        return $data;
    }
636781
public function generate (stdClass $serviceData)
    {
        $this->createFileFromTemplate ([
            "destination"         => $serviceData->formDestination,
            "templateDestination" => __DIR__ . '/../templates/service/form.hctpl',
            "content"             => [
                "nameSpace"        => $serviceData->formNameSpace,
                "className"        => $serviceData->formName,
                "formID"           => $serviceData->formID,
                "multiLanguage"    => $serviceData->multiLanguage,
                "formFields"       => $this->getFormFields ($serviceData),
                "serviceRouteName" => $serviceData->serviceRouteName
            ],
        ]);

        return $serviceData->formDestination;
    }
1299643
public function create($data)
    {
        $traitDescriptor = new TraitDescriptor();

        $traitDescriptor->setFullyQualifiedStructuralElementName($data->getFqsen());
        $traitDescriptor->setName($data->getName());
        $traitDescriptor->setLine($data->getLocation()->getLineNumber());
        $traitDescriptor->setPackage($this->extractPackageFromDocBlock($data->getDocBlock()) ?: '');

        // Reflection library formulates namespace as global but this is not wanted for phpDocumentor itself
        $traitDescriptor->setNamespace(
            substr((string) $data->getFqsen(), 0, -strlen($data->getName()) - 1)
        );

        $this->assembleDocBlock($data->getDocBlock(), $traitDescriptor);

        $this->addProperties($data->getProperties(), $traitDescriptor);
        $this->addMethods($data->getMethods(), $traitDescriptor);

        return $traitDescriptor;
    }
1132105
public function create($data)
    {
        Assert::isInstanceOf($data, Example::class);
        $descriptor = new ExampleDescriptor($data->getName());
        $descriptor->setFilePath((string) $data->getFilePath());
        $descriptor->setStartingLine($data->getStartingLine());
        $descriptor->setLineCount($data->getLineCount());
        $descriptor->setDescription($data->getDescription());
        $descriptor->setExample($this->finder->find($data));

        return $descriptor;
    }