public function getBreadcrumbInfo(Model $model, $id = null, $includeRoot = null) {
		if (!empty($id) && ($includeRoot === null)) {
			$includeRoot = true;
		}

		$result = [];
		$root = [];
		if ($includeRoot) {
			$root = $model->getBreadcrumbInfo();
			if (empty($root)) {
				return $result;
			}
		}

		$info = $model->createBreadcrumb($id);
		if (empty($info)) {
			return $result;
		}

		if (!empty($root)) {
			$result = $root;
		}
		$result[] = $info;

		return $result;
	}
public function getBreadcrumbInfo(Model $model, $id = null, $includeRoot = null) {
		if (!empty($id) && ($includeRoot === null)) {
			$includeRoot = true;
		}

		$result = [];
		$root = [];
		if ($includeRoot) {
			$root = $model->getBreadcrumbInfo();
			if (empty($root)) {
				return $result;
			}
		}

		$info = $model->createBreadcrumb($id);
		if (empty($info)) {
			return $result;
		}

		if (!empty($root)) {
			$result = $root;
		}
		$result[] = $info;

		return $result;
	}
public function getBreadcrumbInfo ( Model $ model , $ id = null , $ includeRoot = null ) { if ( ! empty ( $ id ) && ( $ includeRoot === null ) ) { $ includeRoot = true ; } $ result = [ ] ; $ root = [ ] ; if ( $ includeRoot ) { $ root = $ model -> getBreadcrumbInfo ( ) ; if ( empty ( $ root ) ) { return $ result ; } } $ info = $ model -> createBreadcrumb ( $ id ) ; if ( empty ( $ info ) ) { return $ result ; } if ( ! empty ( $ root ) ) { $ result = $ root ; } $ result [ ] = $ info ; return $ result ; }
Return an array of information for creating a breadcrumbs.

@param Model $model Model using this behavior.
@param int|string|array $id ID of record or array data
for retrieving name.
@param bool|null $includeRoot If True, include information of root breadcrumb.
If Null, include information of root breadcrumb if $ID is not empty.
@return array Return an array of information for creating a breadcrumbs.
Return an array of information for creating a breadcrumbs .