How to create Form configuration on server side

Hello,
I want to create a Form configuration like a Grid with GridConfiguration on server side, is it possible ?
For example if a user don’t have Update right i want to hide the Update Button on my Form.

Something like that on server side :

if(denyUpdate){
  $conn->access->deny("update");
  $config = new FormConfiguration();
  $config->setItem(array("UpdateButton"));
  $config->setItemHidden("True");
  $form->set_config($config);
}

Thx