Extensions/WordPress/Options/Section.php
public function get_fields()
    {
        if( !isset( $this->fields ) )
        {
            if( !$this->has_sub_sections() )
            {
                $this->fields = $this->model['fields'];
            }
            else
            {
                $this->fields = array();
                foreach( $this->model['subsections'] as $subsection )
                {
                    foreach( $subsection['fields'] as $field )
                    {
                        $field->subsection = \Amarkal\Common\Tools::strtoslug( $subsection['title'] );
                    }
                    $this->fields = array_merge( $this->fields, $subsection['fields'] );
                }
            }
        }
        return $this->fields;
    }
public function get_fields()
    {
        if( !isset( $this->fields ) )
        {
            if( !$this->has_sub_sections() )
            {
                $this->fields = $this->model['fields'];
            }
            else
            {
                $this->fields = array();
                foreach( $this->model['subsections'] as $subsection )
                {
                    foreach( $subsection['fields'] as $field )
                    {
                        $field->subsection = \Amarkal\Common\Tools::strtoslug( $subsection['title'] );
                    }
                    $this->fields = array_merge( $this->fields, $subsection['fields'] );
                }
            }
        }
        return $this->fields;
    }
public function get_fields ( ) { if ( ! isset ( $ this -> fields ) ) { if ( ! $ this -> has_sub_sections ( ) ) { $ this -> fields = $ this -> model [ 'fields' ] ; } else { $ this -> fields = array ( ) ; foreach ( $ this -> model [ 'subsections' ] as $ subsection ) { foreach ( $ subsection [ 'fields' ] as $ field ) { $ field -> subsection = \ Amarkal \ Common \ Tools :: strtoslug ( $ subsection [ 'title' ] ) ; } $ this -> fields = array_merge ( $ this -> fields , $ subsection [ 'fields' ] ) ; } } } return $ this -> fields ; }
Get the array of fields for this section.
If this section has subsections, the returning array will consist of
all fields from all subsections.

@return array
Get the array of fields for this section . If this section has subsections the returning array will consist of all fields from all subsections .