Is there a way to get the value of a $protected variable on an object?
In the case of ModelAdmin, it has a protected $currentRecord so when I am in the ModelAdmin in the CMS I expected to be able to:
$record = Controller::curr()->currentRecord;
However that does not work. If I go into CMS/ModelAdmin.php and add:
function Record() {
return $this->currentRecord;
}
and then do:
$record = Controller::curr()->Record();
that works but I don't want to modify a core file like that if I don't have to.