Populate API file

Created on 8 December 2016, over 7 years ago
Updated 4 August 2023, 11 months ago

I thought I'd fill in the API docs for the one hook. I think I got it all right, but since it's "official" documentation it's worth having a second set of eyes.

πŸ“Œ Task
Status

Needs work

Version

2.0

Component

Documentation

Created by

πŸ‡©πŸ‡ͺGermany rupl

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany rupl

    The API file seems fairly populated, but TBH I didn't evaluate whether it reflected the current state of the D8+ module.

    https://git.drupalcode.org/project/pwa/-/blob/8.x-1.x/pwa.api.php

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    As of #8

  • Status changed to Needs work about 1 year ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    As of #8

  • πŸ‡©πŸ‡ͺGermany ChristianAdamski Berlin, Germany

    Currently listed in .api.php:

    hook_pwa_cache_urls_alter(&$cacheUrls, CacheableMetadata &$cacheableMetadata) {
    hook_pwa_exclude_urls_alter(&$excludeUrls, CacheableMetadata &$cacheableMetadata) {
    hook_pwa_cache_urls_assets_alter(&$resources) {
    hook_pwa_cache_urls_assets_page_alter(&$resources, $page, $xpath) {
    hook_pwa_manifest_alter(&$manifestData) {
    

    Used alter hooks as of 2.x-rc2:

    Module:
    - pwa_install_path
    - pwa_cache_urls_assets_page
    - pwa_cache_urls_assets
    - pwa_cache_urls
    - pwa_exclude_urls
    - pwa_replace_placeholders
    - pwa_manifest

    Missing in .api.php:
    - hook_pwa_install_path_alter
    - hook_pwa_replace_placeholders_alter

    Theme alter hooks:
    - pwa_cache_urls_assets_page
    - pwa_manifest

  • πŸ‡©πŸ‡ͺGermany ChristianAdamski Berlin, Germany

    Function definitions:

    \Drupal::moduleHandler()->alter('pwa_install_path', $installPath);
    
    $this->moduleHandler->alter('pwa_replace_placeholders', $replace);
    

    Therefor api additions:

    function hook_pwa_install_path_alter(&$installPath) {
    
    function hook_pwa_replace_placeholders_alter(&$replace) {
    

    No idea what these do. Also: use TypeHints?

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
Production build 0.69.0 2024