getAttributes
Learn how to get the context attributes for the content.
This method provides the context attributes set for the content.
Signature
This method has the following signature:
public function getAttributes(): arrayThis method returns the context attributes, or an empty array by default.
Example
Here is a basic example of how to use this method:
<?phpuse Croct\Plug\FetchOptions;
$options = FetchOptions::defaults()->withAttribute('plan', 'premium');$attributes = $options->getAttributes();