protected function _settingsCallback(Model $model, array $options) {
        if (method_exists($model, 'beforeUpload')) {
            $options = $model->beforeUpload($options);
        }

        if ($options['transforms'] && method_exists($model, 'beforeTransform')) {
            foreach ($options['transforms'] as $i => $transform) {
                $options['transforms'][$i] = $model->beforeTransform($transform);
            }
        }

        if ($options['transport'] && method_exists($model, 'beforeTransport')) {
            $options['transport'] = $model->beforeTransport($options['transport']);
        }

        return $options;
    }
protected function _settingsCallback(Model $model, array $options) {
        if (method_exists($model, 'beforeUpload')) {
            $options = $model->beforeUpload($options);
        }

        if ($options['transforms'] && method_exists($model, 'beforeTransform')) {
            foreach ($options['transforms'] as $i => $transform) {
                $options['transforms'][$i] = $model->beforeTransform($transform);
            }
        }

        if ($options['transport'] && method_exists($model, 'beforeTransport')) {
            $options['transport'] = $model->beforeTransport($options['transport']);
        }

        return $options;
    }
protected function _settingsCallback ( Model $ model , array $ options ) { if ( method_exists ( $ model , 'beforeUpload' ) ) { $ options = $ model -> beforeUpload ( $ options ) ; } if ( $ options [ 'transforms' ] && method_exists ( $ model , 'beforeTransform' ) ) { foreach ( $ options [ 'transforms' ] as $ i => $ transform ) { $ options [ 'transforms' ] [ $ i ] = $ model -> beforeTransform ( $ transform ) ; } } if ( $ options [ 'transport' ] && method_exists ( $ model , 'beforeTransport' ) ) { $ options [ 'transport' ] = $ model -> beforeTransport ( $ options [ 'transport' ] ) ; } return $ options ; }
Trigger callback methods to modify attachment settings before uploading.

@param Model $model
@param array $options
@return array
Trigger callback methods to modify attachment settings before uploading .