Skip to main content

BoundLinkUtils

Utility functions involving binders and links. It's a common pattern to link back to a bound class. This allows you to quickly retrieve these objects.

Functions

getLinkClass

BoundLinkUtils.getLinkClass(
binderBinder<T>,
linkNamestring,
fromInstance
) → T?

Gets a linked object from the current instance.

getLinkClasses

BoundLinkUtils.getLinkClasses(
binderBinder<T>,
linkNamestring,
fromInstance
) → {T}

Gets a linked objects from the current instance.

getClassesForLinkValues

BoundLinkUtils.getClassesForLinkValues(
binders{Binder<T>},
linkNamestring,
fromInstance
) → {T}

Gets a linked objects from the current instance.

callMethodOnLinkedClasses

BoundLinkUtils.callMethodOnLinkedClasses(
binders{Binder<T>},
linkNamestring,
fromInstance,
methodNamestring,
args{}
) → ()

Calls a method on the binders

Show raw api
{
    "functions": [
        {
            "name": "getLinkClass",
            "desc": "Gets a linked object from the current instance.",
            "params": [
                {
                    "name": "binder",
                    "desc": "",
                    "lua_type": "Binder<T>"
                },
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "T?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/boundlinkutils/src/Shared/BoundLinkUtils.lua"
            }
        },
        {
            "name": "getLinkClasses",
            "desc": "Gets a linked objects from the current instance.",
            "params": [
                {
                    "name": "binder",
                    "desc": "",
                    "lua_type": "Binder<T>"
                },
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ T }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 46,
                "path": "src/boundlinkutils/src/Shared/BoundLinkUtils.lua"
            }
        },
        {
            "name": "getClassesForLinkValues",
            "desc": "Gets a linked objects from the current instance.",
            "params": [
                {
                    "name": "binders",
                    "desc": "",
                    "lua_type": "{ Binder<T> }"
                },
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ T }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 69,
                "path": "src/boundlinkutils/src/Shared/BoundLinkUtils.lua"
            }
        },
        {
            "name": "callMethodOnLinkedClasses",
            "desc": "Calls a method on the binders",
            "params": [
                {
                    "name": "binders",
                    "desc": "",
                    "lua_type": "{ Binder<T> }"
                },
                {
                    "name": "linkName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "methodName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "args",
                    "desc": "",
                    "lua_type": "{}"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 105,
                "path": "src/boundlinkutils/src/Shared/BoundLinkUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "BoundLinkUtils",
    "desc": "Utility functions involving binders and links. It's a common pattern to link\nback to a bound class. This allows you to quickly retrieve these objects.",
    "source": {
        "line": 7,
        "path": "src/boundlinkutils/src/Shared/BoundLinkUtils.lua"
    }
}