Ejemplo n.º 1
0
 /**
  * Element method, adds comment injection to the features View offers.
  *
  * @return void
  */
 function element($name, $params = array(), $loadHelpers = false)
 {
     $out = '';
     $isHtml = isset($this->params['url']['ext']) && $this->params['url']['ext'] === 'html' || !isset($this->params['url']['ext']);
     if ($isHtml) {
         $out .= sprintf("<!-- %s - %s -->\n", __d('debug_kit', 'Starting to render', true), $name);
     }
     $out .= parent::element($name, $params, $loadHelpers);
     if ($isHtml) {
         $out .= sprintf("\n<!-- %s - %s -->\n", __d('debug_kit', 'Finished', true), $name);
     }
     return $out;
 }
Ejemplo n.º 2
0
 /**
  * Element method, adds comment injection to the features View offers.
  *
  * @return void
  */
 public function element($name, $data = array(), $options = array())
 {
     $out = '';
     $isHtml = !isset($this->request->params['ext']) || $this->request->params['ext'] === 'html';
     if ($isHtml) {
         $out .= sprintf("<!-- %s - %s -->\n", __d('debug_kit', 'Starting to render'), $name);
     }
     $out .= parent::element($name, $data, $options);
     if ($isHtml) {
         $out .= sprintf("\n<!-- %s - %s -->\n", __d('debug_kit', 'Finished'), $name);
     }
     return $out;
 }