public function getConfigurations() {
		if ($this->crops_internal === null) {
			/** @var BaseActiveRecord $model */
			$model = $this->owner;

			if (!empty($this->crops)) {
				$this->crops_internal = $this->crops;
			} else {
				$o = [];
				foreach (['cropped_field', 'crop_field', 'crop_width', 'ratio'] as $f) {
					if ($this->$f) {
						$o[$f] = $this->$f;
					}
				}
				$this->crops_internal = [$o];
			}

			foreach ($this->crops_internal as &$crop) {
				if (empty($crop['cropped_field'])) {
					$crop['value'] = false;
					$crop['image'] = $model->getOldAttribute($this->attribute);
				} else if (empty($crop['crop_field'])) {
					$crop['value'] = false;
					$crop['image'] = $model->getAttribute($crop['cropped_field']);
				} else {
					$crop['value'] = $model->getAttribute($crop['crop_field']);
					$crop['image'] = $model->getOldAttribute($this->attribute);
				}
			}
		}
		return $this->crops_internal;
	}
public function getConfigurations() {
		if ($this->crops_internal === null) {
			/** @var BaseActiveRecord $model */
			$model = $this->owner;

			if (!empty($this->crops)) {
				$this->crops_internal = $this->crops;
			} else {
				$o = [];
				foreach (['cropped_field', 'crop_field', 'crop_width', 'ratio'] as $f) {
					if ($this->$f) {
						$o[$f] = $this->$f;
					}
				}
				$this->crops_internal = [$o];
			}

			foreach ($this->crops_internal as &$crop) {
				if (empty($crop['cropped_field'])) {
					$crop['value'] = false;
					$crop['image'] = $model->getOldAttribute($this->attribute);
				} else if (empty($crop['crop_field'])) {
					$crop['value'] = false;
					$crop['image'] = $model->getAttribute($crop['cropped_field']);
				} else {
					$crop['value'] = $model->getAttribute($crop['crop_field']);
					$crop['image'] = $model->getOldAttribute($this->attribute);
				}
			}
		}
		return $this->crops_internal;
	}
public function getConfigurations ( ) { if ( $ this -> crops_internal === null ) { /** @var BaseActiveRecord $model */ $ model = $ this -> owner ; if ( ! empty ( $ this -> crops ) ) { $ this -> crops_internal = $ this -> crops ; } else { $ o = [ ] ; foreach ( [ 'cropped_field' , 'crop_field' , 'crop_width' , 'ratio' ] as $ f ) { if ( $ this -> $ f ) { $ o [ $ f ] = $ this -> $ f ; } } $ this -> crops_internal = [ $ o ] ; } foreach ( $ this -> crops_internal as & $ crop ) { if ( empty ( $ crop [ 'cropped_field' ] ) ) { $ crop [ 'value' ] = false ; $ crop [ 'image' ] = $ model -> getOldAttribute ( $ this -> attribute ) ; } else if ( empty ( $ crop [ 'crop_field' ] ) ) { $ crop [ 'value' ] = false ; $ crop [ 'image' ] = $ model -> getAttribute ( $ crop [ 'cropped_field' ] ) ; } else { $ crop [ 'value' ] = $ model -> getAttribute ( $ crop [ 'crop_field' ] ) ; $ crop [ 'image' ] = $ model -> getOldAttribute ( $ this -> attribute ) ; } } } return $ this -> crops_internal ; }
return array with list of configurations
return array with list of configurations