src/domain/base/SkillDomainTrait.php
protected function doRemovePictures(Skill $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Picture';
			} else {
				$related = PictureQuery::create()->findOneById($entry['id']);
				$model->removePicture($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
protected function doRemovePictures(Skill $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for Picture';
			} else {
				$related = PictureQuery::create()->findOneById($entry['id']);
				$model->removePicture($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
protected function doRemovePictures ( Skill $ model , $ data ) { $ errors = [ ] ; foreach ( $ data as $ entry ) { if ( ! isset ( $ entry [ 'id' ] ) ) { $ errors [ ] = 'Missing id for Picture' ; } else { $ related = PictureQuery :: create ( ) -> findOneById ( $ entry [ 'id' ] ) ; $ model -> removePicture ( $ related ) ; } } if ( count ( $ errors ) > 0 ) { return new ErrorsException ( $ errors ) ; } }
Interal mechanism to remove Pictures from Skill

@param Skill $model
@param mixed $data
Interal mechanism to remove Pictures from Skill