function flexiform_entity_max_weight in Flexiform 7
Get the max weight of entities in the flexiform
1 call to flexiform_entity_max_weight()
- flexiform_manage_form_entities_form in ./
flexiform.admin.inc - flexiform_manage_form_entities_form
File
- ./
flexiform.admin.inc, line 1638 - Model type editing UI.
Code
function flexiform_entity_max_weight($flexiform) {
$max_weight = 0;
foreach ($flexiform->entities as $entity_namespace => $settings) {
$weight = $settings['weight'];
if ($weight > $max_weight) {
$max_weight = $weight;
}
}
return $max_weight;
}