src/AddToCampaignHandler.php
protected function getInChangeSets($object)
    {
        $inChangeSetIDs = array_unique(ChangeSetItem::get_for_object($object)->column('ChangeSetID'));
        if ($inChangeSetIDs > 0) {
            $changeSets = $this->getAvailableChangeSets()->filter([
                'ID' => $inChangeSetIDs,
                'State' => ChangeSet::STATE_OPEN
            ]);
        } else {
            $changeSets = new ArrayList();
        }

        return $changeSets;
    }
protected function getInChangeSets($object)
    {
        $inChangeSetIDs = array_unique(ChangeSetItem::get_for_object($object)->column('ChangeSetID'));
        if ($inChangeSetIDs > 0) {
            $changeSets = $this->getAvailableChangeSets()->filter([
                'ID' => $inChangeSetIDs,
                'State' => ChangeSet::STATE_OPEN
            ]);
        } else {
            $changeSets = new ArrayList();
        }

        return $changeSets;
    }
protected function getInChangeSets ( $ object ) { $ inChangeSetIDs = array_unique ( ChangeSetItem :: get_for_object ( $ object ) -> column ( 'ChangeSetID' ) ) ; if ( $ inChangeSetIDs > 0 ) { $ changeSets = $ this -> getAvailableChangeSets ( ) -> filter ( [ 'ID' => $ inChangeSetIDs , 'State' => ChangeSet :: STATE_OPEN ] ) ; } else { $ changeSets = new ArrayList ( ) ; } return $ changeSets ; }
Get changesets that a given object is already in

@param DataObject
@return ArrayList[ChangeSet]
Get changesets that a given object is already in