public function createBreadcrumb(Model $model, $id = null, $link = null, $escape = true) {
		$result = [];
		if (empty($id)) {
			$name = $model->getGroupName();
		} else {
			$name = $model->getName($id);
		}
		if (empty($name)) {
			return $result;
		}
		if ($escape) {
			$name = h($name);
		}

		if ($link === false) {
			$link = null;
		} else {
			if (!is_array($link)) {
				$link = [];
			}
			$plugin = $model->getPluginName();
			$controller = $model->getControllerName();
			if (empty($id)) {
				$action = 'index';
			} else {
				$action = $model->getActionName();
				if (empty($link)) {
					$link[] = $id;
				}
			}
			$link += compact('plugin', 'controller', 'action');
		}

		$name = CakeText::truncate($name, CAKE_THEME_BREADCRUMBS_TEXT_LIMIT);
		$result = [
			$name,
			$link
		];

		return $result;
	}
public function createBreadcrumb(Model $model, $id = null, $link = null, $escape = true) {
		$result = [];
		if (empty($id)) {
			$name = $model->getGroupName();
		} else {
			$name = $model->getName($id);
		}
		if (empty($name)) {
			return $result;
		}
		if ($escape) {
			$name = h($name);
		}

		if ($link === false) {
			$link = null;
		} else {
			if (!is_array($link)) {
				$link = [];
			}
			$plugin = $model->getPluginName();
			$controller = $model->getControllerName();
			if (empty($id)) {
				$action = 'index';
			} else {
				$action = $model->getActionName();
				if (empty($link)) {
					$link[] = $id;
				}
			}
			$link += compact('plugin', 'controller', 'action');
		}

		$name = CakeText::truncate($name, CAKE_THEME_BREADCRUMBS_TEXT_LIMIT);
		$result = [
			$name,
			$link
		];

		return $result;
	}
public function createBreadcrumb ( Model $ model , $ id = null , $ link = null , $ escape = true ) { $ result = [ ] ; if ( empty ( $ id ) ) { $ name = $ model -> getGroupName ( ) ; } else { $ name = $ model -> getName ( $ id ) ; } if ( empty ( $ name ) ) { return $ result ; } if ( $ escape ) { $ name = h ( $ name ) ; } if ( $ link === false ) { $ link = null ; } else { if ( ! is_array ( $ link ) ) { $ link = [ ] ; } $ plugin = $ model -> getPluginName ( ) ; $ controller = $ model -> getControllerName ( ) ; if ( empty ( $ id ) ) { $ action = 'index' ; } else { $ action = $ model -> getActionName ( ) ; if ( empty ( $ link ) ) { $ link [ ] = $ id ; } } $ link += compact ( 'plugin' , 'controller' , 'action' ) ; } $ name = CakeText :: truncate ( $ name , CAKE_THEME_BREADCRUMBS_TEXT_LIMIT ) ; $ result = [ $ name , $ link ] ; return $ result ; }
Return an array of information for creating a breadcrumb.

@param Model $model Model using this behavior.
@param int|string|array $id ID of record or array data
for retrieving name.
@param array|bool|null $link URL for breadcrumb or False to disable auto creation.
@param bool $escape Escape conversion HTML special characters to HTML entities.
@return array Return an array of information for creating a breadcrumb.
Return an array of information for creating a breadcrumb .