Changeset 74726 in spip-zone


Ignore:
Timestamp:
Aug 12, 2013, 3:19:13 PM (6 years ago)
Author:
marcimat@…
Message:

Page de liste des constantes
+ changements dans les ancres pour s'approcher plus des ancres utilisées par phpDocumentor nativement.

Location:
_galaxie_/code.spip.net/autodoc/trunk
Files:
3 added
9 edited

Legend:

Unmodified
Added
Removed
  • _galaxie_/code.spip.net/autodoc/trunk/src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/DirectoryDescriptor.php

    r74607 r74726  
    66namespace autodoc\Plugin\Core\Transformer\Router\UrlGenerator\Zora;
    77
    8 use phpDocumentor\Descriptor\DescriptorAbstract;
    98use phpDocumentor\Transformer\Router\UrlGenerator\UrlGeneratorInterface;
    109
  • _galaxie_/code.spip.net/autodoc/trunk/src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/FileDescriptor.php

    r74595 r74726  
    66namespace autodoc\Plugin\Core\Transformer\Router\UrlGenerator\Zora;
    77
    8 use phpDocumentor\Descriptor\DescriptorAbstract;
    98use phpDocumentor\Transformer\Router\UrlGenerator\UrlGeneratorInterface;
    109
  • _galaxie_/code.spip.net/autodoc/trunk/src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/FunctionDescriptor.php

    r74711 r74726  
    66namespace autodoc\Plugin\Core\Transformer\Router\UrlGenerator\Zora;
    77
    8 use phpDocumentor\Descriptor\DescriptorAbstract;
    98use phpDocumentor\Transformer\Router\UrlGenerator\UrlGeneratorInterface;
    109
     
    2221        $name = str_replace('\\', '/', ltrim($node->getFile()->getPath(), '/'));
    2322
    24         return '/tree/' . $name .'.html#f_' . $node->getName();
     23        return '/tree/' . $name .'.html#function_' . $node->getName();
    2524    }
    2625}
  • _galaxie_/code.spip.net/autodoc/trunk/src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/ProjectDescriptor.php

    r74696 r74726  
    66namespace autodoc\Plugin\Core\Transformer\Router\UrlGenerator\Zora;
    77
    8 use phpDocumentor\Descriptor\DescriptorAbstract;
    98use phpDocumentor\Transformer\Router\UrlGenerator\UrlGeneratorInterface;
    109
  • _galaxie_/code.spip.net/autodoc/trunk/src/autodoc/Plugin/Core/Transformer/Router/ZoraRouter.php

    r74711 r74726  
    1212use phpDocumentor\Descriptor\ProjectDescriptor;
    1313use phpDocumentor\Descriptor\FunctionDescriptor;
     14use phpDocumentor\Descriptor\ConstantDescriptor;
    1415
    1516use autodoc\Plugin\Core\Descriptor\DirectoryDescriptor;
     
    3132        $projectGenerator        = new UrlGenerator\Zora\ProjectDescriptor();
    3233        $functionGenerator       = new UrlGenerator\Zora\FunctionDescriptor();
     34        $constantDescriptor      = new UrlGenerator\Zora\ConstantDescriptor();
    3335
    3436        // @codingStandardsIgnoreStart
     
    3739        $this[] = new Rule(function ($node) { return ($node instanceof ProjectDescriptor); },    $projectGenerator);
    3840        $this[] = new Rule(function ($node) { return ($node instanceof FunctionDescriptor); },   $functionGenerator);
     41        $this[] = new Rule(function ($node) { return ($node instanceof ConstantDescriptor); },   $constantDescriptor);
    3942        // @codingStandardsIgnoreEnd
    4043    }
  • _galaxie_/code.spip.net/autodoc/trunk/templates/zora/inclure/descriptions/constants.twig

    r74707 r74726  
    55
    66                {% set nom = constant.name %}
    7                 {% set nom_id = nom|replace({'$':'-', '{':'-', '}':'-', '"':'-', "'": '-' }) %}
    8                 {% set ancre = '___' ~ nom_id %}
     7                {% set nom_id = 'constant_' ~ nom|replace({'$':'-', '{':'-', '}':'-', '"':'-', "'": '-' }) %}
     8                {% set ancre = '_constant_' ~ nom|replace({'$':'-', '{':'-', '}':'-', '"':'-', "'": '-' }) %}
    99                {% set api = constant.tags.api.count %}
    1010                {% set deprecated = constant.deprecated %}
     
    4444
    4545
    46                                         {% for tagName,tags in constant.tags %}
     46                                        {% for tagName,tags in constant.tags if tagName not in ['var'] %}
    4747                                                {% include "inclure/descriptions/tags.twig"
    4848                                                with {
  • _galaxie_/code.spip.net/autodoc/trunk/templates/zora/inclure/descriptions/functions.twig

    r74716 r74726  
    99                {% set api = function.tags.api %}
    1010                {% set deprecated = function.tags.deprecated %}
    11                 {% set nom_id = 'f_' ~ nom %}
    12                 {% set ancre = '___' ~ nom_id %}
     11                {% set nom_id = 'function_' ~ nom %}
     12                {% set ancre = '_function_' ~ nom %}
    1313
    1414                <div id="{{ nom_id }}" class="accordion-group">
  • _galaxie_/code.spip.net/autodoc/trunk/templates/zora/inclure/descriptions/properties.twig

    r74721 r74726  
    55
    66                {% set nom = property.name %}
    7                 {% set nom_id = nom|replace({'$':''}) %}
    8                 {% set ancre = '___' ~ nom_id %}
     7                {% set nom_id = 'property_' ~ nom|replace({'$':''}) %}
     8                {% set ancre = '_property_' ~ nom|replace({'$':''}) %}
    99                {% set api = property.tags.api %}
    1010                {% set deprecated = property.tags.deprecated %}
  • _galaxie_/code.spip.net/autodoc/trunk/templates/zora/template.xml

    r74723 r74726  
    3636    <transformation writer="twig" source="templates/zora/navigation.twig" artifact="navigation.html"/>
    3737    <transformation writer="twig" source="templates/zora/classes.twig" artifact="classes.html"/>
     38    <transformation writer="twig" source="templates/zora/constantes.twig" artifact="constantes.html"/>
    3839
    3940    <!-- gestion des objets générées en twig -->
Note: See TracChangeset for help on using the changeset viewer.