$elementConfig =
new ElementConfig($config);
$element->
setConfig($elementConfig);
} private function assignViewports(Element
$element, array
$viewports =
[]) { $elementViewports =
[];
foreach ($viewports as $rawViewportData) { $viewport =
new ElementViewport();
$viewport->
setId((int) $rawViewportData['__emotionElementViewport_id'
]);
$viewport->
setEmotionId((int) $rawViewportData['__emotionElementViewport_emotion_id'
]);
$viewport->
setElementId((int) $rawViewportData['__emotionElementViewport_element_id'
]);
$viewport->
setAlias($rawViewportData['__emotionElementViewport_alias'
]);
$viewport->
setStartRow((int) $rawViewportData['__emotionElementViewport_start_row'
]);
$viewport->
setStartCol((int) $rawViewportData['__emotionElementViewport_start_col'
]);
$viewport->
setEndCol((int) $rawViewportData['__emotionElementViewport_end_col'
]);
$viewport->
setEndRow((int) $rawViewportData['__emotionElementViewport_end_row'
]);
$viewport->
setVisible((bool) $rawViewportData['__emotionElementViewport_visible'
]);
$elementViewports[] =
$viewport;
}