Storybook: Code
The Code paragraph: language, style, line numbers
Storybook · demo
PHP, line numbers, solarized style
An OOP-style hook
<?php
declare(strict_types=1);
namespace Drupal\vmhub_core\Hook;
use Drupal\Core\Hook\Attribute\Hook;
final class Example {
#[Hook('node_presave')]
public function presave(NodeInterface $node): void {
$node->setTitle(trim($node->getTitle()));
}
}TypeScript, dark style
export const revalidate = async (tags: string[]) => {
for (const tag of tags) {
revalidateTag(tag);
}
};YAML without line numbers
name: 'VMHub Content: Demo'
type: Content
install:
- vmhub_content
- vmhub_siteShell, centered
docker compose exec -T php drush cr
docker compose exec -T php composer drupal:content:demo