private function tempAclSubresourceUnsetFromCollection(array & $details) {
		foreach ($details as $k0 => $v0) {
			if (!empty($v0['acl_subresource'])) {
				if (!is_array($v0['acl_subresource'])) {
					$v0['acl_subresource'] = [$v0['acl_subresource']];
				}
				$found = true;
				foreach ($v0['acl_subresource'] as $v) {
					if (!\Application::$controller->canSubresourceCached($v, 'Record_View')) {
						$found = false;
						break;
					}
				}
				if (!$found) {
					unset($details[$k0]);
					continue;
				}
			}
			// if we have more details
			if (!empty($v0['details'])) {
				$this->tempAclSubresourceUnsetFromCollection($details[$k0]['details']);
			}
		}
	}
private function tempAclSubresourceUnsetFromCollection(array & $details) {
		foreach ($details as $k0 => $v0) {
			if (!empty($v0['acl_subresource'])) {
				if (!is_array($v0['acl_subresource'])) {
					$v0['acl_subresource'] = [$v0['acl_subresource']];
				}
				$found = true;
				foreach ($v0['acl_subresource'] as $v) {
					if (!\Application::$controller->canSubresourceCached($v, 'Record_View')) {
						$found = false;
						break;
					}
				}
				if (!$found) {
					unset($details[$k0]);
					continue;
				}
			}
			// if we have more details
			if (!empty($v0['details'])) {
				$this->tempAclSubresourceUnsetFromCollection($details[$k0]['details']);
			}
		}
	}
private function tempAclSubresourceUnsetFromCollection ( array & $ details ) { foreach ( $ details as $ k0 => $ v0 ) { if ( ! empty ( $ v0 [ 'acl_subresource' ] ) ) { if ( ! is_array ( $ v0 [ 'acl_subresource' ] ) ) { $ v0 [ 'acl_subresource' ] = [ $ v0 [ 'acl_subresource' ] ] ; } $ found = true ; foreach ( $ v0 [ 'acl_subresource' ] as $ v ) { if ( ! \ Application :: $ controller -> canSubresourceCached ( $ v , 'Record_View' ) ) { $ found = false ; break ; } } if ( ! $ found ) { unset ( $ details [ $ k0 ] ) ; continue ; } } // if we have more details if ( ! empty ( $ v0 [ 'details' ] ) ) { $ this -> tempAclSubresourceUnsetFromCollection ( $ details [ $ k0 ] [ 'details' ] ) ; } } }
Unset collection sub-resources based on acl

@param array $details
Unset collection sub - resources based on acl