Fixed the compiler to insure the getExImPortHeaders method is added even when no custom script has been set

This commit is contained in:
2018-01-18 01:28:44 +02:00
parent 189a8723ac
commit f692e573f6
16 changed files with 382 additions and 3 deletions

View File

@ -270,6 +270,33 @@ class ComponentbuilderModelLanguages extends JModelList
}
}
return false;
}
/**
* Method to get header.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getExImPortHeaders()
{
// Get a db connection.
$db = JFactory::getDbo();
// get the columns
$columns = $db->getTableColumns("#__componentbuilder_language");
if (ComponentbuilderHelper::checkArray($columns))
{
// remove the headers you don't import/export.
unset($columns['asset_id']);
unset($columns['checked_out']);
unset($columns['checked_out_time']);
$headers = new stdClass();
foreach ($columns as $column => $type)
{
$headers->{$column} = $column;
}
return $headers;
}
return false;
}
/**