User
extends ComponentBase
in package
User Extended by Shawn Clake Class User User Extended is licensed under the MIT license.
Tags
Table of Contents
- $alias : string
- $assetPath : string
- $componentCssClass : string
- $id : string
- $implement : array<string|int, mixed>
- $inspectorEnabled : bool
- $isHidden : bool
- $name : string
- $pluginIcon : string
- $assets : array<string|int, mixed>
- $controller : Controller
- $dirName : string
- $extendableCallbacks : array<string|int, mixed>
- $extendableGuardProperties : bool
- $extendableStaticMethods : array<string|int, mixed>
- $extensionData : array<string|int, mixed>
- $externalPropertyNames : array<string|int, mixed>
- $page : PageCode
- $properties : array<string|int, mixed>
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- Constructor
- __get() : mixed
- __set() : mixed
- __toString() : mixed
- Returns the component's alias, used by __SELF__
- addCss() : void
- Adds StyleSheet asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.
- addDynamicMethod() : mixed
- Programmatically adds a method to the extendable class
- addDynamicProperty() : mixed
- Programmatically adds a property to the extendable class
- addJs() : void
- Adds JavaScript asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.
- addRss() : void
- Adds an RSS link asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.
- asExtension() : mixed
- Short hand for `getClassExtension()` method, except takes the short extension name, example:
- clearExtendedClasses() : void
- Clear the list of extended classes so they will be re-extended.
- combineAssets() : string
- Run the provided assets through the Asset Combiner
- comments() : mixed
- Returns a collection of comments for a users profile
- componentDetails() : mixed
- Returns information about this component, including name and description.
- defineProperties() : mixed
- extend() : mixed
- extendableCall() : mixed
- Magic method for `__call()`
- extendableCallStatic() : mixed
- Magic method for `__callStatic()`
- extendableConstruct() : mixed
- This method should be called as part of the constructor.
- extendableExtendCallback() : void
- Helper method for `::extend()` static method
- extendableGet() : string
- Magic method for `__get()`
- extendableSet() : string
- Magic method for `__set()`
- extendClassWith() : void
- Dynamically extend a class with a specified behavior
- fireSystemEvent() : mixed
- Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.
- fireViewEvent() : string
- Special event function used for extending within view files, allowing HTML to be injected multiple times.
- flushAssets() : void
- Disables the use, and subequent broadcast, of assets. This is useful to call during an AJAX request to speed things up. This method works by specifically targeting the hasAssetsDefined method.
- getAssetPath() : string
- Locates a file based on it's definition. If the file starts with a forward slash, it will be returned in context of the application public path, otherwise it will be returned in context of the asset path.
- getAssetPaths() : array<string|int, mixed>
- Returns an array of all registered asset paths.
- getClassExtension() : mixed
- Returns a behavior object from an extendable class, example:
- getClassMethods() : array<string|int, mixed>
- Get a list of class methods, extension equivalent of get_class_methods()
- getDynamicProperties() : array<string|int, mixed>
- Returns all dynamic properties and their values
- getPath() : mixed
- Returns the absolute component path.
- getProfilePageOptions() : mixed
- Used for properties dropdown menu
- getProperties() : array<string|int, mixed>
- Returns all properties.
- getPropertyOptions() : array<string|int, mixed>
- Returns options for multi-option properties (drop-downs, etc.)
- getTemplateOptions() : mixed
- getTypeOptions() : array<string|int, mixed>
- Used for properties dropdown menu
- groups() : mixed
- Returns a collection of roles which the logged in user has
- hasAssetsDefined() : bool
- Returns true if assets any have been added.
- hasGroup() : bool
- Returns true if the user is the group which is passed in Useful to use in twig templates such as this: {% if ueuser.hasGroup('admin') %}
- hasRole() : bool
- Returns true if the user is in the role which is passed in Useful to use in twig templates such as this: {% if ueuser.hasRole('sr-dev') %}
- init() : mixed
- Executed when this component is first initialized, before AJAX requests.
- isClassExtendedWith() : bool
- Check if extendable class is extended with a behavior object
- isFriend() : bool
- Returns if the passed in user id is a friend of the current user.
- isInRole() : mixed
- isRequested() : bool
- Returns if the current user has a pending friend request from the current user.
- locked() : bool
- Returns whether or not the user is our friend and thus whether or not the page should be partially restricted
- loggedIn() : user
- Returns the user that is currently logged in.
- makeAssets() : string
- Outputs `<link>` and `<script>` tags to load assets previously added with addJs and addCss method calls
- methodExists() : bool
- Checks if a method exists, extension equivalent of method_exists()
- onComment() : array<string|int, mixed>
- AJAX handler for when someone leaves a comment on a profile
- onDeleteComment() : array<string|int, mixed>
- AJAX handler for when deleting a comment
- onFriendUser() : mixed
- AJAX call for when someone wants to send a friend request
- onRender() : mixed
- Executed when this component is rendered on a page or layout.
- onRequest() : mixed
- AJAX call for when someone wants to send a friend request
- onRun() : mixed
- Returns a list of user groups to the page in a variable called 'groups'
- onSearch() : array<string|int, mixed>
- Searches for users based on a page field called 'phrase'
- onVisitProfile() : mixed
- AJAX handler to visit profiles
- paramName() : string
- Returns the external property name when the property value is a routing parameter reference.
- profilePage() : string
- Gets the url of the current user's profile page
- property() : string
- Returns a defined property value or default if one is not set.
- propertyExists() : bool
- Checks if a property exists, extension equivalent of `property_exists()`
- propertyName() : string
- Returns the external property name when the property value is an external property reference.
- randomUsers() : Collection
- renderPartial() : mixed
- Renders a requested partial in context of this component, see Cms\Classes\Controller@renderPartial for usage.
- roles() : string
- Returns a collection of roles which the logged in user has
- runAjaxHandler() : bool
- Executes the event cycle when running an AJAX handler.
- setExternalPropertyName() : string
- Sets an external property name.
- setExternalPropertyNames() : void
- Sets names used by external properties.
- setProperties() : void
- Sets multiple properties.
- setProperty() : void
- Sets a property value
- singleUser() : mixed
- Returns a user by ID specified in the component, or the logged in user if one is not specified
- type() : mixed
- Returns the list/component type
- user() : mixed
- Provides user information to the page
- userAvatar() : mixed
- Returns the users avatar model TODO: This should return the default avatar if the user doesn't have an avatar
- usersGroups() : mixed
- Returns a collection of groups which a user has
- usersRoles() : mixed
- Returns a collection of roles which a user has
- validateProperties() : array<string|int, mixed>
- Validates the properties against the defined properties of the class.
- addAsset() : mixed
- Adds the provided asset to the internal asset collections
- extendableIsAccessible() : bool
- Checks if a property is accessible, property equivalent of `is_callable()`
- extensionExtractMethods() : void
- Extracts the available methods from a behavior and adds it to the list of callable methods.
- getAssetEntryBuildPath() : string
- Internal helper, attaches a build code to an asset path
- getAssetScheme() : string
- Internal helper, get asset scheme
- getLocalPath() : mixed
- removeDuplicates() : void
- Removes duplicate assets from the entire collection.
- renderComments() : array<string|int, mixed>
- Used to dynamically update the comment section when a user leaves a new comment
- renderResults() : array<string|int, mixed>
- Renders a search results partial.
Properties
$alias
public
string
$alias
Alias used for this component.
$assetPath
public
string
$assetPath
Specifies a path to the asset directory.
$componentCssClass
public
string
$componentCssClass
Component CSS class name for the back-end page/layout component list. This field is used by the CMS internally.
$id
public
string
$id
A unique identifier for this component.
$implement
public
array<string|int, mixed>
$implement
Extensions implemented by this class.
$inspectorEnabled
public
bool
$inspectorEnabled
= true
Determines whether Inspector can be used with the component. This field is used by the CMS internally.
$isHidden
public
bool
$isHidden
= false
Determines whether the component is hidden from the back-end UI.
$name
public
string
$name
Component class name or class alias used in the component declaration in a template.
$pluginIcon
public
string
$pluginIcon
Icon of the plugin that defines the component. This field is used by the CMS internally.
$assets
protected
array<string|int, mixed>
$assets
= ['js' => [], 'css' => [], 'rss' => []]
Collection of assets to display in the layout.
$controller
protected
Controller
$controller
Controller object.
$dirName
protected
string
$dirName
Specifies the component directory name.
$extendableCallbacks
protected
static array<string|int, mixed>
$extendableCallbacks
= []
Used to extend the constructor of an extendable class. Eg:
Class::extend(function($obj) { })
$extendableGuardProperties
protected
static bool
$extendableGuardProperties
= true
Indicates if dynamic properties can be created.
$extendableStaticMethods
protected
static array<string|int, mixed>
$extendableStaticMethods
= []
Collection of static methods used by behaviors.
$extensionData
protected
array<string|int, mixed>
$extensionData
= ['extensions' => [], 'methods' => [], 'dynamicMethods' => [], 'dynamicProperties' => []]
Class reflection information, including behaviors.
$externalPropertyNames
protected
array<string|int, mixed>
$externalPropertyNames
= []
A collection of external property names used by this component.
$page
protected
PageCode
$page
Page object object.
$properties
protected
array<string|int, mixed>
$properties
= []
Contains the object property values.
Methods
__call()
public
__call(mixed $name, mixed $params) : mixed
Parameters
- $name : mixed
- $params : mixed
Return values
mixed —__callStatic()
public
static __callStatic(mixed $name, mixed $params) : mixed
Parameters
- $name : mixed
- $params : mixed
Return values
mixed —__construct()
Constructor
public
__construct() : mixed
Return values
mixed —__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —__set()
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
Return values
mixed —__toString()
Returns the component's alias, used by __SELF__
public
__toString() : mixed
Return values
mixed —addCss()
Adds StyleSheet asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.
public
addCss(string $name[, array<string|int, mixed> $attributes = [] ]) : void
Parameters
- $name : string
-
Specifies a path (URL) to the script.
- $attributes : array<string|int, mixed> = []
-
Adds extra HTML attributes to the asset link.
Return values
void —addDynamicMethod()
Programmatically adds a method to the extendable class
public
addDynamicMethod(string $dynamicName, callable $method[, string $extension = null ]) : mixed
Parameters
- $dynamicName : string
- $method : callable
- $extension : string = null
Return values
mixed —addDynamicProperty()
Programmatically adds a property to the extendable class
public
addDynamicProperty(string $dynamicName[, string $value = null ]) : mixed
Parameters
- $dynamicName : string
- $value : string = null
Return values
mixed —addJs()
Adds JavaScript asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.
public
addJs(string $name[, array<string|int, mixed> $attributes = [] ]) : void
Parameters
- $name : string
-
Specifies a path (URL) to the script.
- $attributes : array<string|int, mixed> = []
-
Adds extra HTML attributes to the asset link.
Return values
void —addRss()
Adds an RSS link asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.
public
addRss(string $name[, array<string|int, mixed> $attributes = [] ]) : void
Parameters
- $name : string
-
Specifies a path (URL) to the RSS channel
- $attributes : array<string|int, mixed> = []
-
Adds extra HTML attributes to the asset link.
Return values
void —asExtension()
Short hand for `getClassExtension()` method, except takes the short extension name, example:
public
asExtension(string $shortName) : mixed
$this->asExtension('FormController')
Parameters
- $shortName : string
Return values
mixed —clearExtendedClasses()
Clear the list of extended classes so they will be re-extended.
public
static clearExtendedClasses() : void
Return values
void —combineAssets()
Run the provided assets through the Asset Combiner
public
combineAssets(array<string|int, mixed> $assets[, string $localPath = '' ]) : string
Parameters
- $assets : array<string|int, mixed>
-
Collection of assets
- $localPath : string = ''
-
Prefix all assets with this path (optional)
Return values
string —comments()
Returns a collection of comments for a users profile
public
comments() : mixed
Return values
mixed —componentDetails()
Returns information about this component, including name and description.
public
componentDetails() : mixed
Return values
mixed —defineProperties()
public
defineProperties() : mixed
Return values
mixed —extend()
public
static extend(callable $callback) : mixed
Parameters
- $callback : callable
Return values
mixed —extendableCall()
Magic method for `__call()`
public
extendableCall(string $name[, array<string|int, mixed> $params = null ]) : mixed
Parameters
- $name : string
- $params : array<string|int, mixed> = null
Return values
mixed —extendableCallStatic()
Magic method for `__callStatic()`
public
static extendableCallStatic(string $name[, array<string|int, mixed> $params = null ]) : mixed
Parameters
- $name : string
- $params : array<string|int, mixed> = null
Return values
mixed —extendableConstruct()
This method should be called as part of the constructor.
public
extendableConstruct() : mixed
Return values
mixed —extendableExtendCallback()
Helper method for `::extend()` static method
public
static extendableExtendCallback(callable $callback) : void
Parameters
- $callback : callable
Return values
void —extendableGet()
Magic method for `__get()`
public
extendableGet(string $name) : string
Parameters
- $name : string
Return values
string —extendableSet()
Magic method for `__set()`
public
extendableSet(string $name, string $value) : string
Parameters
- $name : string
- $value : string
Return values
string —extendClassWith()
Dynamically extend a class with a specified behavior
public
extendClassWith(string $extensionName) : void
Parameters
- $extensionName : string
Return values
void —fireSystemEvent()
Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.
public
fireSystemEvent(string $event[, array<string|int, mixed> $params = [] ][, bool $halt = true ]) : mixed
For example:
$this->fireSystemEvent('backend.list.myEvent', ['my value']);
Is equivalent to:
$this->fireEvent('list.myEvent', ['myvalue'], true);
Event::fire('backend.list.myEvent', [$this, 'myvalue'], true);
Parameters
- $event : string
-
Event name
- $params : array<string|int, mixed> = []
-
Event parameters
- $halt : bool = true
-
Halt after first non-null result
Return values
mixed —fireViewEvent()
Special event function used for extending within view files, allowing HTML to be injected multiple times.
public
fireViewEvent(string $event[, array<string|int, mixed> $params = [] ]) : string
For example:
= $this->fireViewEvent('backend.auth.extendSigninView') ?>Parameters
- $event : string
-
Event name
- $params : array<string|int, mixed> = []
-
Event parameters
Return values
string —flushAssets()
Disables the use, and subequent broadcast, of assets. This is useful to call during an AJAX request to speed things up. This method works by specifically targeting the hasAssetsDefined method.
public
flushAssets() : void
Return values
void —getAssetPath()
Locates a file based on it's definition. If the file starts with a forward slash, it will be returned in context of the application public path, otherwise it will be returned in context of the asset path.
public
getAssetPath(string $fileName[, string $assetPath = null ]) : string
Parameters
- $fileName : string
-
File to load.
- $assetPath : string = null
-
Explicitly define an asset path.
Return values
string —Relative path to the asset file.
getAssetPaths()
Returns an array of all registered asset paths.
public
getAssetPaths() : array<string|int, mixed>
Return values
array<string|int, mixed> —getClassExtension()
Returns a behavior object from an extendable class, example:
public
getClassExtension(string $name) : mixed
$this->getClassExtension('Backend.Behaviors.FormController')
Parameters
- $name : string
-
Fully qualified behavior name
Return values
mixed —getClassMethods()
Get a list of class methods, extension equivalent of get_class_methods()
public
getClassMethods() : array<string|int, mixed>
Return values
array<string|int, mixed> —getDynamicProperties()
Returns all dynamic properties and their values
public
getDynamicProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —['property' => 'value']
getPath()
Returns the absolute component path.
public
getPath() : mixed
Return values
mixed —getProfilePageOptions()
Used for properties dropdown menu
public
getProfilePageOptions() : mixed
Return values
mixed —getProperties()
Returns all properties.
public
getProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —getPropertyOptions()
Returns options for multi-option properties (drop-downs, etc.)
public
getPropertyOptions(string $property) : array<string|int, mixed>
Parameters
- $property : string
-
Specifies the property name
Return values
array<string|int, mixed> —Return an array of option values and descriptions
getTemplateOptions()
public
getTemplateOptions() : mixed
Return values
mixed —getTypeOptions()
Used for properties dropdown menu
public
getTypeOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —groups()
Returns a collection of roles which the logged in user has
public
groups() : mixed
Return values
mixed —hasAssetsDefined()
Returns true if assets any have been added.
public
hasAssetsDefined() : bool
Return values
bool —hasGroup()
Returns true if the user is the group which is passed in Useful to use in twig templates such as this: {% if ueuser.hasGroup('admin') %}
public
hasGroup( $groupCode) : bool
Parameters
Return values
bool —hasRole()
Returns true if the user is in the role which is passed in Useful to use in twig templates such as this: {% if ueuser.hasRole('sr-dev') %}
public
hasRole( $roleCode) : bool
Parameters
Return values
bool —init()
Executed when this component is first initialized, before AJAX requests.
public
init() : mixed
Return values
mixed —isClassExtendedWith()
Check if extendable class is extended with a behavior object
public
isClassExtendedWith(string $name) : bool
Parameters
- $name : string
-
Fully qualified behavior name
Return values
bool —isFriend()
Returns if the passed in user id is a friend of the current user.
public
isFriend(mixed $friendId) : bool
Parameters
- $friendId : mixed
Return values
bool —isInRole()
public
isInRole(mixed $roleCode) : mixed
Parameters
- $roleCode : mixed
Return values
mixed —isRequested()
Returns if the current user has a pending friend request from the current user.
public
isRequested(mixed $friendId) : bool
Parameters
- $friendId : mixed
Return values
bool —locked()
Returns whether or not the user is our friend and thus whether or not the page should be partially restricted
public
locked() : bool
Return values
bool —loggedIn()
Returns the user that is currently logged in.
public
loggedIn() : user
Return values
user —makeAssets()
Outputs `<link>` and `<script>` tags to load assets previously added with addJs and addCss method calls
public
makeAssets([string $type = null ]) : string
Parameters
- $type : string = null
-
Return an asset collection of a given type (css, rss, js) or null for all.
Return values
string —methodExists()
Checks if a method exists, extension equivalent of method_exists()
public
methodExists(string $name) : bool
Parameters
- $name : string
Return values
bool —onComment()
AJAX handler for when someone leaves a comment on a profile
public
onComment() : array<string|int, mixed>
Return values
array<string|int, mixed> —onDeleteComment()
AJAX handler for when deleting a comment
public
onDeleteComment() : array<string|int, mixed>
Return values
array<string|int, mixed> —onFriendUser()
AJAX call for when someone wants to send a friend request
public
onFriendUser() : mixed
Return values
mixed —onRender()
Executed when this component is rendered on a page or layout.
public
onRender() : mixed
Return values
mixed —onRequest()
AJAX call for when someone wants to send a friend request
public
onRequest() : mixed
Return values
mixed —onRun()
Returns a list of user groups to the page in a variable called 'groups'
public
onRun() : mixed
Return values
mixed —onSearch()
Searches for users based on a page field called 'phrase'
public
onSearch() : array<string|int, mixed>
Return values
array<string|int, mixed> —onVisitProfile()
AJAX handler to visit profiles
public
onVisitProfile([mixed $property = null ][, mixed $userid = null ]) : mixed
Parameters
- $property : mixed = null
- $userid : mixed = null
Return values
mixed —paramName()
Returns the external property name when the property value is a routing parameter reference.
public
paramName(string $name[, mixed $default = null ]) : string
Otherwise the default value specified is returned.
Parameters
- $name : string
-
The property name
- $default : mixed = null
Return values
string —profilePage()
Gets the url of the current user's profile page
public
profilePage([mixed $param = '' ]) : string
Parameters
- $param : mixed = ''
Return values
string —property()
Returns a defined property value or default if one is not set.
public
property(string $name[, string $default = null ]) : string
Parameters
- $name : string
-
The property name to look for.
- $default : string = null
-
A default value to return if no name is found.
Return values
string —The property value or the default specified.
propertyExists()
Checks if a property exists, extension equivalent of `property_exists()`
public
propertyExists(string $name) : bool
Parameters
- $name : string
Return values
bool —propertyName()
Returns the external property name when the property value is an external property reference.
public
propertyName(string $name[, mixed $default = null ]) : string
Otherwise the default value specified is returned.
Parameters
- $name : string
-
The property name
- $default : mixed = null
Return values
string —randomUsers()
public
randomUsers() : Collection
Return values
Collection —renderPartial()
Renders a requested partial in context of this component, see Cms\Classes\Controller@renderPartial for usage.
public
renderPartial() : mixed
Return values
mixed —roles()
Returns a collection of roles which the logged in user has
public
roles() : string
Return values
string —runAjaxHandler()
Executes the event cycle when running an AJAX handler.
public
runAjaxHandler(mixed $handler) : bool
Parameters
- $handler : mixed
Return values
bool —Returns true if the handler was found. Returns false otherwise.
setExternalPropertyName()
Sets an external property name.
public
setExternalPropertyName(string $name, string $extName) : string
Parameters
- $name : string
-
Property name
- $extName : string
-
External property name
Return values
string —setExternalPropertyNames()
Sets names used by external properties.
public
setExternalPropertyNames(array<string|int, mixed> $names) : void
Parameters
- $names : array<string|int, mixed>
-
The key should be the property name, the value should be the external property name.
Return values
void —setProperties()
Sets multiple properties.
public
setProperties(array<string|int, mixed> $properties) : void
Parameters
- $properties : array<string|int, mixed>
Return values
void —setProperty()
Sets a property value
public
setProperty(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Return values
void —singleUser()
Returns a user by ID specified in the component, or the logged in user if one is not specified
public
singleUser() : mixed
Return values
mixed —type()
Returns the list/component type
public
type() : mixed
Return values
mixed —user()
Provides user information to the page
public
user() : mixed
Return values
mixed —userAvatar()
Returns the users avatar model TODO: This should return the default avatar if the user doesn't have an avatar
public
userAvatar() : mixed
Return values
mixed —usersGroups()
Returns a collection of groups which a user has
public
usersGroups() : mixed
Return values
mixed —usersRoles()
Returns a collection of roles which a user has
public
usersRoles() : mixed
Return values
mixed —validateProperties()
Validates the properties against the defined properties of the class.
public
validateProperties(array<string|int, mixed> $properties) : array<string|int, mixed>
This method also sets default properties.
Parameters
- $properties : array<string|int, mixed>
-
The supplied property values.
Return values
array<string|int, mixed> —The validated property set, with defaults applied.
addAsset()
Adds the provided asset to the internal asset collections
protected
addAsset(string $type, string $path, array<string|int, mixed> $attributes) : mixed
Parameters
- $type : string
-
The type of the asset: 'js' || 'css' || 'rss'
- $path : string
-
The path to the asset
- $attributes : array<string|int, mixed>
-
The attributes for the asset
Return values
mixed —extendableIsAccessible()
Checks if a property is accessible, property equivalent of `is_callable()`
protected
extendableIsAccessible(mixed $class, string $propertyName) : bool
Parameters
- $class : mixed
- $propertyName : string
Return values
bool —extensionExtractMethods()
Extracts the available methods from a behavior and adds it to the list of callable methods.
protected
extensionExtractMethods(string $extensionName, object $extensionObject) : void
Parameters
- $extensionName : string
- $extensionObject : object
Return values
void —getAssetEntryBuildPath()
Internal helper, attaches a build code to an asset path
protected
getAssetEntryBuildPath(array<string|int, mixed> $asset) : string
Parameters
- $asset : array<string|int, mixed>
-
Stored asset array
Return values
string —getAssetScheme()
Internal helper, get asset scheme
protected
getAssetScheme(string $asset) : string
Parameters
- $asset : string
-
Specifies a path (URL) to the asset.
Return values
string —getLocalPath()
protected
getLocalPath(string $relativePath) : mixed
Parameters
- $relativePath : string
Return values
mixed —removeDuplicates()
Removes duplicate assets from the entire collection.
protected
removeDuplicates() : void
Return values
void —renderComments()
Used to dynamically update the comment section when a user leaves a new comment
private
renderComments( $comments) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed> —renderResults()
Renders a search results partial.
private
renderResults( $results) : array<string|int, mixed>