Hi, How do perform if else statement in the setup function?
I tried to insert if else statement before using the Filter process. I encountered error "array_merge(): Argument #1 is not an array in ..../Table.php".
Example of my setup() function:
$type = $this->params["type"];
if ($type = "A")
{ $pid = "1"; }
else
{ $pid = "2"; }
$this->src('products')
->pipe(new Filter(array(
array("id","=",$pid),
array("active_flag","=","Y"),
array("eligible","contain",$sts)
)))