customers_collection

Allows generation of custom contact lists displayed in Contacts app.

Shop-Script

Input (passed by reference)

$params array
$params['collection'] waContactsCollection Class instance to enable access to contact collection.
… your plugin code …

Output

Boolean value denoting whether plugin has processed requested URL to display contacts; e.g., /webasyst/contacts/#contacts/search/shop_customers/myplugin/1/

Shop-Script

Plugin code example

PHP

public function customersCollection($params)
{
    $collection = $params['collection'];
    $hash = $collection->getHash();

    if ($hash[1] == 'myplugin') {
        $collection->addWhere('create_method = "signup"');
        return true;
    }

    return false;
}