src/Utility/Import.php
public static function setStatusLabels(array $data, int $index) : array
    {
        $view = new View();
        $statusLabels = [
            ImportResultsTable::STATUS_SUCCESS => 'success',
            ImportResultsTable::STATUS_PENDING => 'warning',
            ImportResultsTable::STATUS_FAIL => 'danger'
        ];
        foreach ($data as $key => $value) {
            $data[$key][$index] = $view->Html->tag('span', $value[$index], [
                'class' => 'label label-' . $statusLabels[$value[$index]]
            ]);
        }

        return $data;
    }
public static function setStatusLabels(array $data, int $index) : array
    {
        $view = new View();
        $statusLabels = [
            ImportResultsTable::STATUS_SUCCESS => 'success',
            ImportResultsTable::STATUS_PENDING => 'warning',
            ImportResultsTable::STATUS_FAIL => 'danger'
        ];
        foreach ($data as $key => $value) {
            $data[$key][$index] = $view->Html->tag('span', $value[$index], [
                'class' => 'label label-' . $statusLabels[$value[$index]]
            ]);
        }

        return $data;
    }
public static function setStatusLabels ( array $ data , int $ index ) : array { $ view = new View ( ) ; $ statusLabels = [ ImportResultsTable :: STATUS_SUCCESS => 'success' , ImportResultsTable :: STATUS_PENDING => 'warning' , ImportResultsTable :: STATUS_FAIL => 'danger' ] ; foreach ( $ data as $ key => $ value ) { $ data [ $ key ] [ $ index ] = $ view -> Html -> tag ( 'span' , $ value [ $ index ] , [ 'class' => 'label label-' . $ statusLabels [ $ value [ $ index ] ] ] ) ; } return $ data ; }
Response data status labels setter.

@param mixed[] $data Response data
@param int $index Status column index
@return mixed[]
Response data status labels setter .