|
|
|
@ -18,8 +18,10 @@ public class LayoutHookViewComponent : AbpViewComponent |
|
|
|
|
|
|
|
public virtual IViewComponentResult Invoke(string name, string layout) |
|
|
|
{ |
|
|
|
var hooks = Options.Hooks.GetOrDefault(name)?.Where(x => x.Layout == layout && IsViewComponent(x)).ToArray() |
|
|
|
?? Array.Empty<LayoutHookInfo>(); |
|
|
|
var hooks = Options.Hooks.GetOrDefault(name)? |
|
|
|
.Where(IsViewComponent) |
|
|
|
.WhereIf(!string.IsNullOrWhiteSpace(layout), x => x.Layout == layout) |
|
|
|
.ToArray() ?? Array.Empty<LayoutHookInfo>(); |
|
|
|
|
|
|
|
return View( |
|
|
|
"~/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/Default.cshtml", |
|
|
|
|