PHP code example of lionsad / service_container

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

    

lionsad / service_container example snippets


    $parameters['ctools_plugins_auto_discovery']['render_cache'] = TRUE

    $rcc = \Drupal::service('render_cache.controller')->createInstance('block');

  $plugins = \Drupal::service('render_cache.controller')->getDefinitions();

$plugin = array(
  'class' => "\\Drupal\\render_cache_block\\RenderCache\\Controller\\BlockController",
  'arguments' => array('@render_stack', '@render_cache.cache'),
);