Software::getSpecificMassiveActions PHP Method

getSpecificMassiveActions() public method

See also: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )
    function getSpecificMassiveActions($checkitem = NULL)
    {
        $isadmin = static::canUpdate();
        $actions = parent::getSpecificMassiveActions($checkitem);
        if ($isadmin && countElementsInTable("glpi_rules", ['sub_type' => 'RuleSoftwareCategory']) > 0) {
            $actions[__CLASS__ . MassiveAction::CLASS_ACTION_SEPARATOR . 'compute_software_category'] = __('Recalculate the category');
        }
        if (Session::haveRightsOr("rule_dictionnary_software", array(CREATE, UPDATE)) && countElementsInTable("glpi_rules", ['sub_type' => 'RuleDictionnarySoftware']) > 0) {
            $actions[__CLASS__ . MassiveAction::CLASS_ACTION_SEPARATOR . 'replay_dictionnary'] = __('Replay the dictionary rules');
        }
        if ($isadmin) {
            MassiveAction::getAddTransferList($actions);
        }
        return $actions;
    }