PHP code example of mati-core / menu
1. Go to this page and download the library: Download mati-core/menu 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/ */
mati-core / menu example snippets
class MyBadgeHandler implements IMenuBadgeHandler
{
/**
* @return array|MenuBadge[]
*/
public function getBadge(): array
{
$ret = [];
$ret[] = new MenuBadge('Success', MenuBadge::TYPE_SUCCESS);
$ret[] = new MenuBadge('Danger', MenuBadge::TYPE_DANGER);
$ret[] = new MenuBadge('Info', MenuBadge::TYPE_INFO);
$ret[] = new MenuBadge('Warning', MenuBadge::TYPE_WARNING);
return $ret;
}
}