Register DataTables macro methods.

@return void
498400
protected function registerMacro()
    {
        DataTableAbstract::macro(
            'setTransformer', function ($transformer) {
                $this->transformer = [$transformer];

                return $this;
            }
        );

        DataTableAbstract::macro(
            'addTransformer', function ($transformer) {
                $this->transformer[] = $transformer;

                return $this;
            }
        );

        DataTableAbstract::macro(
            'setSerializer', function ($serializer) {
                $this->serializer = $serializer;

                return $this;
            }
        );
    }
1372743
protected function registerCommands()
    {
        $this->commands(Commands\SetupCommand::class);
        $this->commands(Commands\MakeCommand::class);
        $this->commands(Commands\InstallCommand::class);
        $this->commands(Commands\UninstallCommand::class);
        $this->commands(Commands\UpdateCommand::class);
        $this->commands(Commands\CheckCommand::class);
        $this->commands(Commands\EnableCommand::class);
        $this->commands(Commands\DisableCommand::class);
        $this->commands(Commands\InfoCommand::class);
        $this->commands(Commands\ListCommand::class);
    }
644795
public static function registerColumnDisplayer()
    {
        $map = [
            'editable'    => \Core\Admin\Grid\Displayers\Editable::class,
            'switch'      => \Core\Admin\Grid\Displayers\SwitchDisplay::class,
            'switchGroup' => \Core\Admin\Grid\Displayers\SwitchGroup::class,
            'select'      => \Core\Admin\Grid\Displayers\Select::class,
            'image'       => \Core\Admin\Grid\Displayers\Image::class,
            'label'       => \Core\Admin\Grid\Displayers\Label::class,
            'button'      => \Core\Admin\Grid\Displayers\Button::class,
            'link'        => \Core\Admin\Grid\Displayers\Link::class,
            'badge'       => \Core\Admin\Grid\Displayers\Badge::class,
            'progressBar' => \Core\Admin\Grid\Displayers\ProgressBar::class,
            'radio'       => \Core\Admin\Grid\Displayers\Radio::class,
            'checkbox'    => \Core\Admin\Grid\Displayers\Checkbox::class,
            'orderable'   => \Core\Admin\Grid\Displayers\Orderable::class,
        ];

        foreach ($map as $abstract => $class) {
            Column::extend($abstract, $class);
        }
    }
670837
protected function registerColumns()
    {
        $this->hook->action('admin_init', function () {
            $this->singularity->columns($this->columns());
        })->dispatch();
    }
855655
public function register()
    {
        $this->registerHtmlBuilder();
        $this->registerFormBuilder();
        AliasLoader::getInstance()->alias('Form', BonesMacrosFormFacade::class);
        AliasLoader::getInstance()->alias('HTML', BonesMacrosHtmlFacade::class);
    }
944137
protected function registerCommands()
    {
        $this->app->singleton('cms.commands.models.cache-information', Commands\CacheModelInformation::class);
        $this->app->singleton('cms.commands.models.clear-information-cache', Commands\ClearModelInformationCache::class);
        $this->app->singleton('cms.commands.models.show-information', Commands\ShowModelInformation::class);
        $this->app->singleton('cms.commands.models.write-information', Commands\WriteModelInformation::class);

        $this->commands([
            'cms.commands.models.cache-information',
            'cms.commands.models.clear-information-cache',
            'cms.commands.models.show-information',
            'cms.commands.models.write-information',
        ]);

        return $this;
    }
856403
protected function registerCreateCommand()
    {
        $this->app->singleton('command.schema.create', function ($app) {
            return new SchemaCreateCommand(
                $app['datamapper.classfinder'],
                $app['datamapper.entity.scanner'],
                $app['datamapper.schema.builder'],
                $app['datamapper.eloquent.generator'],
                $app['config']['datamapper']
            );
        });
    }
1186871
public function boot()
    {
        collect(glob(__DIR__ . '/Database/Schema/macros/*.php'))
            ->each(function($path) {
                require $path;
            });

        /* A little hack to have Builder::hasMacro */
        \Illuminate\Database\Eloquent\Builder::macro('hasMacro', function($name) {
            return isset(static::$macros[$name]);
        });

        collect(glob(__DIR__ . '/Models/macros/*.php'))
            ->each(function($path) {
                require $path;
            });
    }
1214753
protected function registerBladeDirectives()
    {
        $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {
            $bladeCompiler->directive('hasrole', function ($role) {
                return "<?php if(has_role({$role})): ?>";
            });
            $bladeCompiler->directive('endhasrole', function () {
                return '<?php endif; ?>';
            });

            $bladeCompiler->directive('may', function ($permission) {
                return "<?php if(may({$permission})): ?>";
            });
            $bladeCompiler->directive('endmay', function () {
                return '<?php endif; ?>';
            });

            $bladeCompiler->directive('maynot', function ($permission) {
                return "<?php if(maynot({$permission})): ?>";
            });
            $bladeCompiler->directive('endmaynot', function () {
                return '<?php endif; ?>';
            });

            $bladeCompiler->directive('mayall', function ($permissions) {
                return "<?php if(mayall({$permissions})): ?>";
            });
            $bladeCompiler->directive('endmayall', function () {
                return '<?php endif; ?>';
            });
        });
    }
1235689
public function register(BladeCompiler $blade): void
    {
        if ($this->namespace) {
            $blade->directive("namespace", function ($parameter) {
                return "<?php namespace {$parameter} ?>";
            });
        }

        if ($this->use) {
            $blade->directive("use", function ($parameter) {
                return "<?php use {$parameter} ?>";
            });
        }

        if ($this->css !== null) {
            $blade->directive("css", function ($parameter) {
                assert(is_string($this->css));
                $file = $this->assetify($parameter, "css", $this->css);
                return "<link rel='stylesheet' type='text/css' href='{$file}'>";
            });
        }

        if ($this->js !== null) {
            $blade->directive("js", function ($parameter) {
                assert(is_string($this->js));
                $file = $this->assetify($parameter, "js", $this->js);
                return "<script type='text/javascript' src='{$file}'></script>";
            });
        }
    }
1165205
private function registerCommands()
    {
        $this->app['commands.drawbridge.migrations'] = $this->app->share(function($app)
        {
            return new MigrationsCommand($app);
        });

        $this->commands(
            array(
                 'commands.drawbridge.migrations'
            )
        );
    }
1129763
public function register()
    {
        // Here we register commands for artisan
        $this->app->singleton('command.closuretable', function ($app) {
            return new ClosureTableCommand;
        });

        $this->app->singleton('command.closuretable.make', function ($app) {
            return $app['Franzose\ClosureTable\Console\MakeCommand'];
        });

        $this->commands('command.closuretable', 'command.closuretable.make');
    }
553005
protected function registerCommands()
    {
        ensure_trait_used_in_subclass_of_or_fail(self::class, $this, ServiceProvider::class);

        foreach (array_keys($this->commands) as $command) {
            $method = "register{$command}Command";
            call_user_func_array([$this, $method], []);
        }
        $this->commands(array_values($this->commands));
    }
691086
public function registerCommands()
	{
		$this->app->singleton('command.cache.clear', function($app)
		{
			return new ClearCommand($app['cache']);
		});

		$this->app->singleton('command.cache.table', function($app)
		{
			return new CacheTableCommand($app['files'], $app['composer']);
		});

		$this->commands('command.cache.clear', 'command.cache.table');
	}
461952
public function register_cli() {
		if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
			return;
		}
		self::$list[$this->table] = get_called_class();
		if ( self::$initialized ) {
			return;
		}
		\WP_CLI::add_command( "schema", \Hametuha\Pattern\Command::class );
		self::$initialized = false;
	}
832210
public static function registerColumnDisplayer()
    {
        $map = [
            'editable'    => Displayers\Editable::class,
            'switch'      => Displayers\SwitchDisplay::class,
            'switchGroup' => Displayers\SwitchGroup::class,
            'select'      => Displayers\Select::class,
            'image'       => Displayers\Image::class,
            'label'       => Displayers\Label::class,
            'button'      => Displayers\Button::class,
            'link'        => Displayers\Link::class,
            'badge'       => Displayers\Badge::class,
            'progressBar' => Displayers\ProgressBar::class,
            'radio'       => Displayers\Radio::class,
            'checkbox'    => Displayers\Checkbox::class,
            'orderable'   => Displayers\Orderable::class,
            'table'       => Displayers\Table::class,
            'expand'      => Displayers\Expand::class,
            'modal'       => Displayers\Modal::class,
        ];

        foreach ($map as $abstract => $class) {
            Column::extend($abstract, $class);
        }
    }
1358051
protected function registerMarkdown()
    {
        $this->app->singleton('markdown', function (Container $app) {
            $environment = $app['markdown.environment'];
            $docParser = new DocParser($environment);
            $htmlRenderer = new HtmlRenderer($environment);

            return new Converter($docParser, $htmlRenderer);
        });

        $this->app->alias('markdown', Converter::class);
        $this->app->alias('markdown', ConverterInterface::class);
    }