private static function countForAccount(PluginAccountsAccount $item) { $types = implode("','", $item->getTypes()); if (empty($types)) { return 0; } return countElementsInTable('glpi_plugin_accounts_accounts_items', "`itemtype` IN ('{$types}')\n AND `plugin_accounts_accounts_id` = '" . $item->getID() . "'"); }