rmrevin\yii\fontawesome\FA::getConstants PHP Method

getConstants() public static method

Get all icon constants for dropdown list in example
public static getConstants ( boolean $html = false ) : array
$html boolean whether to render icon as array value prefix
return array
    public static function getConstants($html = false)
    {
        $result = [];
        foreach ((new \ReflectionClass(get_class()))->getConstants() as $constant) {
            $key = static::$cssPrefix . ' ' . static::$cssPrefix . '-' . $constant;
            $result[$key] = $html ? static::icon($constant) . '  ' . $constant : $constant;
        }
        return $result;
    }

Usage Example

Example #1
0
 public function testGetConstants()
 {
     $this->assertNotEmpty(FA::getConstants(false));
     $this->assertNotEmpty(FA::getConstants(true));
 }
All Usage Examples Of rmrevin\yii\fontawesome\FA::getConstants