code: public function attach($owner)
      {
          $this->owner = $owner;
          foreach ($this->events() as $event => $handler) {
              $owner->on($event, is_string($handler) ? [$this, $handler] : $handler);
          }
      }
docs: Attaches the behavior object to the component.
  The default implementation will set the [[owner]] property
  and attach event handlers as declared in [[events]].
  Make sure you call the parent implementation if you override this method.
  @param Component $owner the component that this behavior is to be attached to.