public function getList($langcode = '')
    {
        if (empty($langcode)) {
            $langcode = 'en';
        }

        $result = &gplcart_static("help.list.$langcode");

        if (isset($result)) {
            return $result;
        }

        $this->hook->attach('help.list.before', $langcode, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $dir = $this->getDirectory($langcode);

        if (!is_dir($dir)) {
            return $result = array();
        }

        $result = $titles = $weights = array();

        foreach (gplcart_file_scan($dir, array('md')) as $file) {
            $data = $this->get($file);
            if (!empty($data['title'])) {
                $result[] = $data;
                $titles[] = $data['title'];
                $weights[] = $data['weight'];
            }
        }

        array_multisort($weights, SORT_ASC, $titles, SORT_ASC, $result);
        $this->hook->attach('help.list.after', $langcode, $result, $this);
        return $result;
    }
public function getList($langcode = '')
    {
        if (empty($langcode)) {
            $langcode = 'en';
        }

        $result = &gplcart_static("help.list.$langcode");

        if (isset($result)) {
            return $result;
        }

        $this->hook->attach('help.list.before', $langcode, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $dir = $this->getDirectory($langcode);

        if (!is_dir($dir)) {
            return $result = array();
        }

        $result = $titles = $weights = array();

        foreach (gplcart_file_scan($dir, array('md')) as $file) {
            $data = $this->get($file);
            if (!empty($data['title'])) {
                $result[] = $data;
                $titles[] = $data['title'];
                $weights[] = $data['weight'];
            }
        }

        array_multisort($weights, SORT_ASC, $titles, SORT_ASC, $result);
        $this->hook->attach('help.list.after', $langcode, $result, $this);
        return $result;
    }
public function getList ( $ langcode = '' ) { if ( empty ( $ langcode ) ) { $ langcode = 'en' ; } $ result = & gplcart_static ( "help.list.$langcode" ) ; if ( isset ( $ result ) ) { return $ result ; } $ this -> hook -> attach ( 'help.list.before' , $ langcode , $ result , $ this ) ; if ( isset ( $ result ) ) { return $ result ; } $ dir = $ this -> getDirectory ( $ langcode ) ; if ( ! is_dir ( $ dir ) ) { return $ result = array ( ) ; } $ result = $ titles = $ weights = array ( ) ; foreach ( gplcart_file_scan ( $ dir , array ( 'md' ) ) as $ file ) { $ data = $ this -> get ( $ file ) ; if ( ! empty ( $ data [ 'title' ] ) ) { $ result [ ] = $ data ; $ titles [ ] = $ data [ 'title' ] ; $ weights [ ] = $ data [ 'weight' ] ; } } array_multisort ( $ weights , SORT_ASC , $ titles , SORT_ASC , $ result ) ; $ this -> hook -> attach ( 'help.list.after' , $ langcode , $ result , $ this ) ; return $ result ; }
Returns an array of help items
@param string
@return array
Returns an array of help items