Registers a specific dhtmlx widget and the related events
@param string $name the name of the dhtmlx plugin
166057
protected function registerPlugin()
    {
        $id = $this->options['id'];

        //get the displayed view and register the needed assets
        $view = $this->getView();
        yii2instafeedAsset::register($view);

        $js = array();
        
        $options = Json::encode($this->clientOptions);
        $js[] = "var feed$id = new Instafeed($options);";
        $js[] = "feed$id.run();";

        $view->registerJs(implode("\n", $js),View::POS_READY);
    }
1036377
protected function registerPlugin($name)
    {
        $view = $this->getView();

        BootstrapPluginAsset::register($view);

        $id = $this->options['id'];

        $options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);
        $js = "jQuery('#$id').$name($options);";
        $view->registerJs($js);
    }
1296386
public function register_handler($name, $owner, $callback)
    {
        // check name
        if (strpos($name, 'plugin.') !== 0) {
            $name = 'plugin.' . $name;
        }

        // can register handler only if it's not taken or registered by myself
        if (is_object($this->output)
            && (!isset($this->objectsmap[$name]) || $this->objectsmap[$name] == $owner)
        ) {
            $this->output->add_handler($name, $callback);
            $this->objectsmap[$name] = $owner;
        }
        else {
            rcube::raise_error(array('code' => 525, 'type' => 'php',
                'file' => __FILE__, 'line' => __LINE__,
                'message' => "Cannot register template handler $name;"
                    ." already taken by another plugin or no output object available"), true, false);
        }
    }
1232615
public function register_block($name, $callback, $cacheable = true, $cache_attrs = null)
    {
        if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_BLOCK) {
            throw new Exception('Multiple plugins of different types can not share the same name');
        }
        $this->plugins[$name] = array(
            'type'     => self::SMARTY_BLOCK,
            'callback' => $callback
        );
    }
509337
public function markComponentSuccessfullyUninstalled($name)
    {
        try {
            Option::delete(self::getNameInOptionTable($name));
        } catch (\Exception $e) {
            // case when the option table is not yet created (before 0.2.10)
        }

        /**
         * Event triggered after a component has been uninstalled.
         *
         * @param string $name The component that has been uninstalled.
         */
        Piwik::postEvent('Updater.componentUninstalled', array($name));
    }
152140
public function addButton(string $name): void
    {
        $options = $this->formOptions['fields'][$name];

        $button = HtmlTag::createElement('button')
            ->set('id', $name)
            ->set('type', $options['type'] ?? 'button')
            ->text($options['text'] ?? '');

        if (isset($options['text'])) {
            unset($options['text']);
        }

        foreach ($options as $attr => $value) {
            $button->set($attr, $value);
        }

        echo $button;
    }
118306
public function register($name)
    {
        $node = $this->client->createNode($name);
        $this->nodes[$name] = $node;
        return $node;
    }
1341714
public function registerTab($name, $title, $content = '')
    {
        $this->tabs[$name] = array(static::TITLE => $title, static::CONTENT => $content);
    }
271196
function register(string $name, string $class) {
        if(!\in_array('CharlotteDunois\Yasmin\Interfaces\WSEventInterface', \class_implements($class))) {
            throw new \RuntimeException('Specified event class does not implement interface');
        }
        
        $this->wsevents[$name] = new $class($this->wshandler->wsmanager->client, $this->wshandler->wsmanager);
    }
199482
public function disable($name)
    {
        $enabled = $this->getEnabled();

        if (($k = array_search($name, $enabled)) === false) {
            return;
        }

        $extension = $this->getExtension($name);

        $this->dispatcher->dispatch(new Disabling($extension));

        unset($enabled[$k]);

        $this->setEnabled($enabled);

        $extension->disable($this->app);

        $this->dispatcher->dispatch(new Disabled($extension));
    }
1237807
public function register($name)
    {
        if (class_exists($name)) {
            $this->sidebars[] = $name;
        } else {
            throw new LogicException('Sidebar [' . $name . '] does not exist');
        }

        return $this;
    }
366337
public function registerDecorator($name, $decorator)
    {
        if (is_object($name)) {
            $this->registerJavascriptObject('decorator', $this->wrapDecoratorObject($name));
        } elseif ($decorator === false) {
            $this->registerJavascriptObject('decorator', $name);
        } elseif (is_callable($decorator)) {
            $this->registerJavascriptFunction('decorator', $name, $this->wrapDecoratorCallable($name, $decorator));
        } else {
            $this->registerJavascriptFunction('decorator', $name, $decorator);
        }
    }
285104
public function register(string $name, Closure $definition)
    {
        $this->registrar->set($name, $definition);
    }
188131
public static function registerPartial($name, $partial)
    {
        Argument::i()
            //Argument 1 must be a string
            ->test(1, 'string')
            //Argument 2 must be a string
            ->test(2, 'string');

        self::$partials[$name] = $partial;
    }
952378
public static function registerModule(string $name): void
    {
        if (!isset(static::$registeredModules[$name])) {
            $modulePath = static::getModulePath($name);

            static::prependIncludePath($modulePath . 'controllers', $modulePath . 'library');
            static::$registeredModules[$name] = true;
            $initPath = $modulePath . 'init.php';

            if (is_file($initPath)) {
                require $initPath;
            }
        }
    }
332564
public function widgetExist($name)
    {
        $name = strtolower($name);

        return isset($this->dataStore[0][$name]) ? $this->dataStore[0][$name] : false;
    }
685629
public function registerScript($id, $name)
    {
        $view = $this->getView();
        AjaxDropdownAsset::register($view);
        $options = Json::encode($this->prepareOptions($name));
        $view->registerJs("jQuery('#$id').ajaxDropDown($options);");
    }