Пример #1
0
 /**
  * Iterates through elements of $each and renders child nodes
  *
  * @param string $get
  * @param string $as
  * @return string Rendered string
  * @author Marc Neuhaus <*****@*****.**>
  * @api
  */
 public function render($get, $as = null)
 {
     if ($as == null) {
         $as = $get;
     }
     if (\Admin\Core\API::has($get)) {
         $this->templateVariableContainer->add($as, \Admin\Core\API::get($get));
     } elseif (is_callable("\\Admin\\Core\\Api::get" . ucfirst($get))) {
         $function = "get" . ucfirst($get);
         $result = call_user_func("\\Admin\\Core\\Api::get" . ucfirst($get));
         $this->templateVariableContainer->add($as, $result);
     }
     $output = $this->renderChildren();
     $this->templateVariableContainer->remove($as);
     return $output;
 }