public function getFullDatasPage($id, $type = '')
	{
		$select = $this->tableGateway->getSql()->select();
		
		$select->columns(array('*'));
		
		$select->join('melis_cms_page_lang', 'melis_cms_page_lang.plang_page_id = melis_cms_page_tree.tree_page_id', 
						array('plang_lang_id'));
		$select->join('melis_cms_lang', 'melis_cms_lang.lang_cms_id = melis_cms_page_lang.plang_lang_id', 
						array('*'), $select::JOIN_LEFT);
		$select->join('melis_cms_page_style', 'melis_cms_page_tree.tree_page_id = melis_cms_page_style.pstyle_page_id', array(), $select::JOIN_LEFT);
		
		$select->join('melis_cms_style', ' melis_cms_style.style_id = melis_cms_page_style.pstyle_style_id', array('*'), $select::JOIN_LEFT);
		
		if ($type == 'published' || $type == '')
			$select->join('melis_cms_page_published', 'melis_cms_page_published.page_id = melis_cms_page_tree.tree_page_id', 
							array('*'), $select::JOIN_LEFT);
		
		if ($type == 'saved')
			$select->join('melis_cms_page_saved', 'melis_cms_page_saved.page_id = melis_cms_page_tree.tree_page_id', 
							array('*'), $select::JOIN_LEFT);
		
		if ($type == '')
		{
			$columns = $this->aliasColumnsFromTableDefinition('MelisEngine\MelisPageColumns', 's_');
			$select->join('melis_cms_page_saved', 'melis_cms_page_saved.page_id = melis_cms_page_tree.tree_page_id',
						$columns, $select::JOIN_LEFT);
		}
		
		$select->join('melis_cms_page_seo', 'melis_cms_page_seo.pseo_id = melis_cms_page_tree.tree_page_id',
		    array('*'), $select::JOIN_LEFT);
		
		$select->where('tree_page_id = ' . $id);
		
		$resultSet = $this->tableGateway->selectWith($select);
		
		return $resultSet;
	}
public function getFullDatasPage($id, $type = '')
	{
		$select = $this->tableGateway->getSql()->select();
		
		$select->columns(array('*'));
		
		$select->join('melis_cms_page_lang', 'melis_cms_page_lang.plang_page_id = melis_cms_page_tree.tree_page_id', 
						array('plang_lang_id'));
		$select->join('melis_cms_lang', 'melis_cms_lang.lang_cms_id = melis_cms_page_lang.plang_lang_id', 
						array('*'), $select::JOIN_LEFT);
		$select->join('melis_cms_page_style', 'melis_cms_page_tree.tree_page_id = melis_cms_page_style.pstyle_page_id', array(), $select::JOIN_LEFT);
		
		$select->join('melis_cms_style', ' melis_cms_style.style_id = melis_cms_page_style.pstyle_style_id', array('*'), $select::JOIN_LEFT);
		
		if ($type == 'published' || $type == '')
			$select->join('melis_cms_page_published', 'melis_cms_page_published.page_id = melis_cms_page_tree.tree_page_id', 
							array('*'), $select::JOIN_LEFT);
		
		if ($type == 'saved')
			$select->join('melis_cms_page_saved', 'melis_cms_page_saved.page_id = melis_cms_page_tree.tree_page_id', 
							array('*'), $select::JOIN_LEFT);
		
		if ($type == '')
		{
			$columns = $this->aliasColumnsFromTableDefinition('MelisEngine\MelisPageColumns', 's_');
			$select->join('melis_cms_page_saved', 'melis_cms_page_saved.page_id = melis_cms_page_tree.tree_page_id',
						$columns, $select::JOIN_LEFT);
		}
		
		$select->join('melis_cms_page_seo', 'melis_cms_page_seo.pseo_id = melis_cms_page_tree.tree_page_id',
		    array('*'), $select::JOIN_LEFT);
		
		$select->where('tree_page_id = ' . $id);
		
		$resultSet = $this->tableGateway->selectWith($select);
		
		return $resultSet;
	}
public function getFullDatasPage ( $ id , $ type = '' ) { $ select = $ this -> tableGateway -> getSql ( ) -> select ( ) ; $ select -> columns ( array ( '*' ) ) ; $ select -> join ( 'melis_cms_page_lang' , 'melis_cms_page_lang.plang_page_id = melis_cms_page_tree.tree_page_id' , array ( 'plang_lang_id' ) ) ; $ select -> join ( 'melis_cms_lang' , 'melis_cms_lang.lang_cms_id = melis_cms_page_lang.plang_lang_id' , array ( '*' ) , $ select :: JOIN_LEFT ) ; $ select -> join ( 'melis_cms_page_style' , 'melis_cms_page_tree.tree_page_id = melis_cms_page_style.pstyle_page_id' , array ( ) , $ select :: JOIN_LEFT ) ; $ select -> join ( 'melis_cms_style' , ' melis_cms_style.style_id = melis_cms_page_style.pstyle_style_id' , array ( '*' ) , $ select :: JOIN_LEFT ) ; if ( $ type == 'published' || $ type == '' ) $ select -> join ( 'melis_cms_page_published' , 'melis_cms_page_published.page_id = melis_cms_page_tree.tree_page_id' , array ( '*' ) , $ select :: JOIN_LEFT ) ; if ( $ type == 'saved' ) $ select -> join ( 'melis_cms_page_saved' , 'melis_cms_page_saved.page_id = melis_cms_page_tree.tree_page_id' , array ( '*' ) , $ select :: JOIN_LEFT ) ; if ( $ type == '' ) { $ columns = $ this -> aliasColumnsFromTableDefinition ( 'MelisEngine\MelisPageColumns' , 's_' ) ; $ select -> join ( 'melis_cms_page_saved' , 'melis_cms_page_saved.page_id = melis_cms_page_tree.tree_page_id' , $ columns , $ select :: JOIN_LEFT ) ; } $ select -> join ( 'melis_cms_page_seo' , 'melis_cms_page_seo.pseo_id = melis_cms_page_tree.tree_page_id' , array ( '*' ) , $ select :: JOIN_LEFT ) ; $ select -> where ( 'tree_page_id = ' . $ id ) ; $ resultSet = $ this -> tableGateway -> selectWith ( $ select ) ; return $ resultSet ; }
Gets full datas for a page from tree, page saved, paged published, lang
@param int $id PageId
@param string $type saved or published to limit
Gets full datas for a page from tree page saved paged published lang