original_string: public function addClose()
      {
          if ($this->recall('closed', false)) {
              $this->destroy();
          }
  
          $self = $this;
          /** @type Icon $icon */
          $icon = $this->add('Icon', null, 'Button');
          $icon
              ->addComponents(array('size' => 'mega'))
              ->set('cancel-1')
              ->addStyle(array('cursor' => 'pointer'))
              ->on('click', function ($js) use ($self) {
                  $self->memorize('closed', true);
  
                  return $self->js()->hide()->execute();
              });
  
          return $this;
      }
code: public function addClose()
      {
          if ($this->recall('closed', false)) {
              $this->destroy();
          }
  
          $self = $this;
          /** @type Icon $icon */
          $icon = $this->add('Icon', null, 'Button');
          $icon
              ->addComponents(array('size' => 'mega'))
              ->set('cancel-1')
              ->addStyle(array('cursor' => 'pointer'))
              ->on('click', function ($js) use ($self) {
                  $self->memorize('closed', true);
  
                  return $self->js()->hide()->execute();
              });
  
          return $this;
      }
code_tokens: public function addClose ( ) { if ( $ this -> recall ( 'closed' , false ) ) { $ this -> destroy ( ) ; } $ self = $ this ; /** @type Icon $icon */ $ icon = $ this -> add ( 'Icon' , null , 'Button' ) ; $ icon -> addComponents ( array ( 'size' => 'mega' ) ) -> set ( 'cancel-1' ) -> addStyle ( array ( 'cursor' => 'pointer' ) ) -> on ( 'click' , function ( $ js ) use ( $ self ) { $ self -> memorize ( 'closed' , true ) ; return $ self -> js ( ) -> hide ( ) -> execute ( ) ; } ) ; return $ this ; }
docstring: View box can be closed by clicking on the cross.
  
  @return $this
docstring_tokens: View box can be closed by clicking on the cross .