💡 Add variable typing

This commit is contained in:
Pierre Goiffon
2021-02-18 13:21:06 +01:00
parent 9d2fc883b8
commit 6e0af1a3b7

View File

@@ -3256,16 +3256,15 @@ EOF
*/
public function DisplayDocumentInline(WebPage $oPage, $sAttCode)
{
/** @var \ormDocument $oDoc */
$oDoc = $this->Get($sAttCode);
$sClass = get_class($this);
$Id = $this->GetKey();
switch ($oDoc->GetMainMimeType())
{
switch ($oDoc->GetMainMimeType()) {
case 'text':
case 'html':
$data = $oDoc->GetData();
switch ($oDoc->GetMimeType())
{
switch ($oDoc->GetMimeType()) {
case 'text/xml':
$oPage->add("<iframe id='preview_$sAttCode' src=\"".utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=display_document&class=$sClass&id=$Id&field=$sAttCode\" width=\"100%\" height=\"400\">Loading...</iframe>\n");
break;