function crumbs_Admin_WeightsTable::addElement in Crumbs, the Breadcrumbs suite 7.2
Parameters
string $key:
array $child:
File
- lib/
Admin/ WeightsTable.php, line 126
Class
- crumbs_Admin_WeightsTable
- This class is a helper for theme_crumbs_weights_tabledrag()
Code
function addElement($key, $child) {
$section_key = $child['#section_key'];
if ($child['weight']['#type'] === 'hidden') {
$this
->addSectionHeader($section_key, $key, $child);
}
else {
$this
->addRow($section_key, $key, $child);
}
$weight = $child['weight']['#value'];
if ($section_key === 'enabled') {
$this->sortEnabled[$key] = $weight;
}
}