template::util::richtext_or_file::set_property (public)

 template::util::richtext_or_file::set_property what \
    richtext_or_file_list value

Defined in packages/acs-templating/tcl/richtext-or-file-procs.tcl

Set a property of the richtext_or_file datatype. Valid properties are:

  • storage_type
  • mime_type
  • text
  • filename
  • tmp_filename
  • content_url

Parameters:
what (required)
richtext_or_file_list (required)
value (required)

Partial Call Graph (max 5 caller/called nodes):
%3 template::util::richtext_or_file::acquire template::util::richtext_or_file::acquire (public) template::util::richtext_or_file::set_property template::util::richtext_or_file::set_property template::util::richtext_or_file::acquire->template::util::richtext_or_file::set_property

Testcases:
No testcase defined.
Source code:
    lassign richtext_or_file_list storage_type mime_type text filename tmp_filename content_url

    switch -- $what {
        storage_type {
            # Replace contents with value
            return [list $value $mime_type $text $filename $tmp_filename $content_url]
        }
        mime_type {
            # Replace format with value
            return [list $storage_type $value $text $filename $tmp_filename $content_url]
        }
        text {
            # Replace contents with value
            return [list $storage_type $mime_type $value $filename $tmp_filename $content_url]
        }
        filename {
            return [list $storage_type $mime_type $text $value $tmp_filename $content_url]
        }
        tmp_filename {
            return [list $storage_type $mime_type $text $filename $value $content_url]
        }
        content_url {
            return [list $storage_type $mime_type $text $filename $tmp_filename $value]
        }
        default {
            error "Invalid property $what, valid properties are storage_type, mime_type, text, filename, tmp_filanme, content_url."
        }
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: