From f6f0894209ab38e9bfd491be7b81a54e2bbb942c Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:03:56 +0100 Subject: [PATCH] Get #2584 enhancements --- .../.phpdoc/template/base.html.twig | 1 + .../.phpdoc/template/class.html.twig | 18 ++-- .../template/components/class-title.html.twig | 13 ++- .../template/components/edition-tag.html.twig | 29 +++--- .../components/interface-title.html.twig | 2 + .../template/components/properties.html.twig | 11 ++- .../template/components/tags.html.twig | 4 +- .../template/components/trait-title.html.twig | 22 +++++ .../.phpdoc/template/css/base.css.twig | 5 ++ .../.phpdoc/template/css/custom.css.twig | 8 ++ .../.phpdoc/template/interface.html.twig | 2 +- .../.phpdoc/template/js/external-links.js | 10 +++ .../.phpdoc/template/layout.html.twig | 1 + .../.phpdoc/template/trait.html.twig | 89 +++++++++++++++++++ tools/php_api_ref/phpdoc.sh | 7 ++ 15 files changed, 192 insertions(+), 30 deletions(-) create mode 100644 tools/php_api_ref/.phpdoc/template/components/trait-title.html.twig create mode 100644 tools/php_api_ref/.phpdoc/template/js/external-links.js create mode 100644 tools/php_api_ref/.phpdoc/template/trait.html.twig diff --git a/tools/php_api_ref/.phpdoc/template/base.html.twig b/tools/php_api_ref/.phpdoc/template/base.html.twig index fb60a137df..a53b7096d4 100644 --- a/tools/php_api_ref/.phpdoc/template/base.html.twig +++ b/tools/php_api_ref/.phpdoc/template/base.html.twig @@ -6,6 +6,7 @@ {{ parent() }} + diff --git a/tools/php_api_ref/.phpdoc/template/trait.html.twig b/tools/php_api_ref/.phpdoc/template/trait.html.twig new file mode 100644 index 0000000000..010096aa2e --- /dev/null +++ b/tools/php_api_ref/.phpdoc/template/trait.html.twig @@ -0,0 +1,89 @@ +{% extends 'base.html.twig' %} + +{% block title %}{{ node.name }} | {{ parent() }}{% endblock %} +{% block meta %} + + {{ parent() }} +{% endblock %} + +{% block content %} + {% include 'components/breadcrumbs.html.twig' %} + {% include 'components/trait-title.html.twig' %} + {% include 'components/element-header.html.twig' %} + {% include 'components/constants.html.twig' %} + {% include 'components/properties.html.twig' %} + {% include 'components/methods.html.twig' %} +{% endblock %} + +{% block on_this_page %} + {% set constants = constants(node) %} + {% set properties = properties(node) %} + {% set methods = methods(node) %} + + {% if constants is not empty or properties is not empty or methods is not empty %} + + {% endif %} + + +{% endblock %} diff --git a/tools/php_api_ref/phpdoc.sh b/tools/php_api_ref/phpdoc.sh index eb079f84c1..ad91ee853e 100755 --- a/tools/php_api_ref/phpdoc.sh +++ b/tools/php_api_ref/phpdoc.sh @@ -7,6 +7,7 @@ OUTPUT_DIR=${2:-./docs/api/php_api/php_api_reference}; # Path to the directory w DXP_EDITION='commerce'; # Edition from and for which the Reference is built DXP_VERSION='4.6.*'; # Version from and for which the Reference is built +DXP_ADD_ONS=(connector-ai connector-openai); # Packages not included in $DXP_EDITION but added to the Reference, listed without their vendor "ibexa" DXP_EDITIONS=(oss headless experience commerce); # Available editions ordered by ascending capabilities PHPDOC_VERSION='3.5.3'; # Version of phpDocumentor used to build the Reference PHPDOC_CONF="$(pwd)/tools/php_api_ref/phpdoc.dist.xml"; # Absolute path to phpDocumentor configuration file @@ -63,6 +64,12 @@ fi; export COMPOSER_ROOT_VERSION=$DXP_VERSION; +if [ 0 -eq $DXP_ALREADY_EXISTS ]; then + for additional_package in "${DXP_ADD_ONS[@]}"; do + composer require --no-interaction --ignore-platform-reqs --no-scripts ibexa/$additional_package:$DXP_VERSION + done; +fi; + #if [ 0 -eq $DXP_ALREADY_EXISTS ]; then # MY_PACKAGE=''; # MY_BRANCH='';