protected function filterItemsForNotPossibleMinifiedAndPossibleMinifiedItems ($items) {
		$itemsToRenderMinimized = [];
		$itemsToRenderSeparately = []; // some configurations is not possible to render together and minimized
		// go for every item to complete existing combinations in attributes
		foreach ($items as & $item) {
			$itemArr = array_merge((array) $item, []);
			unset($itemArr['path']);
			if (isset($itemArr['render'])) unset($itemArr['render']);
			if (isset($itemArr['external'])) unset($itemArr['external']);
			$renderArrayKey = md5(json_encode($itemArr));
			if ($itemArr['doNotMinify']) {
				if (isset($itemsToRenderSeparately[$renderArrayKey])) {
					$itemsToRenderSeparately[$renderArrayKey][] = $item;
				} else {
					$itemsToRenderSeparately[$renderArrayKey] = [$item];
				}
			} else {
				if (isset($itemsToRenderMinimized[$renderArrayKey])) {
					$itemsToRenderMinimized[$renderArrayKey][] = $item;
				} else {
					$itemsToRenderMinimized[$renderArrayKey] = [$item];
				}
			}
		}
		return [
			$itemsToRenderMinimized,
			$itemsToRenderSeparately,
		];
	}
protected function filterItemsForNotPossibleMinifiedAndPossibleMinifiedItems ($items) {
		$itemsToRenderMinimized = [];
		$itemsToRenderSeparately = []; // some configurations is not possible to render together and minimized
		// go for every item to complete existing combinations in attributes
		foreach ($items as & $item) {
			$itemArr = array_merge((array) $item, []);
			unset($itemArr['path']);
			if (isset($itemArr['render'])) unset($itemArr['render']);
			if (isset($itemArr['external'])) unset($itemArr['external']);
			$renderArrayKey = md5(json_encode($itemArr));
			if ($itemArr['doNotMinify']) {
				if (isset($itemsToRenderSeparately[$renderArrayKey])) {
					$itemsToRenderSeparately[$renderArrayKey][] = $item;
				} else {
					$itemsToRenderSeparately[$renderArrayKey] = [$item];
				}
			} else {
				if (isset($itemsToRenderMinimized[$renderArrayKey])) {
					$itemsToRenderMinimized[$renderArrayKey][] = $item;
				} else {
					$itemsToRenderMinimized[$renderArrayKey] = [$item];
				}
			}
		}
		return [
			$itemsToRenderMinimized,
			$itemsToRenderSeparately,
		];
	}
protected function filterItemsForNotPossibleMinifiedAndPossibleMinifiedItems ( $ items ) { $ itemsToRenderMinimized = [ ] ; $ itemsToRenderSeparately = [ ] ; // some configurations is not possible to render together and minimized // go for every item to complete existing combinations in attributes foreach ( $ items as & $ item ) { $ itemArr = array_merge ( ( array ) $ item , [ ] ) ; unset ( $ itemArr [ 'path' ] ) ; if ( isset ( $ itemArr [ 'render' ] ) ) unset ( $ itemArr [ 'render' ] ) ; if ( isset ( $ itemArr [ 'external' ] ) ) unset ( $ itemArr [ 'external' ] ) ; $ renderArrayKey = md5 ( json_encode ( $ itemArr ) ) ; if ( $ itemArr [ 'doNotMinify' ] ) { if ( isset ( $ itemsToRenderSeparately [ $ renderArrayKey ] ) ) { $ itemsToRenderSeparately [ $ renderArrayKey ] [ ] = $ item ; } else { $ itemsToRenderSeparately [ $ renderArrayKey ] = [ $ item ] ; } } else { if ( isset ( $ itemsToRenderMinimized [ $ renderArrayKey ] ) ) { $ itemsToRenderMinimized [ $ renderArrayKey ] [ ] = $ item ; } else { $ itemsToRenderMinimized [ $ renderArrayKey ] = [ $ item ] ; } } } return [ $ itemsToRenderMinimized , $ itemsToRenderSeparately , ] ; }
Look for every item to render if there is any 'doNotMinify' record to render item separately
@param array $items
@return array[] $itemsToRenderMinimized $itemsToRenderSeparately
Look for every item to render if there is any doNotMinify record to render item separately