Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Import - Some code
 
Notifications
Clear all

Import - Some code

2 Posts
2 Users
0 Reactions
3,667 Views
 SJ
(@cr0w)
Posts: 11
Active Member
Topic starter
 
[#1179]

Hi,

I would like to understand the following part of the import(...) method in Importable.php.

foreach ($obj as $fld => $val) 
{
				
	if (is_object($val)) 
	{
					
		$objectArray[$fld] = $val;
				
		foreach ($val as $subfld => $subval) 
		{
				
			$capt = $val -> getColCaption($subfld);
			if ($subfld != 'id' and substr($capt, 0, 1) != '[') 
			{
				$captionArray[$capt] = $subfld;
				$captionObjectArray[$capt] = $fld;
			}
			
		}
	} 
	else 
	{
		$capt = $obj -> getColCaption($fld);
		
		if (substr($capt, 0, 1) != '[') 
		{
			$captionArray[$capt] = $fld;
		}
	}
}

Thanx


 
Posted : 23 May 2013 18H18
babynus
(@babynus)
Posts: 14953
Main Contributor Admin
 

This part is dedicated to treatement of included objects.
For instance, in Activities, you have ActivityPlanningElement that correspond to an included object. Data is stored in another table. But you can fluently import data into this table if needed.


 
Posted : 23 May 2013 20H06
Share:

Scroll to Top