Archived
1
0
Fork 0
This repository has been archived on 2026-04-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
httpcb/app/library/ViewHelper/Icon.php

29 lines
502 B
PHP

<?php
namespace Httpcb\ViewHelper;
/**
* Class Icon
*
* @package ViewHelper
*/
class Icon extends AbstractHelper
{
public function icon($name, $args = array())
{
$classes = array(
'icon',
'ion-' . $name
);
if (is_array($args)) {
foreach($args as $arg) {
$classes[] .= 'ion-' . $arg;
}
}
$classes = implode(' ', $classes);
return '<i class="' . $classes . '"></i>';
}
}