vendor/codeages/plugin-bundle/Twig/SlotExtension.php line 23

Open in your IDE?
  1. <?php
  2. namespace Codeages\PluginBundle\Twig;
  3. class SlotExtension extends \Twig_Extension
  4. {
  5.     protected $manager;
  6.     public function __construct($manager)
  7.     {
  8.         $this->manager $manager;
  9.     }
  10.     public function getFunctions()
  11.     {
  12.         return array(
  13.             new \Twig_SimpleFunction('slot', array($this'slot'), array('is_safe' => array('html'))),
  14.         );
  15.     }
  16.     public function slot($name$args = array())
  17.     {
  18.         return $this->manager->fire($name$args);
  19.     }
  20.     public function getName()
  21.     {
  22.         return 'codeages_plugin_slot_extension';
  23.     }
  24. }