Jarves\Propel\Behavior\WorkspaceBehavior::preSave PHP Method

preSave() public method

Adds the default workspaceId if not set.
public preSave ( $builder ) : string
$builder
return string The code to put at the hook
    public function preSave($builder)
    {
        return "\n//set default values\n\$this->" . $this->getColumnSetter($this->prefix . 'id') . "(call_user_func_array(" . var_export($this->workspaceGetter, true) . ", array()));\n\$this->" . $this->getColumnSetter($this->prefix . 'action') . "(\$isInsert ? 1 : 2); //created\n\$this->" . $this->getColumnSetter($this->prefix . 'action_date') . "(time());\n";
    }