$id = (int) $this->getState($this->getName() . '.id');
$id = (int) $model->getState($model->getName() . '.id');