getNewWindow()

@author Tom Haskins-Vaughan <tom@harvestcloud.com>
@since  2012-10-29

@return SellerWindow
423934
public function getNewWindow()
    {
        switch ($this->getDeliveryType())
        {
            case HubWindow::DELIVERY_TYPE_PICKUP:

              $window = new SellerPickupWindow();

              break;

            case HubWindow::DELIVERY_TYPE_DELIVERY:

              $window = new SellerDeliveryWindow();

              break;
        }

        $this->getSellerHubRef()->addSellerWindow($window);

        return $window;
    }
981366
protected function getExistingObject()
    {
        $sale = SaleQuery::create()
            ->findOneById($this->getRequest()->get('sale_id', 0));

        if (null !== $sale) {
            $sale->setLocale($this->getCurrentEditionLocale());
        }

        return $sale;
    }
1107115
public function indexAction()
    {
        $windows = $this->getRepo('SellerWindow')
            ->findUpcomingForSeller($this->getCurrentProfile())
        ;

        return $this->render('HarvestCloudCoreBundle:Seller/SellerWindow:index.html.twig', array(
          'windows' => $windows,
        ));
    }
128190
protected function &GetActiveItem()
    {
        if (is_null($this->oActiveItem) && !is_null($this->sActiveItemId)) {
            $this->oActiveItem = TdbPkgImageHotspotItem::GetNewInstance();
            $this->oActiveItem->Load($this->sActiveItemId);
        }

        return $this->oActiveItem;
    }
423582
public function open_as_buyerAction()
    {
        $q  = $this->get('doctrine')
            ->getManager()
            ->createQuery('
                SELECT    o
                FROM      HarvestCloudCoreBundle:Order o
                LEFT JOIN o.buyer b
                LEFT JOIN o.seller s
                LEFT JOIN o.hub h
                WHERE     :profile = o.buyer
                ORDER BY  o.id DESC
            ')
            ->setParameter('profile', $this->getCurrentProfile())
        ;

        $orders = $q->getResult();

        return $this->render('HarvestCloudCoreBundle:Order/Dashboard:open_as_buyer.html.twig', array(
            'orders'  => $orders,
        ));
    }
353868
public function addSellerWindow(\HarvestCloud\CoreBundle\Entity\SellerWindow $sellerWindow)
    {
        $this->sellerWindows[] = $sellerWindow;

        $sellerWindow->setHubWindow($this);
    }
278430
public function getServiceBroker()
    {
        if (!$this->serviceBroker) {
            $this->setServiceBroker($this->getServiceLocator()->get('ServiceBroker'));
        }
        
        return $this->serviceBroker;
    }
1107926
public function getOwner() {

		if(false !== $this -> file -> getExists()) {

			$this -> refresh();
			
			return $this -> file -> getOwner();
		}
	}
279618
public static DCWindow getAnyWindow() {
        for (final WeakReference<DCWindowContext> ref : _allWindowContexts) {
            final DCWindowContext windowContext = ref.get();
            if (windowContext != null) {
                final List<DCWindow> windows = windowContext.getWindows();
                for (final DCWindow window : windows) {
                    if (window != null) {
                        return window;
                    }
                }
            }
        }
        return null;
    }
640764
public Window buildWindow() {
        final Window window = new Window(caption);
        window.setContent(content);
        window.setSizeUndefined();
        window.setModal(true);
        window.setResizable(false);

        decorateWindow(window);

        if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) {
            window.setClosable(false);
        }

        return window;
    }
694596
public function getBroker()
    {
        if (is_null($this->broker)) {
            $this->broker = $this->getOption(self::OPTION_TASK_LOG_BROKER);
            $this->broker->setServiceLocator($this->getServiceLocator());
        }

        return $this->broker;
    }
391135
public function current()
    {
        if ($this->_curval == null) {
            return $this->next();
        }
        return new $this->_cls($this->_curval);
    }
973797
public function build(): SetWindowBoundsRequest
	{
		$instance = new SetWindowBoundsRequest();
		if ($this->windowId === null) {
			throw new BuilderException('Property [windowId] is required.');
		}
		$instance->windowId = $this->windowId;
		if ($this->bounds === null) {
			throw new BuilderException('Property [bounds] is required.');
		}
		$instance->bounds = $this->bounds;
		return $instance;
	}
1155066
public function indexAction()
    {
        $currentProfile = $this->getCurrentProfile();

        $windowMakers = $this->getRepo('SellerWindowMaker')
            ->findForSeller($currentProfile)
        ;

        return $this->render('HarvestCloudCoreBundle:Seller/WindowMaker:index.html.twig', array(
          'windowMakers' => $windowMakers,
        ));
    }
672064
public function newInstance()
    {
        $class = $this->entityMap->getClass();

        if ($this->entityMap->useDependencyInjection()) {
            return $this->newInstanceUsingDependencyInjection($class);
        }

        return $this->newInstanceUsingInstantiator($class);
    }
671393
public function landingAction()
    {
        if ($this->getCurrentProfile()->hasActiveSellerStatus())
        {
            return $this->redirect($this->generateUrl('Seller_homepage'));
        }

        return $this->render('HarvestCloudCoreBundle:Seller/Register:landing.html.twig', array(
          'seller' => $this->getCurrentProfile(),
        ));
    }
1185195
public Window getParentWindow() {
		if (parentWindow == null) {
			if ((parentComponent == null) && (getApplicationConfig().windowManager().getActiveWindow() != null)) {
				parentWindow = getApplicationConfig().windowManager().getActiveWindow().getControl();
			}
			else {
				parentWindow = getWindowForComponent(parentComponent);
			}
		}
		return parentWindow;
	}