File: template/github_wiki.twig

Recommend this page to a friend!
  Classes of Stefan Kientzler  >  PHPDoc 2 Github Wiki  >  template/github_wiki.twig  >  Download  
File: template/github_wiki.twig
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHPDoc 2 Github Wiki
Generate documentation for packages in GitHub
Author: By
Last change:
Date: 3 months ago
Size: 1,970 bytes
 

Contents

Class file image Download
{#
Create github wiki link to class
#}
{% macro ClassLink(node, name = null) %}
[{{ name | default(node.name) }}]({{ './Class-' ~ node.Name }}){% endmacro %}

{#Create github wiki link to trait
#}
{% macro TraitLink(node, name = null) %}
[{{ name | default(node.name) }}]({{ './Trait-' ~ node.Name }}){% endmacro %}

{#
Create github wiki link to interface
#}
{% macro InterfaceLink(node, name = null) %}
[{{ name | default(node.name) }}]({{ './Interface-' ~ node.Name }}){% endmacro %}

{#
Create github wiki link from see reference
#}
{% macro SeeLink(node) %}
{% set link = node.reference|split('::')|first %}
{% set anchor = '' %}
{% set description = node.reference %}
{% if node.reference|split('::')|length > 1 %}{% set anchor = '#' ~ node.reference|split('::')|last|lower|trim('()') %}{% endif %}
{% if node.description and node.description != '' %}{% set description = node.description|raw %}{% endif %}
[{{ description }}](Class-{{ link|split('\\')|last ~ anchor }}){% endmacro %}

{#
Create github wiki link from link reference
#}
{% macro LinkLink(node) %}
{% set description = node.link %}
{% if node.description and node.description != '' %}{% set description = node.description|raw %}{% endif %}
{# MD-syntax (No target!):   [{{ description }}]({{ node.link }}) #}
{% autoescape false %}<a target="_blank" href="{{ node.link }}">{{ description }}</a> {% endautoescape %}{% endmacro %}

{#
Format description string
argument.description|replace({'|':'&#124;'})|nl2br|replace({"\n": "", "\r": "", "\t": ""})|raw
#}
{% macro FormatDescription(text) %}
{% autoescape false %}{{ text|replace({'|':'&#124;'})|replace({"\n": " ", "\r": " ", "\t": " "}) }}{% endautoescape %}{% endmacro %}

{#
custom image
argument.description|replace({'|':'&#124;'})|nl2br|replace({"\n": "", "\r": "", "\t": ""})|raw
#}
{% macro Image(image) %}
{% set imagepath = './images/' %}
![{{ image.description|lower|split('.')[0] }}]({{ imagepath ~ image.description }}){% endmacro %}

For more information send a message to info at phpclasses dot org.