function getContextID() { $context_id = parent::getContextID(); if ($context_id == 0) { $context_id = $this->_environment->getCurrentContextID(); } return (int) $context_id; }