PHP code example of hard2code / bitrix-utils

1. Go to this page and download the library: Download hard2code/bitrix-utils 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/ */

    

hard2code / bitrix-utils example snippets




/*----------------------------------------------------*
  Some example of usage ArraySection in template
*----------------------------------------------------*/

use Hard2Code\Util\Entities;
use Hard2Code\Util\Images;

protectBitrixPrologInclude();
$sections = Entities::getSections($arResult, $this);



/*----------------------------------------------------*
  Some example of usage ArrayLink in template
*----------------------------------------------------*/

use Hard2Code\Util\Entities;
use Hard2Code\Util\Links;

protectBitrixPrologInclude();



use Hard2Code\Util\Assets;

Assets::anifest");
Assets::s",
    "/vendor/bootstrap.bundle.min.js",
    "/vendor/validate.min.js",
    "/vendor/fotorama.js",
    "/vendor/fontawesome.js",
);

Assets::