Skip to content

Commit

Permalink
Update: of JsHelper class
Browse files Browse the repository at this point in the history
  • Loading branch information
quickapps committed Mar 11, 2014
1 parent e8547b9 commit 58ff711
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions QuickApps/View/Helper/QaJsHelper.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
App::uses('JsHelper', 'View/Helper');

/**
* Js Helper
*
Expand All @@ -9,15 +11,7 @@
* @author Christopher Castro <chris@quickapps.es>
* @link http://www.quickappscms.org
*/
class QaJsHelper extends AppHelper {
/**
* Other helpers used by QaFormHelper
*
* @var array
* @access public
*/
public $helpers = array('CoreJs' => array('className' => 'Js'));

class QaJsHelper extends JsHelper {
/**
* call__ Allows for dispatching of methods to the Engine Helper.
* methods in the Engines bufferedMethods list will be automatically buffered.
Expand All @@ -38,7 +32,7 @@ class QaJsHelper extends AppHelper {
* @return mixed Depends on the return of the dispatched method, or it could be an instance of the EngineHelper
*/
public function __call($method, $params) {
return $this->CoreJs->__call($method, $params);
return parent::__call($method, $params);
}

/**
Expand All @@ -56,7 +50,7 @@ public function value($val = array(), $quoteString = null, $key = 'value') {
$this->hook('js_value_alter', $data);
extract($data);

return $this->CoreJs->value($val, $quoteString, $key);
return parent::value($val, $quoteString, $key);
}

/**
Expand All @@ -82,7 +76,7 @@ public function value($val = array(), $quoteString = null, $key = 'value') {
public function writeBuffer($options = array()) {
$this->hook('js_write_buffer_alter', $options);

$this->CoreJs->writeBuffer($options);
parent::writeBuffer($options);
}

/**
Expand All @@ -100,7 +94,7 @@ public function buffer($script, $top = false) {
$this->hook('js_buffer_alter', $data);
extract($data);

return $this->CoreJs->buffer($script, $top);
return parent::buffer($script, $top);
}

/**
Expand All @@ -113,7 +107,7 @@ public function buffer($script, $top = false) {
public function getBuffer($clear = true) {
$this->hook('js_get_buffer_alter', $clear);

return $this->CoreJs->getBuffer($clear);
return parent::getBuffer($clear);
}

/**
Expand Down Expand Up @@ -141,7 +135,7 @@ public function link($title, $url = null, $options = array()) {
$this->hook('js_link_alter', $data);
extract($data);

return $this->CoreJs->link($title, $url, $options);
return parent::link($title, $url, $options);
}

/**
Expand All @@ -160,7 +154,7 @@ public function set($one, $two = null) {
$this->hook('js_set_alter', $data);
extract($data);

return $this->CoreJs->set($one, $two);
return parent::set($one, $two);
}

/**
Expand Down Expand Up @@ -190,6 +184,6 @@ public function submit($caption = null, $options = array()) {
$this->hook('js_submit_alter', $data);
extract($data);

return $this->CoreJs->set($caption, $options);
return parent::set($caption, $options);
}
}

0 comments on commit 58ff711

Please sign in to comment.