public function injectModel() {
        $params = func_get_args();
        $injection = array_shift($params);
        if ($injection == false) {
            $url = $this->router->generate('extjs_generate_model', array('model'=>$params), false);
            return "<script type='text/javascript' src='$url'></script>";
        } else {
            $code = '';
            foreach ($params as $model) {
                $model = str_replace(".", "\\", $model);
                $code .= $this->generator->generateMarkupForEntity($model);
            }
            return $code;
        }
    }
public function injectModel() {
        $params = func_get_args();
        $injection = array_shift($params);
        if ($injection == false) {
            $url = $this->router->generate('extjs_generate_model', array('model'=>$params), false);
            return "<script type='text/javascript' src='$url'></script>";
        } else {
            $code = '';
            foreach ($params as $model) {
                $model = str_replace(".", "\\", $model);
                $code .= $this->generator->generateMarkupForEntity($model);
            }
            return $code;
        }
    }
public function injectModel ( ) { $ params = func_get_args ( ) ; $ injection = array_shift ( $ params ) ; if ( $ injection == false ) { $ url = $ this -> router -> generate ( 'extjs_generate_model' , array ( 'model' => $ params ) , false ) ; return "<script type='text/javascript' src='$url'></script>" ; } else { $ code = '' ; foreach ( $ params as $ model ) { $ model = str_replace ( "." , "\\" , $ model ) ; $ code .= $ this -> generator -> generateMarkupForEntity ( $ model ) ; } return $ code ; } }
Inject ExtJs Model into the DOM.

@param boolean $injection Produce ExtJS model code on the page directly?
@param string $model Model Name.
Inject ExtJs Model into the DOM .