ActionLinks
Corex\Ui\Patterns\ActionLinks · class · Add-ons layer
Gives the hero and call-to-action buttons a real address when they are drawn (spec 115, US-SAFE-15). A button carrying {@see PatternLibrary::ACTION_LINK} with no address of its own links to the brand’s primary action link, or else the site’s published contact page. With neither, the button is not drawn: a button that goes nowhere cannot take keyboard focus and promises what the site does not do. An address someone gave the button in the editor is left as it is. The address is looked up only when such a button is drawn, so the patterns cost no query on a request that does not show one.
Public API
Section titled “Public API”__construct(ConfigInterface $config, string $stylesheet)
Section titled “__construct(ConfigInterface $config, string $stylesheet)”register(): void
Section titled “register(): void”registerStyle(): void
Section titled “registerStyle(): void”The buttons’ focus ring, loaded only on a page that draws a button block (Principle VI).
render(string $content, array $block): string
Section titled “render(string $content, array $block): string”address(): string
Section titled “address(): string”The brand’s primary action link, else the published contact page, else nothing.