Register the options page.
180246
public function register()
    {
        // This is the initial activation, save the defaults to the db
        if(!$this->options->exists())
        {
            $this->reset();
        }
        
        // Only preprocess if this is the currently viewed page
        if( $this->page->get_slug() == filter_input(INPUT_GET, 'page') )
        {
            $this->preprocess();
        }
        
        $this->page->register();
        $this->set_global_variable();
        $this->do_action('afw_options_init');
    }
203929
protected function register()
    {
        if (function_exists('register_extended_post_type')) {
            register_extended_post_type($this->name, $this->args);
        } else {
            register_post_type($this->name, $this->args);
        }
    }
1124230
public function register()
    {
        $this->bindRouteModel();

        $this->loadAdminAuthConfig();

        $this->registerRouteMiddleware();

        $this->registerPolicies();

        $this->commands($this->commands);
    }
102527
def register_page(name, options = {}, &block)
      ns = options.fetch(:namespace) { default_namespace }
      namespace(ns).register_page name, options, &block
    end
226265
public function registerAssets()
    {
        $view = $this->getView();
        $id = $this->options['id'];
        $settings = $this->settings;
        $assets = $this->assets;
        if ($this->preset) {
            $preset = $this->getPreset($this->preset);
            if (isset($preset['settings'])) {
                $settings = ArrayHelper::merge($preset['settings'], $settings);
            }
            if (isset($preset['assets'])) {
                $assets = ArrayHelper::merge($preset['assets'], $assets);
            }
        }
        $settings = Json::encode($settings);
        $js = "CodeMirror.fromTextArea(document.getElementById('$id'), $settings);";
        $view->registerJs($js);
        CodemirrorAsset::register($this->view, $assets);
    }
1119440
protected function initOptions()
    {
        Html::addCssClass($this->options, 'uk-alert uk-alert-'.$this->type);
        $this->options['uk-alert'] = true;
    }
197789
protected function register(array $options)
    {
        foreach ($options as $option => $argument) {
            if (is_bool($argument)) {
                add_theme_support($option);

                continue;
            }

            add_theme_support($option, $argument);
        }
    }
829522
public function registerPages()
    {
        foreach ($this->menus as $menu) {
            $this->registerPage($menu['title'], $menu['cap'], $menu['link'], $menu['class'], $menu['callback'], $menu['type']);
        }
        $this->hideMenu();
    }
918146
public function registerAssets()
    {
        $view = $this->getView();
        FancytreeAsset::register($view);
        $id = 'fancyree_' . $this->id;

        if (isset($this->options['id'])) {
            $id = $this->options['id'];
            unset($this->options['id']);
        } else {
           echo Html::tag('div', '', ['id' => $id]);
        }

        $options = Json::encode($this->options);
        $view->registerJs("\n\$(\"#{$id}\").fancytree({$options});\n");
    }
1220293
public function register()
    {
        $that = $this;
        set_error_handler(function ($errno, $errstr, $errfile, $errline) use ($that) {
            if (!($errno & error_reporting())) {
                return;
            }

            $options = [
                'type' => $errno,
                'message' => $errstr,
                'file' => $errfile,
                'line' => $errline,
                'isError' => true,
            ];
            $that->handle(new ErrorPayload($options));
        });

        set_exception_handler(function ($e) use ($that) {
            /** @var \Exception|\Error $e */
            $options = [
                'type' => $e->getCode(),
                'message' => $e->getMessage(),
                'file' => $e->getFile(),
                'line' => $e->getLine(),
                'isException' => true,
                'exception' => $e,
            ];
            $that->handle(new ErrorPayload($options));
        });

        register_shutdown_function(function () use ($that) {
            if (null !== ($options = error_get_last())) {
                $that->handle(new ErrorPayload($options));
            }
        });
    }
202596
public function registerPosts() {
		$args = [
			'exclude_from_search' => true,
			'public' => false,
			'publicly_queryable' => false,
			'show_ui' => false,
			'supports' => [ 'revisions' ],
			'label' => 'Custom Style',
			'can_export' => false,
			'rewrite' => false,
			'capability_type' => 'page',
			'capabilities' => [
				'edit_post' => 'edit_others_posts',
				'read_post' => 'read',
				'delete_post' => 'edit_others_posts',
				'edit_posts' => 'edit_others_posts',
				'edit_others_posts' => 'edit_others_posts',
				'publish_posts' => 'edit_others_posts',
				'read_private_posts' => 'read',
			],
		];
		register_post_type( 'custom-style', $args );
	}
796814
public function registerAssets()
    {
        $id = $this->options['id'];
        $view = $this->getView();
        CoreAsset::register($view);
        $cleanOptions = $this->getClientOptions();
        $js[] = "$('textarea.element-$id').textareaAutoSize();";
        $view->registerJs(implode("\n", $js),View::POS_READY);
    }
469253
protected function registerBladeExtensions() : void {
		$blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler();

		$blade->directive('javascripts', function($value){
			return "<?php echo basset_javascripts($value); ?>";
		});

		$blade->directive('stylesheets', function($value){
			return "<?php echo basset_stylesheets($value); ?>";
		});

		$blade->directive('assets', function($value){
			return "<?php echo basset_assets($value); ?>";
		});
	}
161136
def register():
    
    signals.article_generator_finalized.connect(link_source_files)
    signals.page_generator_finalized.connect(link_source_files)
    signals.page_writer_finalized.connect(write_source_files)
1101015
public function register()
    {
        $this->app['actions']->listen('wp', function () {
            $wpPost = get_post(
                (is_home() && is_archive()) && !is_post_type_archive() ?
                    get_option('page_for_posts') :
                    null
            ); // for post archive get post page instead of first post

            if ($wpPost !== null && $post = Post::resolveWordPressPostToModel($wpPost)) {
                $this->app->instance('post', $post);
            }
        });

        $this->registerLoopAndQuery();
        $this->registerPostManager();
        $this->registerPostTypeManager();
    }
1284965
public function register(): void
    {
        // Merge config
        $this->mergeConfigFrom(realpath(__DIR__.'/../../config/config.php'), 'rinvex.pages');

        // Bind eloquent models to IoC container
        $this->app->singleton('rinvex.pages.page', $pageModel = $this->app['config']['rinvex.pages.models.page']);
        $pageModel === Page::class || $this->app->alias('rinvex.pages.page', Page::class);

        // Register console commands
        ! $this->app->runningInConsole() || $this->registerCommands();
    }
1249445
def _register_options(self, api_interface):
        # type: (ApiInterfaceBase) -> None
        
        op_paths = api_interface.op_paths(collate_methods=True)
        for path, operations in op_paths.items():
            if api.Method.OPTIONS not in operations:
                self._options_operation(api_interface, path, operations.keys())