public function getPageBreadcrumb($idPage, $typeLinkOnly = 1, $allPages = true)
	{
	    if (empty($idPage))
	        return null;
	    
        // Retrieve cache version if front mode to avoid multiple calls
        $cacheKey = 'getPageBreadcrumb_' . $idPage . '_' . $typeLinkOnly . '_' . $allPages;
        $cacheConfig = 'engine_page_services';
        $melisEngineCacheSystem = $this->serviceLocator->get('MelisEngineCacheSystem');
        $results = $melisEngineCacheSystem->getCacheByKey($cacheKey, $cacheConfig);
        if (!empty($results)) return $results;
	        
		$results = array();
		$tmp = $idPage;
		$melisPage = $this->getServiceLocator()->get('MelisEnginePage');

		
		$datasPageRes = $melisPage->getDatasPage($idPage);
		$datasPageTreeRes = $datasPageRes->getMelisPageTree();
		
		if (!empty($datasPageTreeRes))
		{
			if ($datasPageTreeRes->page_status == 1 || $allPages)
			{
				if ($typeLinkOnly && $datasPageTreeRes->page_menu != 'NONE')
					array_push($results, $datasPageTreeRes);
				if (!$typeLinkOnly)
					array_push($results, $datasPageTreeRes);
			}
		}
		else
		    return array();
	
		while ($tmp != -1)
		{
			$datasPageFatherRes = $this->getPageFather($tmp);
			$datas = $datasPageFatherRes->current();
				
			if (!empty($datas))
			{
				$tmp = $datas->tree_father_page_id;
				unset($datas->tree_page_id);
				unset($datas->tree_father_page_id);
				unset($datas->tree_page_order);
				$datas->tree_page_id = $tmp;
				if ($datasPageTreeRes->page_status == 1|| $allPages)
				{
					if ($typeLinkOnly && $datas->page_menu != 'NONE')
						array_push($results, $datas);
					if (!$typeLinkOnly)
						array_push($results, $datas);
				}
			}
			else
				break;
		}
	
		krsort($results);
		
		// Save cache key
		$melisEngineCacheSystem->setCacheByKey($cacheKey, $cacheConfig, $results);
		
		return $results;
	}
public function getPageBreadcrumb($idPage, $typeLinkOnly = 1, $allPages = true)
	{
	    if (empty($idPage))
	        return null;
	    
        // Retrieve cache version if front mode to avoid multiple calls
        $cacheKey = 'getPageBreadcrumb_' . $idPage . '_' . $typeLinkOnly . '_' . $allPages;
        $cacheConfig = 'engine_page_services';
        $melisEngineCacheSystem = $this->serviceLocator->get('MelisEngineCacheSystem');
        $results = $melisEngineCacheSystem->getCacheByKey($cacheKey, $cacheConfig);
        if (!empty($results)) return $results;
	        
		$results = array();
		$tmp = $idPage;
		$melisPage = $this->getServiceLocator()->get('MelisEnginePage');

		
		$datasPageRes = $melisPage->getDatasPage($idPage);
		$datasPageTreeRes = $datasPageRes->getMelisPageTree();
		
		if (!empty($datasPageTreeRes))
		{
			if ($datasPageTreeRes->page_status == 1 || $allPages)
			{
				if ($typeLinkOnly && $datasPageTreeRes->page_menu != 'NONE')
					array_push($results, $datasPageTreeRes);
				if (!$typeLinkOnly)
					array_push($results, $datasPageTreeRes);
			}
		}
		else
		    return array();
	
		while ($tmp != -1)
		{
			$datasPageFatherRes = $this->getPageFather($tmp);
			$datas = $datasPageFatherRes->current();
				
			if (!empty($datas))
			{
				$tmp = $datas->tree_father_page_id;
				unset($datas->tree_page_id);
				unset($datas->tree_father_page_id);
				unset($datas->tree_page_order);
				$datas->tree_page_id = $tmp;
				if ($datasPageTreeRes->page_status == 1|| $allPages)
				{
					if ($typeLinkOnly && $datas->page_menu != 'NONE')
						array_push($results, $datas);
					if (!$typeLinkOnly)
						array_push($results, $datas);
				}
			}
			else
				break;
		}
	
		krsort($results);
		
		// Save cache key
		$melisEngineCacheSystem->setCacheByKey($cacheKey, $cacheConfig, $results);
		
		return $results;
	}
public function getPageBreadcrumb ( $ idPage , $ typeLinkOnly = 1 , $ allPages = true ) { if ( empty ( $ idPage ) ) return null ; // Retrieve cache version if front mode to avoid multiple calls $ cacheKey = 'getPageBreadcrumb_' . $ idPage . '_' . $ typeLinkOnly . '_' . $ allPages ; $ cacheConfig = 'engine_page_services' ; $ melisEngineCacheSystem = $ this -> serviceLocator -> get ( 'MelisEngineCacheSystem' ) ; $ results = $ melisEngineCacheSystem -> getCacheByKey ( $ cacheKey , $ cacheConfig ) ; if ( ! empty ( $ results ) ) return $ results ; $ results = array ( ) ; $ tmp = $ idPage ; $ melisPage = $ this -> getServiceLocator ( ) -> get ( 'MelisEnginePage' ) ; $ datasPageRes = $ melisPage -> getDatasPage ( $ idPage ) ; $ datasPageTreeRes = $ datasPageRes -> getMelisPageTree ( ) ; if ( ! empty ( $ datasPageTreeRes ) ) { if ( $ datasPageTreeRes -> page_status == 1 || $ allPages ) { if ( $ typeLinkOnly && $ datasPageTreeRes -> page_menu != 'NONE' ) array_push ( $ results , $ datasPageTreeRes ) ; if ( ! $ typeLinkOnly ) array_push ( $ results , $ datasPageTreeRes ) ; } } else return array ( ) ; while ( $ tmp != - 1 ) { $ datasPageFatherRes = $ this -> getPageFather ( $ tmp ) ; $ datas = $ datasPageFatherRes -> current ( ) ; if ( ! empty ( $ datas ) ) { $ tmp = $ datas -> tree_father_page_id ; unset ( $ datas -> tree_page_id ) ; unset ( $ datas -> tree_father_page_id ) ; unset ( $ datas -> tree_page_order ) ; $ datas -> tree_page_id = $ tmp ; if ( $ datasPageTreeRes -> page_status == 1 || $ allPages ) { if ( $ typeLinkOnly && $ datas -> page_menu != 'NONE' ) array_push ( $ results , $ datas ) ; if ( ! $ typeLinkOnly ) array_push ( $ results , $ datas ) ; } } else break ; } krsort ( $ results ) ; // Save cache key $ melisEngineCacheSystem -> setCacheByKey ( $ cacheKey , $ cacheConfig , $ results ) ; return $ results ; }
Gets the breadcromb of pages as an array

@param int $idPage The id page to start from
@param int $typeLinkOnly Get only pages with a type LINK for menu
@param boolean $allPages Brings it all
@return MelisPage[] Array of Melis Pages
Gets the breadcromb of pages as an array