Hook::get()

Gets hooks by its container name.

Table of Contents
  1. Description
  2. Example

Description

Hook::get(?string $name = null): ?array;

This method returns all previously hooks data added to a container. You can make it more specific by specifying the container name of the hook you want to retrieve the data from. You can use this data to execute specific hook item individually, but this is very rare to do.

Example

test(Hook::get()); // Gets all hooks
test(Hook::get('content')); // Gets all `content` hooks

Hook::get()

Gets hooks by its container name.

Hook::is()

Checks the hook name that is being executed.