StructureLink
class StructureLink extends Model (View source)
Traits
Methods to manage a model's icon
attribute.
Methods to manage permissions on a model.
Methods for models that can be a part of the forum "structure", like channels, pages, links, and headings.
Methods to associate uploaded images with a model.
Properties
static protected | $unguarded | from Model | |
string | $icon | from HasIcon | |
?string | $icon_file | The path to the icon file, if the icon is the
|
from HasIcon |
PermissionCollection read-only | $permissions | from HasPermissions | |
Structure read-only | $structure | from Structurable | |
$timestamps | |||
int | $id | ||
string | $name | ||
string | $href | ||
string read-only | $edit_url |
Methods
Relationship with the permission records pertaining to this model.
A list of abilities to check by default when creating a model.
Get the model IDs that the given user has permission for.
Relationship with the node for this model within the forum structure.
No description
Details
in
Model at line 18
getConnectionName()
No description
void
saveIcon(array $icon)
Save the icon using input from an
protected Attribute
iconFile()
No description
static void
bootHasPermissions()
No description
MorphMany
permissions()
Relationship with the permission records pertaining to this model.
array
abilities()
A list of abilities that can be applied to this model.
array
defaultAbilities()
A list of abilities to check by default when creating a model.
void
savePermissions(array|null $grid)
Save the permissions to the database.
bool
isPublic(string $ability = 'view')
No description
static array|null
allPermitted(User|null $user, string $ability = 'view')
Get the model IDs that the given user has permission for.
If the user is an admin, the result will be null, meaning there is no restriction on the models they have permission for.
static void
bootStructurable()
No description
MorphOne
structure()
Relationship with the node for this model within the forum structure.
protected Attribute
editUrl()
No description