public function getResultMessage(Model $model, $info = null, $type = null) {
		if (empty($info) || !is_array($info)) {
			return false;
		}

		$type = (string)$type;
		if (!empty($type)) {
			$type = ' ' . $type;
		}

		$result = '';
		$messages = [];
		foreach ($info as $infoItem) {
			if (!isset($infoItem['data']) || empty($infoItem['data']) ||
				!is_array($infoItem['data'])) {
				continue;
			}
			if (isset($infoItem['deep']) && $infoItem['deep']) {
				$numRecords = count($infoItem['data'], COUNT_RECURSIVE) - count($infoItem['data'], COUNT_NORMAL);
			} else {
				$numRecords = count($infoItem['data']);
			}

			if ($numRecords == 0) {
				continue;
			}

			$numRecordsText = __dn('cake_ldap', 'record', 'records', $numRecords);
			$label = '';
			if (isset($infoItem['label'])) {
				$label = $infoItem['label'];
			}
			if (!empty($label)) {
				$label .= ': ';
			}
			$messages[] = ' * ' . $label . $numRecords . ' ' . $numRecordsText;
		}
		if (!empty($messages)) {
			$result = __d('cake_ldap', 'Result of synchronization') . $type . "\n" . implode("\n", $messages);
		}

		return $result;
	}
public function getResultMessage(Model $model, $info = null, $type = null) {
		if (empty($info) || !is_array($info)) {
			return false;
		}

		$type = (string)$type;
		if (!empty($type)) {
			$type = ' ' . $type;
		}

		$result = '';
		$messages = [];
		foreach ($info as $infoItem) {
			if (!isset($infoItem['data']) || empty($infoItem['data']) ||
				!is_array($infoItem['data'])) {
				continue;
			}
			if (isset($infoItem['deep']) && $infoItem['deep']) {
				$numRecords = count($infoItem['data'], COUNT_RECURSIVE) - count($infoItem['data'], COUNT_NORMAL);
			} else {
				$numRecords = count($infoItem['data']);
			}

			if ($numRecords == 0) {
				continue;
			}

			$numRecordsText = __dn('cake_ldap', 'record', 'records', $numRecords);
			$label = '';
			if (isset($infoItem['label'])) {
				$label = $infoItem['label'];
			}
			if (!empty($label)) {
				$label .= ': ';
			}
			$messages[] = ' * ' . $label . $numRecords . ' ' . $numRecordsText;
		}
		if (!empty($messages)) {
			$result = __d('cake_ldap', 'Result of synchronization') . $type . "\n" . implode("\n", $messages);
		}

		return $result;
	}
public function getResultMessage ( Model $ model , $ info = null , $ type = null ) { if ( empty ( $ info ) || ! is_array ( $ info ) ) { return false ; } $ type = ( string ) $ type ; if ( ! empty ( $ type ) ) { $ type = ' ' . $ type ; } $ result = '' ; $ messages = [ ] ; foreach ( $ info as $ infoItem ) { if ( ! isset ( $ infoItem [ 'data' ] ) || empty ( $ infoItem [ 'data' ] ) || ! is_array ( $ infoItem [ 'data' ] ) ) { continue ; } if ( isset ( $ infoItem [ 'deep' ] ) && $ infoItem [ 'deep' ] ) { $ numRecords = count ( $ infoItem [ 'data' ] , COUNT_RECURSIVE ) - count ( $ infoItem [ 'data' ] , COUNT_NORMAL ) ; } else { $ numRecords = count ( $ infoItem [ 'data' ] ) ; } if ( $ numRecords == 0 ) { continue ; } $ numRecordsText = __dn ( 'cake_ldap' , 'record' , 'records' , $ numRecords ) ; $ label = '' ; if ( isset ( $ infoItem [ 'label' ] ) ) { $ label = $ infoItem [ 'label' ] ; } if ( ! empty ( $ label ) ) { $ label .= ': ' ; } $ messages [ ] = ' * ' . $ label . $ numRecords . ' ' . $ numRecordsText ; } if ( ! empty ( $ messages ) ) { $ result = __d ( 'cake_ldap' , 'Result of synchronization' ) . $ type . "\n" . implode ( "\n" , $ messages ) ; } return $ result ; }
Return message of result for synchronization process.

@param Model $model Model using this behavior.
@param array $info Array data for creation message informat:
- key `data`, value - data for processing;
- key `deep`, value - if True, use amount of second level items in data;
otherwise, use amount of first level;
- key `label`, value - label of result string.
@param string $type Type of synchronization.
@return string Return message of result
Return message of result for synchronization process .