xowiki::test::require_link (private)
xowiki::test::require_link name parent_id package_id target_ref
Defined in packages/xowiki/tcl/test/test-procs.tcl
- Parameters:
- name (required)
- parent_id (required)
- package_id (required)
- target_ref (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xowiki_test_cases, link_tests
Source code: set item_id [::xo::db::CrClass lookup -name $name -parent_id $parent_id] if {$item_id == 0} { set form_id [::$package_id instantiate_forms -forms en:link.form] set f [::$form_id create_form_page_instance -name $name -nls_language en_US -instance_attributes [list link $target_ref] -default_variables [list title "Link $name -> $target_ref" parent_id $parent_id package_id $package_id]] $f publish_status ready $f save_new set item_id [$f item_id] } aa_log " $name => $item_id" return $item_idXQL Not present: Generic, PostgreSQL, Oracle