CommonITILObject::countActiveObjectsForTechGroup PHP Метод

countActiveObjectsForTechGroup() публичный Метод

Count active ITIL Objects assigned to a group
public countActiveObjectsForTechGroup ( $groups_id ) : integer
$groups_id integer ID of the User
Результат integer
    function countActiveObjectsForTechGroup($groups_id)
    {
        $linkclass = new $this->grouplinkclass();
        $itemtable = $this->getTable();
        $itemtype = $this->getType();
        $itemfk = $this->getForeignKeyField();
        $linktable = $linkclass->getTable();
        return countElementsInTable(array($itemtable, $linktable), getEntitiesRestrictRequest("", $itemtable) . "\n                                    AND `{$linktable}`.`{$itemfk}` = `{$itemtable}`.`id`\n                                    AND `{$linktable}`.`groups_id` = '{$groups_id}'\n                                    AND `{$linktable}`.`type` = '" . CommonITILActor::ASSIGN . "'\n                                    AND `{$itemtable}`.`is_deleted` = 0\n                                    AND `{$itemtable}`.`status`\n                                       NOT IN ('" . implode("', '", array_merge($this->getSolvedStatusArray(), $this->getClosedStatusArray())) . "')");
    }
CommonITILObject