<?php
namespace Modules\RemoteData\InfoBox; class View_ImportedDocumentsSystem extends \App\Mvc\View_RemoteDataInfoBoxEntityAbstract { protected function getEntityRemoteDetails(\App\Entity\SelectAbstract $entity) { $output = \Engine\RemoteData\InfoBox\Container_Main::create( $entity->name.' ('.$entity->code.')' ) ->setShortTitle(sprintf("%s (%s)", $entity->name, $entity->code)) ->setId(sprintf("%s.%s", __CLASS__, $entity->getId())); $cont1 = \Engine\RemoteData\InfoBox\Container_Simple::create($this->lang['general']['titles']['general']); $output->addContainer($cont1); $cont1->addField( \Engine\RemoteData\InfoBox\Field_String::create($this->lang['general']['fields']['id'], $entity->getId()) ); $cont1->addField( \Engine\RemoteData\InfoBox\Field_String::create($this->lang['general']['fields']['name'], $entity->name) ); $cont1->addField( \Engine\RemoteData\InfoBox\Field_String::create($this->lang['general']['fields']['code'], $entity->code) ); $cont1->addField( \Engine\RemoteData\InfoBox\Field_Boolean::create($this->lang['general']['fields']['active'], (bool)$entity->active) ); $cont2 = \Engine\RemoteData\InfoBox\Container_Simple::create($this->lang['importedDocumentSystem']['titles']['account'])->setHidden(true); $output->addContainer($cont2); $cont2->addField( \Engine\RemoteData\InfoBox\Field_String::create($this->lang['importedDocumentSystem']['fields']['username'], $entity->username)); $cont2->addField( \Engine\RemoteData\InfoBox\Field_String::create($this->lang['importedDocumentSystem']['fields']['token'], $entity->token )); $cont3 = \Engine\RemoteData\InfoBox\Container_Simple::create($this->lang['general']['titles']['updates'])->setHidden(true); $output->addContainer($cont3); $cont3->addField( \Engine\RemoteData\InfoBox\Field_DateTime::create($this->lang['general']['fields']['addTime'], \Engine\DateTime::createFromIsoDatetime($entity->addTime)) ); $cont3->addField( \App\RemoteData\InfoBox\Field_EntityInfoBox::create($this->lang['general']['fields']['addUser'], $entity->addUser->name)->setEntity('user', $entity->idAddUser) ); $cont3->addField( \Engine\RemoteData\InfoBox\Field_DateTime::create($this->lang['general']['fields']['updateTime'], \Engine\DateTime::createFromIsoDatetime($entity->lastUpdateTime)) ); $cont3->addField( \App\RemoteData\InfoBox\Field_EntityInfoBox::create($this->lang['general']['fields']['updateUser'], $entity->updateUser->name)->setEntity('user', $entity->idUpdateUser) ); if ($entity->updatesCount) { $cont3->addField( \Engine\RemoteData\InfoBox\Field_String::create($this->lang['general']['fields']['updatesCount'], $entity->updatesCount) ); } return $output; } } 