code: private function initializeEventHandlers()
      {
          $this->owner->on(Widget::EVENT_BEFORE_RUN, [$this, 'beforeRun']);
          $this->owner->on(Widget::EVENT_AFTER_RUN, [$this, 'afterRun']);
      }
docs: Initializes widget event handlers.