application_data_link::get_links_from (public)
application_data_link::get_links_from -object_id object_id \ [ -to_type to_type ] [ -relation_tag relation_tag ]
Defined in packages/acs-tcl/tcl/application-data-link-procs.tcl
Get a list of objects that are linked from an object, possible using the relation_tag. If to_type is a subtype of content_revision, we lookup content_items that have that content_type
- Switches:
- -object_id (required)
- object_id one, get objects linked from this object
- -to_type (optional)
- object_type of the objects to get links to
- -relation_tag (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- data_links_update_links, data_links_update_links_with_tag
Source code: set to_type_where_clause "" set content_type_from_clause "" if {[info exists to_type] && $to_type ne ""} { set to_type_clause [db_map to_type_where_clause] if {[content::type::is_content_type -object_type $to_type]} { set to_type_clause [db_map content_type_where_clause] set content_type_from_clause [db_map content_type_from_clause] } } return [db_list links_from {}]XQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="application_data_link::get_links_from.links_from"> <querytext> select object_id_two from acs_data_links, acs_objects $content_type_from_clause where object_id_one = :object_id and object_id = object_id_two [application_data_link::relation_tag_where_clause -relation_tag $relation_tag] $to_type_where_clause </querytext> </fullquery> <fullquery name="application_data_link::get_links_from.to_type_clause"> <querytext> and object_type = :to_type </querytext> </fullquery> <fullquery name="application_data_link::get_links_from.content_type_from_clause"> <querytext> , cr_items </querytext> </fullquery> <fullquery name="application_data_link::get_links_from.content_type_where_clause"> <querytext> and content_type = :object_type </querytext> </fullquery>packages/acs-tcl/tcl/application-data-link-procs.xql