convert data to meta data

Hello, I'm  develop a plugin that extends the plugin groups of elgg. my plugin is based on the meta model of elgg. I would like to know how to redefine  these attributes .

<div>
    <label for="camerproject-membership"><?php echo elgg_echo("camerproject:membership"); ?></label><br />
    <?php echo elgg_view("input/select", [
            "name" => "membership",
            "id" => "camerproject-membership",
            "value" => $membership,
            "options_values" => array(
                    ACCESS_PRIVATE => elgg_echo("camerproject:access:private"),
                    ACCESS_PUBLIC => elgg_echo("camerproject:access:public"),
            )
    ]);
    ?>
</div>
 
<?php if (elgg_get_plugin_setting("hidden_camerprojects", "camerproject") == "yes"): ?>
    <div>
            <label for="camerproject-vis"><?php  elgg_echo("camerproject:visibility");   ?></label><br />
            <?php
            $visibility_options =  array(
                    ACCESS_PRIVATE => elgg_echo("camerproject:access:project"),
                    ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"),
                    ACCESS_PUBLIC => elgg_echo("PUBLIC"),
            );
            if (elgg_get_config("walled_garden")) {
                    unset($visibility_options[ACCESS_PUBLIC]);
            }
 
            echo elgg_view("input/access", array(
                    "name" => "vis",
                    "id" => "camerproject-vis",
                    "value" => $visibility,
                    "options_values" => $visibility_options,
                    'entity' => $entity,
                    'entity_type' => 'camerproject',
                    'entity_subtype' => '',
            ));
            ?>
    </div>
<?php endif; ?>
 
<?php
 
$access_mode_params = array(
"name" => "content_access_mode",
"id" => "camerproject-content-access-mode",
"value" => $content_access_mode,
"options_values" => array(
ElggGroup::CONTENT_ACCESS_MODE_UNRESTRICTED => elgg_echo("camerproject:content_access_mode:unrestricted"),
ElggGroup::CONTENT_ACCESS_MODE_MEMBERS_ONLY => elgg_echo("camerproject:content_access_mode:membersonly"),
)
);
 
if ($entity) {
// Disable content_access_mode field for hidden groups because the setting
// will be forced to members_only regardless of the entered value
if ($entity->access_id === $entity->project_acl) {
$access_mode_params['disabled'] = 'disabled';
}
}
?>
<div>
<label for="camerproject-content-access-mode"><?php echo elgg_echo("camerproject:content_access_mode"); ?></label><br />
<?php
echo elgg_view("input/select", $access_mode_params);
 
if ($entity && $entity->getContentAccessMode() == ElggGroup::CONTENT_ACCESS_MODE_UNRESTRICTED) {
// Warn the user that changing the content access mode to more
// restrictive will not affect the existing group content
$access_mode_warning = elgg_echo("camerproject:content_access_mode:warning");
echo "<span class='elgg-text-help'>$access_mode_warning</span>";
}
?>
</div>
 
<?php
 
if ($entity && ($owner_guid == elgg_get_logged_in_user_guid() || elgg_is_admin_logged_in())) {
$members = array();
 
$dbprefix = elgg_get_config('dbprefix');
$options = array(
"type" => "user",
"relationship" => "member",
"relationship_guid" => $entity->getGUID(),
"inverse_relationship" => true,
"limit" => false,
"callback" => false,
"joins" => ["JOIN {$dbprefix}users_entity ue ON e.guid = ue.guid"],
"selects" => ['ue.*'],
"order_by" => 'ue.name ASC',
);
 
$batch = new ElggBatch("elgg_get_entities_from_relationship", $options);
foreach ($batch as $member) {
$option_text = "$member->name (@$member->username)";
$members[$member->guid] = htmlspecialchars($option_text, ENT_QUOTES, "UTF-8", false);
}
?>
 
<div>
<label for="camerproject-owner-guid"><?php echo elgg_echo("camerproject:owner"); ?></label><br />
<?php
echo elgg_view("input/select", array(
"name" => "owner_guid",
"id" => "camerproject-owner-guid",
"value" =>  $owner_guid,
"options_values" => $members,
"class" => "camerproject-owner-input",
));
 
if ($owner_guid == elgg_get_logged_in_user_guid()) {
echo "<span class='elgg-text-help'>" . elgg_echo("camerproject:owner:warning") . "</span>";
}
?>
</div>
<?php

 

in my new library file.   whose the function is : 


function camerproject_prepare_camerproject_vars(Camerproject $project=null){
    
    //defaults
    
    $result = [
      'title' => '',
      'icon' => '',
      'summery' => '',
      'progress' => '',
      'sectorindustry' => get_input('sectorindustry'),
      'devise' => get_input('devise'),
      'location' =>'',
      'projectwebsite' => '',
      'projectblog' => '',
      'projectpitch' => '',
      'membership' => '........................', 
      'vis' => '......................',
      'owner_guid' => '..........'
  
    ];
}

 

regards, 

foka_patrick