The value is not null
, it's an empty string. So you could for example do a strict check for that exact value, ie:
if ($this->request->getData('viewdata') === '') {
// view data submit button was used
}
Or just check for the keys existence by comparing against null
:
if ($this->request->getData('viewdata') !== null) {
// view data submit button was used
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…