From e3e32378e9c75303d32c7c7af92852884f73afa0 Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 24 Aug 2010 15:53:45 -0300 Subject: Using radio buttons for field and subfield selection on apps --- classes/IsisMap.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'classes/IsisMap.php') diff --git a/classes/IsisMap.php b/classes/IsisMap.php index e73e178..05c7ae9 100644 --- a/classes/IsisMap.php +++ b/classes/IsisMap.php @@ -278,6 +278,25 @@ class IsisMap extends IsisReader { return FALSE; } + /** + * Get all subfield names. + * + * @param $field_key + * Field key. + * + * @return + * Array with subfield names. + */ + public function getSubfieldNames($field_key) { + $subfields = array(); + + foreach ($this->format['fields'][$field_key]['subfields'] as $key => $value) { + $subfields[$key] = $value; + } + + return $subfields; + } + /** * Get a field name. * @@ -290,4 +309,20 @@ class IsisMap extends IsisReader { public function getFieldName($field_key) { return $this->format['fields'][$field_key]['name']; } + + /** + * Get all field names. + * + * @return + * Array with field names. + */ + public function getFieldNames() { + $fields = array(); + + foreach ($this->format['fields'] as $key => $field) { + $fields[$key] = $field['name']; + } + + return $fields; + } } -- cgit v1.2.3