Exemple #1
0
 /**
  * Gets the function that is passed to the rendering environment.
  *
  * @return mixed|\Closure
  */
 public function getFunction()
 {
     return function ($pathName) {
         $data = $this->context->getData();
         if (array_key_exists('sys_pathNames', $data)) {
             if (array_key_exists($pathName, $data['sys_pathNames'])) {
                 return $this->context->renderString($data['sys_pathNames'][$pathName]);
             }
             return '';
         }
         return '';
     };
 }
Exemple #2
0
 /**
  * Gets the function that is passed to the rendering environment.
  *
  * @return mixed|\Closure
  */
 public function getFunction()
 {
     return function ($argument, $default = null) {
         return array_get($this->context->getData(), 'user_options.' . $argument, $default);
     };
 }