Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getCellWidth example
$textContent
= Helper::
removeDecoration
(
$this
->output->
getFormatter
(
)
,
$cell
)
;
$textLength
= Helper::
width
(
$textContent
)
;
if
(
$textLength
> 0
)
{
$contentColumns
=
mb_str_split
(
$textContent
,
ceil
(
$textLength
/
$cell
->
getColspan
(
)
)
)
;
foreach
(
$contentColumns
as
$position
=>
$content
)
{
$row
[
$i
+
$position
]
=
$content
;
}
}
}
}
$lengths
[
]
=
$this
->
getCellWidth
(
$row
,
$column
)
;
}
}
$this
->effectiveColumnWidths
[
$column
]
=
max
(
$lengths
)
+ Helper::
width
(
$this
->style->
getCellRowContentFormat
(
)
)
- 2;
}
}
private
function
getColumnSeparatorWidth
(
)
: int
{
return
Helper::
width
(
sprintf
(
$this
->style->
getBorderFormat
(
)
,
$this
->style->
getBorderChars
(
)
[
3
]
)
)
;
}
$textContent
= Helper::
removeDecoration
(
$this
->output->
getFormatter
(
)
,
$cell
)
;
$textLength
= Helper::
width
(
$textContent
)
;
if
(
$textLength
> 0
)
{
$contentColumns
=
mb_str_split
(
$textContent
,
ceil
(
$textLength
/
$cell
->
getColspan
(
)
)
)
;
foreach
(
$contentColumns
as
$position
=>
$content
)
{
$row
[
$i
+
$position
]
=
$content
;
}
}
}
}
$lengths
[
]
=
$this
->
getCellWidth
(
$row
,
$column
)
;
}
}
$this
->effectiveColumnWidths
[
$column
]
=
max
(
$lengths
)
+ Helper::
width
(
$this
->style->
getCellRowContentFormat
(
)
)
- 2;
}
}
private
function
getColumnSeparatorWidth
(
)
: int
{
return
Helper::
width
(
sprintf
(
$this
->style->
getBorderFormat
(
)
,
$this
->style->
getBorderChars
(
)
[
3
]
)
)
;
}