I'm using a helper which is called by an Joomla-CLI-Script. In this script I would like to add items to my database using JTable::store.
In the storing-process I'm checking some JINPUT-values, that are not stored to the database. The inputs come from fields I defined in my fields.xml.
This is my source so far:
/**
* generateItem function.
*
* @access public
* @param mixed $jsontable
* @param mixed $ids
* @return void
*/
public function generateItem($jsontable, $ids)
{
$app = JFactory::getApplication();
$input = $app->input;
$input->set('creationdate', JFactory::getDate()->toSql());
// Lets store it!
$row = JTable::getInstance('Item','BestiaTable');
$row->check();
$store = $row->store();
if($store == true) return $row->id;
else return false;
}
Well, now I got the following problem: The item IS fetchable in JTable::store
with
$jinput = JFactory::getApplication()->input;
var_dump($jinput->get('creationdate'));
If I run it via CLI - but if I save the item via admin-backend (there is a form to create items the manual way without CLI) I'm getting NULL for my var_dump.
Is there any possibility to solve that problem?
Thanks a LOT in advance! :-)