{i18n}Document Links{/i18n}

{i18n}The current links to and from this document are displayed below.{/i18n}

{if $links_from || $links_to} {foreach from=$links_from item=link} {assign var="type" value=$link->getLinkType()} {assign var="target" value=$link->getChildDocument()} {php} $target = $this->get_template_vars('target'); $this->assign('docOK', method_exists($target,'getId')); // $methodVariable = array($target, 'getId' ); // var_dump(is_callable($methodVariable, false, $callable_name )); // bool(true) {/php} {if $docOK} {else} {/if} {/foreach} {foreach from=$links_to item=link} {assign var="type" value=$link->getLinkType()} {assign var="target" value=$link->getParentDocument()} {php} $target = $this->get_template_vars('target'); $this->assign('docOK', method_exists($target,'getId')); {/php} {if $docOK} {else} {/if} {/foreach} {else} {/if}
  {i18n}Target{/i18n} {i18n}Type{/i18n} {i18n}Relationship{/i18n}
{if $write_permission} {i18n}Delete{/i18n} {else}   {/if} getId()}&qs[action]=main">{$target->getName()} {$type->getName()}{i18n}This document has been deleted.{/i18n}{i18n}Linked from this document{/i18n}
{if $write_permission} {i18n}Delete{/i18n} {else}   {/if} getId()}&qs[action]=main">{$target->getName()}{i18n}This document has been deleted.{/i18n}{$type->getName()} {i18n}Links to this document{/i18n}
{i18n}There are no links to or from this document.{/i18n}

{if $write_permission} {i18n}Add a new link{/i18n} {i18n}Add a new link{/i18n}. {/if}