getMassiveActionsForItemtype() static public method

Get all the massive actions available for the current class regarding given itemtype
static public getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL ) : nothing
$actions array array of the actions to update
$itemtype the type of the item for which we want the actions
$is_deleted (default 0)
$checkitem CommonDBTM (default NULL)
return nothing (update is set inside $actions)
 /**
  * @since version 0.85
  *
  * @see CommonDBTM::getMassiveActionsForItemtype()
  **/
 static function getMassiveActionsForItemtype(array &$actions, $itemtype, $is_deleted = 0, CommonDBTM $checkitem = NULL)
 {
     $unaffect = false;
     $affect = false;
     if (Toolbox::is_a($itemtype, 'CommonDBChild')) {
         $specificities = $itemtype::getConnexityMassiveActionsSpecificities();
         if (!$itemtype::$mustBeAttached) {
             $unaffect = true;
             $affect = true;
         } else {
             if ($specificities['reaffect']) {
                 $affect = true;
             }
         }
     } else {
         if (Toolbox::is_a($itemtype, 'CommonDBRelation')) {
             $specificities = $itemtype::getConnexityMassiveActionsSpecificities();
             if (!$itemtype::$mustBeAttached_1 || !$itemtype::$mustBeAttached_2) {
                 $unaffect = true;
                 $affect = true;
             } else {
                 if ($specificities['reaffect']) {
                     $affect = true;
                 }
             }
         } else {
             return;
         }
     }
     $prefix = __CLASS__ . MassiveAction::CLASS_ACTION_SEPARATOR;
     if ($unaffect) {
         $actions[$prefix . 'unaffect'] = $specificities['action_name']['unaffect'];
     }
     if ($affect) {
         $actions[$prefix . 'affect'] = $specificities['action_name']['affect'];
     }
     parent::getMassiveActionsForItemtype($actions, $itemtype, $is_deleted, $checkitem);
 }