plugin/dashboard/Manager/DashboardManager.php
public function create(User $user, $data)
    {
        $dashboard = new Dashboard();
        $dashboard->setCreator($user);
        $dashboard->setName($data['name']);
        $wId = $data['workspace']['id'];
        $dashboard->setWorkspace($this->workspaceManager->getWorkspaceById($wId));
        $this->em->persist($dashboard);
        $this->em->flush();

        return $this->exportDashboard($dashboard);
    }
public function create(User $user, $data)
    {
        $dashboard = new Dashboard();
        $dashboard->setCreator($user);
        $dashboard->setName($data['name']);
        $wId = $data['workspace']['id'];
        $dashboard->setWorkspace($this->workspaceManager->getWorkspaceById($wId));
        $this->em->persist($dashboard);
        $this->em->flush();

        return $this->exportDashboard($dashboard);
    }
public function create ( User $ user , $ data ) { $ dashboard = new Dashboard ( ) ; $ dashboard -> setCreator ( $ user ) ; $ dashboard -> setName ( $ data [ 'name' ] ) ; $ wId = $ data [ 'workspace' ] [ 'id' ] ; $ dashboard -> setWorkspace ( $ this -> workspaceManager -> getWorkspaceById ( $ wId ) ) ; $ this -> em -> persist ( $ dashboard ) ; $ this -> em -> flush ( ) ; return $ this -> exportDashboard ( $ dashboard ) ; }
create a dashboard.
create a dashboard .