_helper = $helper; $license = $helper->get(); if ($this->_helper->isEnabled() && !empty($license) && isset($license->data->the_key) && $license->data->the_key == $helper->getSystemDefaultValue('athlete2_license/general/code') && $license->data->status == "active" ) { try { if (!$this->_helper->validate()) { throw new Exception('License validate failed'); } } catch (Exception $e) { $this->_text = sprintf(__('Olegnax Athlete2: %s'), $e->getMessage()); } } } public function getIdentity() { return static::MESSAGE_IDENTITY; } public function getSeverity() { return MessageInterface::SEVERITY_CRITICAL; } public function isDisplayed() { $text = $this->getText(); return !empty($text); } public function getText() { return $this->_text; } }