PHP code example of jzubero / silverstripe-sitetree-labels

1. Go to this page and download the library: Download jzubero/silverstripe-sitetree-labels 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/ */

    

jzubero / silverstripe-sitetree-labels example snippets


public function updateSiteTreeLabels(ArrayList &$labels) {
    $labels->add([
        'Title': 'My Custom Label',
        'Color': '#ed135a'
    ]);
}