classes/BearCMS/Addons.php
public function add(string $id): self
    {
        $app = App::get();
        if (\BearFramework\Addons::exists($id)) {
            $app->addons->add($id);
            if (isset(Internal\Data\Addons::$registrations[$id])) {
                $addon = new \BearCMS\Addons\Addon($id);
                call_user_func(Internal\Data\Addons::$registrations[$id], $addon);
                if (is_callable($addon->initialize)) {
                    call_user_func($addon->initialize);
                }
            }
        }
        return $this;
    }
public function add(string $id): self
    {
        $app = App::get();
        if (\BearFramework\Addons::exists($id)) {
            $app->addons->add($id);
            if (isset(Internal\Data\Addons::$registrations[$id])) {
                $addon = new \BearCMS\Addons\Addon($id);
                call_user_func(Internal\Data\Addons::$registrations[$id], $addon);
                if (is_callable($addon->initialize)) {
                    call_user_func($addon->initialize);
                }
            }
        }
        return $this;
    }
public function add ( string $ id ) : self { $ app = App :: get ( ) ; if ( \ BearFramework \ Addons :: exists ( $ id ) ) { $ app -> addons -> add ( $ id ) ; if ( isset ( Internal \ Data \ Addons :: $ registrations [ $ id ] ) ) { $ addon = new \ BearCMS \ Addons \ Addon ( $ id ) ; call_user_func ( Internal \ Data \ Addons :: $ registrations [ $ id ] , $ addon ) ; if ( is_callable ( $ addon -> initialize ) ) { call_user_func ( $ addon -> initialize ) ; } } } return $ this ; }
Adds an addon.

@param string $id
@return self
Adds an addon .