Ejemplo n.º 1
0
 /**
  * Sets the form's onSuccess callback function.
  **/
 public function onSuccess($fn)
 {
     fxAssert::isNull($this->_onSuccess);
     fxAssert::isCallable($fn);
     $this->_onSuccess = $fn;
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Adds a validation callback routine.
  **/
 public function validator($cb)
 {
     fxAssert::isCallable($cb, 'cb');
     $this->_validation_cb = $cb;
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * Configures the renderer to use a custom 'affix' formatter on radio and checkbox member elements.
  *
  * The callback must match the following signature...
  *
  * function myAffixFormatter( $element, $owner_name, $index, $max )
  *
  * Where, $element is the rendered control, $owner_name is the name of the owning set, $index is this elements
  * position within the set (zero based) and $max is the index of the maximum element.
  *
  * Knowing the zero-based index and the maximum index is enough to allow the detection of elements in the first and last
  * position and to allow nth-child based additions (like odd/even classes) in the affixed code.
  **/
 public function setAffixFormatter($cb)
 {
     fxAssert::isCallable($cb);
     $this->affixFormatter = $cb;
     return $this;
 }