@@ -87,70 +87,4 @@ public function getState(): mixed
8787
8888 return $ state ;
8989 }
90-
91- // public function formatState(mixed $state): HtmlString
92- // {
93- // $html = '';
94- // $isHtml = $this->isHtml();
95- // /** @var \Illuminate\Support\Collection $stateCollection */
96- // $stateCollection = $this->getState()->sliding(1);
97- // // $listLimit = $this->getListLimit();
98- // // foreach (range(1, $listLimit) as $key => $listRow) {
99- // foreach ($this->getState() as $key => $item) {
100- // // $item = $stateCollection->get($key)->first();
101- // // $jsonKey = $stateCollection->get($key)->keys()->first();
102- // $newState = $this->evaluate($this->formatStateUsing ?? $item, [
103- // 'state' => $item,
104- // ]);
105- //
106- // if ($characterLimit = $this->getCharacterLimit()) {
107- // $newState = Str::limit($item, $characterLimit, $this->getCharacterLimitEnd());
108- // }
109- // if ($wordLimit = $this->getWordLimit()) {
110- // $newState = Str::words($item, $wordLimit, $this->getWordLimitEnd());
111- // }
112- // if ($isHtml && $this->isMarkdown()) {
113- // $newState = Str::markdown($item);
114- // }
115- //
116- // $prefix = $this->getPrefix();
117- // $suffix = $this->getSuffix();
118- //
119- // if (
120- // (($prefix instanceof Htmlable) || ($suffix instanceof Htmlable)) &&
121- // (!$isHtml)
122- // ) {
123- // $isHtml = true;
124- // $newState = e($newState);
125- // }
126- // if (filled($prefix)) {
127- // if ($prefix instanceof Htmlable) {
128- // $prefix = $prefix->toHtml();
129- // } elseif ($isHtml) {
130- // $prefix = e($prefix);
131- // }
132- //
133- // $newState = $prefix . $newState;
134- // }
135- // if (filled($suffix)) {
136- // if ($suffix instanceof Htmlable) {
137- // $suffix = $suffix->toHtml();
138- // } elseif ($isHtml) {
139- // $suffix = e($suffix);
140- // }
141- //
142- // $newState .= $suffix;
143- // }
144- // if (!empty($newState)) {
145- // $html .= "
146- // <p>
147- // <b>$key</b>: $newState
148- //
149- // </p>
150- // ";
151- // }
152- // }
153- //
154- // return new HtmlString($html);
155- // }
15690}
0 commit comments