You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
445 B
PHP
20 lines
445 B
PHP
<?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} ?>\"";
|
|
}
|
|
}
|