grantus
Active member
I'm working on my controller file and for testing purposes I just want to pass a variable through to my Entity so that it can be saved into the db 'filesize' column.
I want to be able to get the 'filesize' value through. So far the only values I'm able to get are through my form or default values I have in my Entity structure. How can I pass through the 'filesize' value?
Code:
public function actionAdd()
{
$store = $this->em()->create('Path\To:Manage');
$store->filesize = 12345;
return $this->storeAddEdit($store);
}
public function actionEdit(ParameterBag $params)
{
$store = $this->assertStoreExists($params->store_id);
$store->filesize = 12345;
return $this->storeAddEdit($store);
}
protected function storeAddEdit(\Path\To\Entity\Manage $store)
{
$viewParams = [
'store' => $store
];
return $this->view('Path\To:Manage\Edit', 'manage_edit', $viewParams);
}
I want to be able to get the 'filesize' value through. So far the only values I'm able to get are through my form or default values I have in my Entity structure. How can I pass through the 'filesize' value?