PHP code example of domatskiy / bitrix-js-plugins

1. Go to this page and download the library: Download domatskiy/bitrix-js-plugins library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

domatskiy / bitrix-js-plugins example snippets


if(class_exists('\Domatskiy\BitrixJSPlugins'))
{
    $CBitrixJSPlugins = \Domatskiy\BitrixJSPlugins::getInstance();
    #$CBitrixJSPlugins->setUseOldApi(true); // for old api
    
    $CBitrixJSPlugins->add(<plugin_name>, 
        array(), // js path array 
        array(), // css path array 
        );
}

if(class_exists('\Domatskiy\BitrixJSPlugins'))
{
    $CBitrixJSPlugins = \Domatskiy\BitrixJSPlugins::getInstance();
	$CBitrixJSPlugins->init(<plugin_name>);
}