protected function getHeaders(\MUtil_Model_ModelAbstract $model, array $currentNames)
    {
        $lastParent = null;
        $results    = array();
        foreach ($currentNames as $name) {
            if ($model->is($name, 'type', \MUtil_Model::TYPE_NOVALUE)) {
                $results[$name] = $name;

            } elseif ($parent = $model->get($name, 'parent_question')) {
                // Insert parent header on name if it was not shown before
                $results[$parent] = $parent;
            }
        }

        return $results;
    }
protected function getHeaders(\MUtil_Model_ModelAbstract $model, array $currentNames)
    {
        $lastParent = null;
        $results    = array();
        foreach ($currentNames as $name) {
            if ($model->is($name, 'type', \MUtil_Model::TYPE_NOVALUE)) {
                $results[$name] = $name;

            } elseif ($parent = $model->get($name, 'parent_question')) {
                // Insert parent header on name if it was not shown before
                $results[$parent] = $parent;
            }
        }

        return $results;
    }
protected function getHeaders ( \ MUtil_Model_ModelAbstract $ model , array $ currentNames ) { $ lastParent = null ; $ results = array ( ) ; foreach ( $ currentNames as $ name ) { if ( $ model -> is ( $ name , 'type' , \ MUtil_Model :: TYPE_NOVALUE ) ) { $ results [ $ name ] = $ name ; } elseif ( $ parent = $ model -> get ( $ name , 'parent_question' ) ) { // Insert parent header on name if it was not shown before $ results [ $ parent ] = $ parent ; } } return $ results ; }
Returns only the headers

@param \MUtil_Model_ModelAbstract $model
@param array $currentNames The current names in use (allows chaining)
@return array Of the names of labels that should be shown
Returns only the headers