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);
    }
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);
    }
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 ) ; }
register the component class

@param string $class
register the component class