original_string: public static function getView( PrintaitorViewObj $printViewObj ) { 
          $data = $printViewObj->dataToView;
          $printer_id = $printViewObj->printerId;
          $templateName = $printViewObj->viewName;
          if (empty($printer_id)) {
              return -1;
          }
  
          
          $pluginPath = App::path('Lib', 'Printers');
  
  
          $driverName = $printViewObj->printer['Printer']['driver'];
          $driverModelName = $printViewObj->printer['Printer']['driver_model'];
  
          App::build(array('View' => array( $pluginPath[0] . '/DriverView')));
  
          $viewName = $driverName."Printer/$templateName";
          $View = new View();
          $View->set($data);
     
          $helperName = $driverModelName . $driverName.'Helper'    ;
          App::uses($helperName, 'Printers.Lib/DriverView/Helper');
  
          if (!class_exists($helperName)) {
              throw new MissingHelperException(array(
                  'class' => $helperName,
                  'plugin' => substr('Printers', 0, -1)
              ));
          }
  
          $View->PE = new $helperName($View);
          
          $View->printaitorObj = $printViewObj;
          $view = null;
          try {
              $view = $View->render( $viewName, false );
          } catch (Exception $e) {
              CakeLog::write('debug','No existe la vista de Plugin Printer para '.$e->getMessage() );
          }
          return $view;
          
      }
code: public static function getView( PrintaitorViewObj $printViewObj ) { 
          $data = $printViewObj->dataToView;
          $printer_id = $printViewObj->printerId;
          $templateName = $printViewObj->viewName;
          if (empty($printer_id)) {
              return -1;
          }
  
          
          $pluginPath = App::path('Lib', 'Printers');
  
  
          $driverName = $printViewObj->printer['Printer']['driver'];
          $driverModelName = $printViewObj->printer['Printer']['driver_model'];
  
          App::build(array('View' => array( $pluginPath[0] . '/DriverView')));
  
          $viewName = $driverName."Printer/$templateName";
          $View = new View();
          $View->set($data);
     
          $helperName = $driverModelName . $driverName.'Helper'    ;
          App::uses($helperName, 'Printers.Lib/DriverView/Helper');
  
          if (!class_exists($helperName)) {
              throw new MissingHelperException(array(
                  'class' => $helperName,
                  'plugin' => substr('Printers', 0, -1)
              ));
          }
  
          $View->PE = new $helperName($View);
          
          $View->printaitorObj = $printViewObj;
          $view = null;
          try {
              $view = $View->render( $viewName, false );
          } catch (Exception $e) {
              CakeLog::write('debug','No existe la vista de Plugin Printer para '.$e->getMessage() );
          }
          return $view;
          
      }
code_tokens: public static function getView ( PrintaitorViewObj $ printViewObj ) { $ data = $ printViewObj -> dataToView ; $ printer_id = $ printViewObj -> printerId ; $ templateName = $ printViewObj -> viewName ; if ( empty ( $ printer_id ) ) { return - 1 ; } $ pluginPath = App :: path ( 'Lib' , 'Printers' ) ; $ driverName = $ printViewObj -> printer [ 'Printer' ] [ 'driver' ] ; $ driverModelName = $ printViewObj -> printer [ 'Printer' ] [ 'driver_model' ] ; App :: build ( array ( 'View' => array ( $ pluginPath [ 0 ] . '/DriverView' ) ) ) ; $ viewName = $ driverName . "Printer/$templateName" ; $ View = new View ( ) ; $ View -> set ( $ data ) ; $ helperName = $ driverModelName . $ driverName . 'Helper' ; App :: uses ( $ helperName , 'Printers.Lib/DriverView/Helper' ) ; if ( ! class_exists ( $ helperName ) ) { throw new MissingHelperException ( array ( 'class' => $ helperName , 'plugin' => substr ( 'Printers' , 0 , - 1 ) ) ) ; } $ View -> PE = new $ helperName ( $ View ) ; $ View -> printaitorObj = $ printViewObj ; $ view = null ; try { $ view = $ View -> render ( $ viewName , false ) ; } catch ( Exception $ e ) { CakeLog :: write ( 'debug' , 'No existe la vista de Plugin Printer para ' . $ e -> getMessage ( ) ) ; } return $ view ; }
docstring: Logic for creating the view rendered.
  
  @param PrintaitorViewObj $printViewObj
docstring_tokens: Logic for creating the view rendered .