function fieldable_panels_panes_fieldable_panels_pane_content_type_edit_form_submit in Fieldable Panels Panes (FPP) 7
Submit our content type edit form.
File
- plugins/
content_types/ fieldable_panels_pane.inc, line 332 - CTools content type to render a fielded panel pane.
Code
function fieldable_panels_panes_fieldable_panels_pane_content_type_edit_form_submit($form, &$form_state) {
$form_state['conf']['view_mode'] = $form_state['values']['view_mode'];
if (!empty($form_state['no update entity'])) {
return;
}
$entity = $form_state['entity'];
if (!$entity) {
return;
}
fieldable_panels_panes_entity_edit_form_submit($form, $form_state);
// Determine how to handle revision locking.
$revision_context_aware = fieldable_panels_panes_revision_is_lockable($entity);
// If this is a new entity entity, or revision locking is enabled, look for a
// specific ID to use.
if (!empty($entity->is_new) || $revision_context_aware) {
// If UUID is available, use it.
if (module_exists('uuid') && isset($entity->uuid)) {
if ($revision_context_aware) {
$subtype = 'vuuid:' . $entity->vuuid;
}
else {
$subtype = 'uuid:' . $entity->uuid;
}
}
else {
if ($revision_context_aware) {
$subtype = 'vid:' . $entity->vid;
}
else {
$subtype = 'fpid:' . $entity->fpid;
}
}
}
else {
$subtype = 'current:' . $entity->fpid;
}
// @todo: This won't work if $form_state does not contain 'pane' which could
// theoretically happen in a non-Panels use case. Not that anybody uses this
// outside of Panels.
$form_state['pane']->subtype = $subtype;
}