PHP code example of polysource / widgets

1. Go to this page and download the library: Download polysource/widgets library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

polysource / widgets example snippets


return [
    Polysource\Widgets\PolysourceWidgetsBundle::class => ['all' => true],
];

#[AutoconfigureTag('polysource.widgets.dashboard')]
final class IncidentRotatorWidget extends AbstractWidget
{
    public function getName(): string { return 'incident_rotator'; }
    public function getTemplate(): string { return '@App/widgets/incident_rotator.html.twig'; }
    public function getData(): array { /* return what your template needs */ }
}