コード例 #1
0
 /**
  * Get the array data use to set up the javascript watch element
  *
  * @param   int  $repeatCounter  Repeat group counter
  *
  * @return multitype:stdClass
  */
 public function jsWatchElements($repeatCounter = 0)
 {
     $validationEls = array();
     $validations = $this->findAll();
     if (!empty($validations) && $this->elementModel->isEditable()) {
         $watchElements = $this->elementModel->getValidationWatchElements($repeatCounter);
         foreach ($watchElements as $watchElement) {
             $o = new stdClass();
             $o->id = $watchElement['id'];
             $o->triggerEvent = $watchElement['triggerEvent'];
             $validationEls[] = $o;
         }
     }
     return $validationEls;
 }