• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question How can I use pm_Hook_Applications for scan applications?

sfsdg

New Pleskian
Hi, I'm need to scan WordPress applications. How can I use pm_Hook_Applications for scan applications?

I'm created Applilcations.php file on
Code:
 /usr/local/psa/admin/plib/modules/wys-center/hooks
path and here is my code;

Code:
<?php

class Modules_WysCenter_Applications implements pm_Hook_Applications
{
    /**
     * Handle application scan event
     * @param pm_Domain $domain
     */
    public function scan($domain) {
    }
    /**
     * Filter application to handle it by using a specific non-APS resources
     *
     * @param pm_Domain $domain
     * @param string $path
     * @return bool
     */
    public function isFiltered($domain, $path) { }
}
 
Last edited:
Hello @sfsdg,

Extensions API Documentation - Plesk 17.5

This hock is designed to a APS applications integration only. The "scan" method is called when somebody press button "Scan" in Applications tab. Here you've got a \pm_Domain object and you can implement any bussiness logic here according your's extension needs.

Method "isFiltered" is designed to display only the necessary applications according your bussiness logic. For example you don't wanna to show an APS application wich placed at some domain (example.com) with path "/wordpress/test-app/".

So you shouldn't implement this hook unlles you want to integrate your extension with Plesk APS feature
 
Back
Top