Kimai_Database_Mysql::assignActivityToProjectsForGroup PHP Method

assignActivityToProjectsForGroup() public method

Projects that are currently associated with the Activity but not mentioned in the specified id collection, will get un-assigned. The fundamental difference to assign_activityToProjects(activityID, projectIDs) is that this method is aware of potentially existing assignments that are invisible and thus unmanagable to the user as the user lacks access to the Projects. It is implicitly assumed that the user has access to the Activity and the Projects designated by the method parameters.
public assignActivityToProjectsForGroup ( integer $activityID, array $projectIDs, integer $group ) : boolean
$activityID integer the id of the Activity to associate
$projectIDs array the array of Project ids to associate
$group integer the user's group id
return boolean
    public function assignActivityToProjectsForGroup($activityID, $projectIDs, $group)
    {
        $projectIds = array_merge($projectIDs, $this->getNonManagableAssignedElementIds("activity", "project", $activityID, $group));
        return $this->assign_activityToProjects($activityID, $projectIds);
    }
Kimai_Database_Mysql