Jarves\Propel\Behavior\WorkspaceBehavior::preSave PHP 메소드

preSave() 공개 메소드

Adds the default workspaceId if not set.
public preSave ( $builder ) : string
$builder
리턴 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";
    }