Example #1
0
 /**
  * Get field value.
  *
  * @access   public
  * @param    string  $lang
  * @param    integer $valueNumber
  * @return   mixed
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function getValue($lang = NULL, $valueNumber = NULL)
 {
     return parent::getValue($lang, $valueNumber);
     // TODO: Change the autogenerated stub
 }
Example #2
0
 /**
  * Return value for database field from form.
  *
  * @access     protected
  * @param    Form\Field $oFormField
  * @return    mixed
  * @since      1.0.0-alpha
  * @version    1.0.0-alpha
  */
 protected function getValueAfterValidation(Form\Field &$oFormField)
 {
     //		$aAssociationsFromModel = $this->getModel()->getMetadata()->getAssociationNames();
     //
     //		if($this->getModel()->hasLocales()) {
     //			$aAssociationsFromLocales = $this->getModel()->getLocalesMetadata()->getAssociationNames();
     //		} else {
     //			$aAssociationsFromLocales = [];
     //		}
     //
     //		$sField			 = $oFormField->getName();
     //		$aValueForModel	 = $oFormField->getValue();
     //
     //		foreach($aValueForModel as &$aAllValues) {
     //			foreach($aAllValues as &$mValueForModel) {
     //				if($sField !== 'locales' && (in_array($sField, $aAssociationsFromModel) || in_array($sField, $aAssociationsFromLocales))) {
     //					if(in_array($sField, $aAssociationsFromModel)) {
     //						$aAnnotations = $this->getModel()->getMetadata()->getAssociationMapping($sField);
     //					} else {
     //						$aAnnotations = $this->getModel()->getLocalesMetadata()->getAssociationMapping($sField);
     //					}
     //
     //					$sModel = \Plethora\Helper\Arrays::get($aAnnotations, 'targetEntity');
     //
     //					d($mValueForModel);
     //
     //					if(is_array($mValueForModel)) {
     //						if(count($mValueForModel) > 0) {
     //							$mValueForModel = \Plethora\DB::query('SELECT t FROM '.$sModel.' t WHERE t.id IN (:id)')
     //								->param('id', $mValueForModel)
     //								->execute();
     //						}
     //					} else {
     //						$mValueForModel = \Plethora\DB::find($sModel, $mValueForModel);
     //					}
     //				}
     //			}
     //		}
     return $oFormField->getValue();
 }