SilverStripe\CampaignAdmin\AddToCampaignHandler::getObject
Safely get a DataObject from a client-supplied ID and ClassName, checking: argument validity; existence; and canView permissions.
Signature
protected function getObject(int
$id,
string
$class )
Parameters
$id
— int- The ID of the DataObject
$class
— string- The Class of the DataObject
Returns
- DataObject
- The referenced DataObject