Register the shortcode UI handlers.

@since 0.1.0
518851
public function register_shortcode_ui() {
		$template = $this->get_page_template();
		$context  = [ 'page_template' => $template ];

		array_walk( $this->shortcode_uis,
			function ( ShortcodeUIInterface $shortcode_ui ) use ( $context ) {
				$shortcode_ui->register( $context );
			}
		);
	}
262965
def register_actions(self, shortcut_manager):
        
        shortcut_manager.add_callback_for_action('rename', self.rename_selected_state)
        super(StatesEditorController, self).register_actions(shortcut_manager)
570161
protected function registerHandlers() {
		set_exception_handler(function($exception) {
			$this->pushException($exception);
			
			echo $this->renderDebugBar();
		});
		
		register_shutdown_function(function() {
			if ($this->onShutdownCallback !== null) {
				$this->onShutdownCallback->__invoke($this);
			}
			
			// Debug bar rendering for the deferred mode
			if ($this->deferredMode) {
				// Garbage collection
				if ($this->profilesGcEnabled) {
					$this->gcCycle();
				}
				
				// Content creating
				$filePath = $this->deferredDir . DIRECTORY_SEPARATOR . 'profile_' . $this->token . '.html';
				if (file_put_contents($filePath, $this->renderDebugBar()) === false) {
					throw new InvalidPath('Unable to write the debug data into: "' . $filePath . '"');
				}
			}
		});
	}
496780
protected function registerBindings()
    {
        $binding = config('binding')?: [];

        foreach($binding as $contract => $implementation) {
            $this->bind($contract, $implementation);
        }
    }
1091836
def register_actions(self, shortcut_manager):
        
        super(DescriptionEditorController, self).register_actions(shortcut_manager)
        shortcut_manager.add_callback_for_action("abort", self._abort)
468418
def register_actions(self, shortcut_manager):
        
        shortcut_manager.add_callback_for_action("copy", self._copy)
        shortcut_manager.add_callback_for_action("paste", self._paste)
        shortcut_manager.add_callback_for_action("cut", self._cut)
        shortcut_manager.add_callback_for_action("undo", self._undo)
        shortcut_manager.add_callback_for_action("redo", self._redo)
        shortcut_manager.add_callback_for_action("apply", self._apply)
        shortcut_manager.add_callback_for_action("open_external_editor", self._open_external_editor)
864685
private function registerEventListeners()
    {
        $listeners = $this->getListeners();
        foreach ($listeners as $listenerKey => $listenerValues) {
            foreach ($listenerValues as $listenerValue) {
                \Event::listen($listenerKey,
                    $listenerValue
                );
            }
        }
    }
373006
public function registerClientScript()
    {
        $view = $this->view;
        
        if ($this->_katex) {
            $katexAsset = KatexAsset::register($view);
            $katexAsset->version = $this->katexVersion;
        }

        if ($this->_highlight) {
            $highlightAsset = HighlightAsset::register($view);
            $highlightAsset->version = $this->highlightVersion;
            $highlightAsset->style = $this->highlightStyle;
        }
        
        $asset = QuillAsset::register($view);
        $asset->theme = $this->theme;
        $asset->version = $this->quillVersion;
        
        $configs = Json::encode($this->_quillConfiguration);
        $editor = 'q_' . preg_replace('~[^0-9_\p{L}]~u', '_', $this->id);
        
        $js = "var $editor=new Quill(\"#editor-{$this->id}\",$configs);";
        $js .= "document.getElementById(\"editor-{$this->id}\").onclick=function(e){document.querySelector(\"#editor-{$this->id} .ql-editor\").focus();};";
        $js .= "$editor.on('text-change',function(){document.getElementById(\"{$this->_fieldId}\").value=$editor.root.innerHTML;});";

        if (!empty($this->js)) {
            $js .= str_replace('{quill}', $editor, $this->js);
        }

        $view->registerJs($js, View::POS_END);
    }
506278
public function registerCustomCommands()
    {
        try {
            $this->readCustomCommandsFromConfig();
        } catch (ConfigurationException $e) {
            if ($e->getCode() === 404) {
                return;
            }
            $this->renderException($e, new ConsoleOutput());
            exit(1);
        } catch (\Exception $e) {
            $this->renderException($e, new ConsoleOutput());
            exit(1);
        }
    }
1304983
public function registerClientScript()
	{
		$view = $this->getView();
		TwbsMaxlengthAsset::register($view);

		$options = empty($this->clientOptions) ? "{}" : Json::encode($this->clientOptions);
		if( isset($this->selector)) {
			$js = "jQuery(\"{$this->selector}\").maxlength(" . $options . ")";
		} else {
			$js = "jQuery(\"#{$this->options['id']}\").maxlength(" . $options . ")";
		}
		$view->registerJs($js);
	}
567852
protected function registerClientEvents() {
		if (!empty($this->clientEvents)) {
			$id = $this->options['id'];
			$js = [];
			foreach ($this->clientEvents as $event => $handler) {
				$js[] = "jQuery('#$id').on('$event', $handler);";
			}
			$this->view->registerJs(implode("\n", $js));
		}
	}
765655
public function register()
    {
        $this->app['actions']->listen(
            'widgets_init',
            function ()
            {
                foreach ($this->widgets as $widget)
                {
                    if (class_exists($widget))
                    {
                        register_widget($widget);
                    }
                }
            }
        );
    }
661367
public function init()
    {
        $this->request = new Request();
        $this->view = new View();

        $shortcodes = new ShortcodeLoader($this);
        $shortcodes->register();

        $helpers = new HelperLoader($this);
        $helpers->register();
    }
60955
public function add_hooks()
	{
		if ( function_exists( 'add_action' )
			&& function_exists( 'add_filter' )
			&& function_exists( 'add_shortcode' )
		) {
			// Actions
			foreach ( $this->actions as $action ) {
				add_action(
					$action['hook'],
					[ &$this, $this->get_mapped_mvc_call( $action['mvc'] ) ],
					$action['priority'],
					$action['args']
				);
			}
			// Filters
			foreach ( $this->filters as $filter ) {
				add_filter(
					$filter['hook'],
					[ &$this, $this->get_mapped_mvc_call( $filter['mvc'], true ) ],
					$filter['priority'],
					$filter['args']
				);
			}
			// Filters
			foreach ( $this->shortcodes as $shortcode ) {
				add_shortcode(
					$shortcode['tag'],
					[ &$this, $this->get_mapped_mvc_call( $shortcode['mvc'], true ) ]
				);
			}
			// Widgets
			if ( count( $this->widgets ) > 0 ) {
        		add_action( 'widgets_init', [ &$this, '_widgets' ], 1 );
			}
		}
	}
1053473
protected function registerWhoops()
    {
        $whoops = new \Whoops\Run;
        $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
        $whoops->register();
    }
93490
public function registerClientScript()
    {
        /** @var TbApi $api */
        $selector = '#' . TbArray::getValue('id', $this->htmlOptions, $this->getId());
        $this->registerPlugin(TbApi::PLUGIN_TYPEAHEAD, $selector, $this->pluginOptions);
    }
1154669
protected function registerStreamHandlers()
    {
        $handlers = $this->getConfig()->get('stream_handlers', null, array());
        if (!is_array($handlers)) {
            throw new ConfigException('Invalid stream_handlers configuration', E_USER_ERROR);
        }

        $defaultStreamContext = array();
        foreach ($handlers as $protocol => $handler) {
            if (isset($handler['class'])) {
                try {
                    $flags = isset($handler['local']) ? !empty($handler['local']) : STREAM_IS_URL;
                    if (isset($handler['register_callback']) && is_callable($handler['register_callback'])) {
                        $registered = $handler['register_callback']($protocol, $handler);
                    } else {
                        if (in_array($protocol, stream_get_wrappers())) {
                            stream_wrapper_unregister($protocol);
                        }
                        $registered = stream_register_wrapper($protocol, $handler['class'], $flags);
                    }
                    if (isset($handler['options']) && is_array($handler['options'])) {
                        $defaultStreamContext[$protocol] = $handler['options'];
                    }
                } catch (\Exception $e) {
                    throw new ConfigException("Error registering stream_handler {$handler['class']} ({$protocol}://)", E_USER_ERROR, $e);
                }
                if (!$registered) {
                    throw new ConfigException("Could not register stream_handler {$handler['class']} ({$protocol}://)", E_USER_ERROR);
                }
            } else {
                throw new ConfigException("Invalid stream_handler configuration for protocol {$protocol}", E_USER_ERROR);
            }
        }

        $this->streamContext = stream_context_set_default($defaultStreamContext);
    }