Пример #1
0
 public function checkValid(FlexiTableObject $oObject)
 {
     return $oObject->checkValid();
 }
Пример #2
0
 /**
  * Render input fields
  * @param FlexiTableObject $oTable : object schema
  * @param array $oRow : data in array
  * @param String $sType : insert / update
  * @return array()
  */
 public function renderFieldsInput(FlexiTableObject $oTable, $oRow, $sType)
 {
     $aResult = array();
     $sTable = $oTable->getTableName();
     foreach ($oTable->aChild["field"] as $sName => &$oField) {
         if (!$this->onBeforeRenderFieldInput($oField, $sType)) {
             continue;
         }
         $sCheck = "can" . $sType;
         //echo "check: " . $sCheck . ":" . $sName . "\n";
         if ($oField->{$sCheck}) {
             //echo "ok check\n";
             $aOutput = $this->renderFieldInputForm($oField, $oRow, $sType);
             $sOutput = $aOutput["output"];
             $sLabel = $this->renderFieldInputLabel($oField, $sType, $aOutput["form"]);
             $this->onAfterRenderFieldInput($sOutput, $sLabel, $oField, $oRow, $sType);
             $aResult[$oField->sName] = array("label" => $sLabel, "input" => $sOutput, "name" => $oField->getName());
         }
     }
     return $aResult;
 }