Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]Jak wywołać tą funkcję?
Forum PHP.pl > Forum > Przedszkole
Soldier1121
Witam. Chcę zrobić rozwijalne menu w darmowej wersji Quick.CMS. Nie jestem biegły w programowaniu obiektowym dlatego tu pada pytanie:
Jak mam wywołać tą funkcję odpowiadającą za submenu?

  1. /**
  2.   * Displays a sub menu
  3.   * @return string
  4.   * @param int $iPageParent
  5.   * @param int $iDepth
  6.   */
  7. public function listPagesSubMenu( $iPageParent, $iDepth = 1 ){
  8. global $config;
  9.  
  10. if( isset( $this->aPagesChildrens[$iPageParent] ) ){
  11.  
  12. $content = null;
  13. foreach( $this->aPagesChildrens[$iPageParent] as $iElement => $iPage ){
  14. $aParametersExt['sSubMenu'] = ( isset( $this->aPagesChildrens[$iPage] ) && ( ( isset( $this->aMenuParams['bExpanded'] ) || ( isset( $config['current_page_id'] ) && ( $iPage == $config['current_page_id'] || isset( $this->aPagesAllChildrens[$iPage][$config['current_page_id']] ) ) ) ) && $this->aMenuParams['iDepthLimit'] > $iDepth ) ? $this->listPagesSubMenu( $iPage, $iDepth + 1 ) : null );
  15.  
  16. $aParametersExt['iElement'] = $iElement;
  17. $content .= $this->aMenuParams['sFunctionView']( $this->Pages[$iPage], $aParametersExt );
  18. } // end foreach
  19.  
  20. if( isset( $content ) ){
  21. return '<ul>TESTESTETESSTESTETESTETEST'.$content.'</ul>';
  22. }
  23. }
  24. } // end function listPagesSubMenu


fate
$testObject = new KlasaZawierajacaFunkcje();

$testObject->listPagesSubMenu($iPageParent, $iDepth = 1);

jakoś tak aaevil.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.