/**
  * Constructor.
  */
 public function __construct(HomeTabConfig $htc)
 {
     $homeTab = $htc->getHomeTab();
     $details = [];
     $details['tabId'] = $homeTab->getId();
     $details['tabName'] = $homeTab->getName();
     $details['tabType'] = $homeTab->getType();
     $details['tabIcon'] = $homeTab->getIcon();
     $details['configId'] = $htc->getId();
     $details['type'] = $htc->getType();
     $details['locked'] = $htc->isLocked();
     $details['visible'] = $htc->isVisible();
     $details['tabOrder'] = $htc->getTabOrder();
     $details['details'] = $htc->getDetails();
     parent::__construct(self::ACTION, $details);
 }
 /**
  * Constructor.
  */
 public function __construct(HomeTabConfig $htc)
 {
     $workspace = $htc->getWorkspace();
     $homeTab = $htc->getHomeTab();
     $details = [];
     $details['tabId'] = $homeTab->getId();
     $details['tabName'] = $homeTab->getName();
     $details['tabType'] = $homeTab->getType();
     $details['tabIcon'] = $homeTab->getIcon();
     $details['configId'] = $htc->getId();
     $details['type'] = $htc->getType();
     $details['locked'] = $htc->isLocked();
     $details['visible'] = $htc->isVisible();
     $details['tabOrder'] = $htc->getTabOrder();
     $details['details'] = $htc->getDetails();
     $details['workspaceId'] = $workspace->getId();
     $details['workspaceCode'] = $workspace->getCode();
     $details['workspaceName'] = $workspace->getName();
     $details['workspaceGuid'] = $workspace->getGuid();
     parent::__construct(self::ACTION, $details, null, null, null, null, $workspace);
 }
Exemplo n.º 3
0
 public function createUserVersion(HomeTabConfig $homeTabConfig, User $user)
 {
     $newHomeTabConfig = new HomeTabConfig();
     $newHomeTabConfig->setHomeTab($homeTabConfig->getHomeTab());
     $newHomeTabConfig->setType($homeTabConfig->getType());
     $newHomeTabConfig->setUser($user);
     $newHomeTabConfig->setVisible($homeTabConfig->isVisible());
     $newHomeTabConfig->setLocked($homeTabConfig->isLocked());
     $newHomeTabConfig->setTabOrder($homeTabConfig->getTabOrder());
     $this->om->persist($newHomeTabConfig);
     $this->om->flush();
     return $newHomeTabConfig;
 }