protected function validateUserInput($aData, $oItem = null)
    {
        $aOut       = [];
        $aFields    = $this->oModel->describeFields();
        $aKeys      = array_unique(
            array_merge(
                array_keys($aFields),
                arrayExtractProperty($this->oModel->getExpandableFields(), 'trigger')
            )
        );
        $aValidKeys = array_diff($aKeys, static::IGNORE_FIELDS_WRITE);

        foreach ($aValidKeys as $sValidKey) {

            $oField = getFromArray($sValidKey, $aFields);
            if (array_key_exists($sValidKey, $aData)) {
                $aOut[$sValidKey] = getFromArray($sValidKey, $aData);
            }

            //  @todo (Pablo - 2018-08-20) - Further validation using the $oField->validation rules
        }

        return $aOut;
    }
protected function validateUserInput($aData, $oItem = null)
    {
        $aOut       = [];
        $aFields    = $this->oModel->describeFields();
        $aKeys      = array_unique(
            array_merge(
                array_keys($aFields),
                arrayExtractProperty($this->oModel->getExpandableFields(), 'trigger')
            )
        );
        $aValidKeys = array_diff($aKeys, static::IGNORE_FIELDS_WRITE);

        foreach ($aValidKeys as $sValidKey) {

            $oField = getFromArray($sValidKey, $aFields);
            if (array_key_exists($sValidKey, $aData)) {
                $aOut[$sValidKey] = getFromArray($sValidKey, $aData);
            }

            //  @todo (Pablo - 2018-08-20) - Further validation using the $oField->validation rules
        }

        return $aOut;
    }
protected function validateUserInput ( $ aData , $ oItem = null ) { $ aOut = [ ] ; $ aFields = $ this -> oModel -> describeFields ( ) ; $ aKeys = array_unique ( array_merge ( array_keys ( $ aFields ) , arrayExtractProperty ( $ this -> oModel -> getExpandableFields ( ) , 'trigger' ) ) ) ; $ aValidKeys = array_diff ( $ aKeys , static :: IGNORE_FIELDS_WRITE ) ; foreach ( $ aValidKeys as $ sValidKey ) { $ oField = getFromArray ( $ sValidKey , $ aFields ) ; if ( array_key_exists ( $ sValidKey , $ aData ) ) { $ aOut [ $ sValidKey ] = getFromArray ( $ sValidKey , $ aData ) ; } //  @todo (Pablo - 2018-08-20) - Further validation using the $oField->validation rules } return $ aOut ; }
Validates user input

@param array     $aData The user data to validate
@param \stdClass $oItem The current object (when editing)

@return array
@throws ApiException;
Validates user input