You are here

function eck__property_edit__form_submit in Entity Construction Kit (ECK) 7.3

Property edit form submit.

File

./eck.properties.inc, line 246
Properties.

Code

function eck__property_edit__form_submit($form, &$state) {
  $values = $state['values'];
  $entity_type = $values['entity_type'];
  $property = $values['property'];
  $label = $values['label'];
  $properties = $entity_type->properties;
  $properties[$property]['label'] = $label;
  $entity_type->properties = $properties;
  $entity_type
    ->save();
  EntityType::loadAll(NULL, TRUE);
  $state['redirect'] = eck__entity_type__path() . "/{$entity_type->name}/property";
}