WowPress-Tailwind/theme/vendor/illuminate/view/Compilers/Concerns/CompilesClasses.php

20 lines
445 B
PHP
Raw Normal View History

2024-04-15 23:07:29 +02:00
<?php
namespace Illuminate\View\Compilers\Concerns;
trait CompilesClasses
{
/**
* Compile the conditional class statement into valid PHP.
*
* @param string $expression
* @return string
*/
protected function compileClass($expression)
{
$expression = is_null($expression) ? '([])' : $expression;
return "class=\"<?php echo \Illuminate\Support\Arr::toCssClasses{$expression} ?>\"";
}
}