original_string: protected function registerComponent($class)
      {
          $component = $this->app->make($class);
          if (! ($component instanceof ComponentInterface)) {
              throw new InvalidArgumentException(
                  sprintf(
                      'Class "%s" must be instanced of "%s".',
                      $component,
                      ComponentInterface::class
                  )
              );
          }
  
          if ($component instanceof Initializable) {
              $component->initialize();
          }
  
          $component->addToNavigation();
  
          $this->app['admin.components']->put($component->getName(), $component);
      }
code: protected function registerComponent($class)
      {
          $component = $this->app->make($class);
          if (! ($component instanceof ComponentInterface)) {
              throw new InvalidArgumentException(
                  sprintf(
                      'Class "%s" must be instanced of "%s".',
                      $component,
                      ComponentInterface::class
                  )
              );
          }
  
          if ($component instanceof Initializable) {
              $component->initialize();
          }
  
          $component->addToNavigation();
  
          $this->app['admin.components']->put($component->getName(), $component);
      }
code_tokens: protected function registerComponent ( $ class ) { $ component = $ this -> app -> make ( $ class ) ; if ( ! ( $ component instanceof ComponentInterface ) ) { throw new InvalidArgumentException ( sprintf ( 'Class "%s" must be instanced of "%s".' , $ component , ComponentInterface :: class ) ) ; } if ( $ component instanceof Initializable ) { $ component -> initialize ( ) ; } $ component -> addToNavigation ( ) ; $ this -> app [ 'admin.components' ] -> put ( $ component -> getName ( ) , $ component ) ; }
docstring: register the component class
  
  @param string $class
docstring_tokens: register the component class