/**
  * Find defined inclusion blocks
  *
  * @param   string  $text
  * @return  string
  */
 public function transform($text)
 {
     $mask = Kernel::getConfig('block_inclusion_mask');
     if (!empty($mask)) {
         $regex = Helper::buildRegex($mask);
         $text = preg_replace_callback($regex, array($this, '_callback'), $text);
     }
     return $text;
 }
 /**
  * {@inheritdoc}
  * @return mixed|string
  */
 public function parse(ContentInterface $content, $template_path = null)
 {
     $tpl_content = $this->getTemplate($template_path);
     $params = $this->getParams($content);
     foreach ($params as $name => $callback) {
         $tpl_content = preg_replace_callback(Helper::buildRegex($name), $callback, $tpl_content);
     }
     return $tpl_content;
 }