Ferreteria/v0.5/@cls/cDropinLink: Difference between revisions
< Ferreteria | v0.5 | @cls
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
|} | |} | ||
* '''File''': {{l/ferreteria/code|layout/page/menu/DropinLink.php}} | * '''File''': {{l/ferreteria/code|layout/page/menu/DropinLink.php}} | ||
==About== | |||
Each DropinLink object connects to a Feature object. It uses the {{l/ver/meth|layout/event|OnRunCalculations}} method in {{l/ver/class|tRequiresPermit}} to calculate whether or not the current user has permission to access that Feature, and sets <code>SetIsAuthorized()</code> accordingly. <code>GetIsAuthorized()</code> returns the value of that flag. | |||
* {{l/ver/meth|layout/event|ShouldDoTwigs}} (defined in {{l/ver/class|tRequiresPermit}}) returns the return value of <code>GetIsAuthorized()</code>. | |||
* {{l/ver/meth|layout/event|GetShouldDisplay}} returns TRUE iff <code>GetIsSelected()</code> and <code>GetIsAuthorized()</code> are both TRUE. | |||
==Methods== | ==Methods== | ||
===events: general=== | ===events: general=== | ||
Line 14: | Line 18: | ||
* {{l/ver/meth|layout|OnEventLocal}}: if GetIsSelected() and GetIsAuthorized(), then InvokeFeature() | * {{l/ver/meth|layout|OnEventLocal}}: if GetIsSelected() and GetIsAuthorized(), then InvokeFeature() | ||
** ...and also $oe->SetDoTwigs(FALSE), which is no longer supported and will generate an error if this code is actually run. | ** ...and also $oe->SetDoTwigs(FALSE), which is no longer supported and will generate an error if this code is actually run. | ||
===events: render=== | ===events: render=== | ||
* {{l/ver/meth|layout|OnRender}} | * {{l/ver/meth|layout|OnRender}} | ||
* {{l/ver/meth|layout|GetShouldDisplay}} returns GetIsAuthorized() | * {{l/ver/meth|layout|GetShouldDisplay}} returns GetIsAuthorized() | ||
* RenderSelf() - this isn't a thing anymore; needs renaming/refactoring | * RenderSelf() - this isn't a thing anymore; needs renaming/refactoring |
Revision as of 20:02, 15 July 2022
Ferreteria class
ferret\cDropinLink |
cDropinLink | → cDropinAction |
About
Each DropinLink object connects to a Feature object. It uses the OnRunCalculations() method in tRequiresPermit to calculate whether or not the current user has permission to access that Feature, and sets SetIsAuthorized()
accordingly. GetIsAuthorized()
returns the value of that flag.
- ShouldDoTwigs() (defined in tRequiresPermit) returns the return value of
GetIsAuthorized()
. - GetShouldDisplay() returns TRUE iff
GetIsSelected()
andGetIsAuthorized()
are both TRUE.
Methods
events: general
- OnRunCalculations() comes from tRequiresPermit
- OnEventLocal(): if GetIsSelected() and GetIsAuthorized(), then InvokeFeature()
- ...and also $oe->SetDoTwigs(FALSE), which is no longer supported and will generate an error if this code is actually run.
events: render
- OnRender()
- GetShouldDisplay() returns GetIsAuthorized()
- RenderSelf() - this isn't a thing anymore; needs renaming/refactoring