private function HierarchicalSelectInternals::generate in Hierarchical Select 7.3
Same name and namespace in other branches
- 6.3 tests/internals.test \HierarchicalSelectInternals::generate()
Generate the $hierarchy and $dropbox objects.
This uses the selections that were just calculated.
2 calls to HierarchicalSelectInternals::generate()
- HierarchicalSelectInternals::testAllSettingsOff in tests/
internals.test - In this test, all settings are disabled.
- HierarchicalSelectInternals::testEnforceDeepest in tests/
internals.test - In this test, only enforce_deepest enabled.
File
- tests/
internals.test, line 420 - This file contains the unit tests of the internals.
Class
- HierarchicalSelectInternals
- Tests for the internals of Hierarchical Select.
Code
private function generate($element, $hs_selection, $db_selection, $op = 'Update') {
$config = $element['#config'];
$dropbox = !$config['dropbox']['status'] ? FALSE : _hierarchical_select_dropbox_generate($config, $db_selection);
$hierarchy = _hierarchical_select_hierarchy_generate($config, $hs_selection, $element['#required'], $dropbox);
return array(
$hierarchy,
$dropbox,
);
}