/** * Return registered options as an array * * @param ICE_Section $section Limit options to one section by passing a section object * @return array */ public function get_for_section(ICE_Section $section) { // options to return $options = array(); // loop through and compare names foreach (parent::get_all() as $option) { // do section names match? if ($section->property('name') != $option->property('section')) { continue; } // add to array $options[] = $option; } // return them return $options; }