@@ 789-804 (lines=16) @@ | ||
786 | * |
|
787 | * @return mixed |
|
788 | */ |
|
789 | protected function getElementClassString() |
|
790 | { |
|
791 | $elementClass = $this->getElementClass(); |
|
792 | ||
793 | if (Arr::isAssoc($elementClass)) { |
|
794 | $classes = []; |
|
795 | ||
796 | foreach ($elementClass as $index => $class) { |
|
797 | $classes[$index] = is_array($class) ? implode(' ', $class) : $class; |
|
798 | } |
|
799 | ||
800 | return $classes; |
|
801 | } |
|
802 | ||
803 | return implode(' ', $elementClass); |
|
804 | } |
|
805 | ||
806 | /** |
|
807 | * Get element class selector. |
|
@@ 811-826 (lines=16) @@ | ||
808 | * |
|
809 | * @return string |
|
810 | */ |
|
811 | protected function getElementClassSelector() |
|
812 | { |
|
813 | $elementClass = $this->getElementClass(); |
|
814 | ||
815 | if (Arr::isAssoc($elementClass)) { |
|
816 | $classes = []; |
|
817 | ||
818 | foreach ($elementClass as $index => $class) { |
|
819 | $classes[$index] = '.'.(is_array($class) ? implode('.', $class) : $class); |
|
820 | } |
|
821 | ||
822 | return $classes; |
|
823 | } |
|
824 | ||
825 | return '.'.implode('.', $elementClass); |
|
826 | } |
|
827 | ||
828 | /** |
|
829 | * Add the element class. |