@param Twig_Environment $environment
@param Order            $order

@return string the HTML rendered
358959
public function renderECommerceTracking(\Twig_Environment $environment, Order $order)
    {
        $order = $this->orderPreparer->prepare($order);
        $options = $this->orderConverter->convert($order);
        $template = $environment->loadTemplate(
            'KunstmaanSeoBundle:GoogleAnalyticsTwigExtension:ecommerce_tracking.html.twig'
        );

        return $template->render($options);
    }
882198
public function edit(Order $order)
    {
        Shop::instance($order->shop_id);
        $paymentMethods = Shop::getPaymentMethods()->flatten()->mapWithKeys(function($method) {
            return [$method::getId() => $method::getName()];
        })->all();
        return view('order::admin.orders.edit', compact('order', 'paymentMethods'));
    }
1333383
protected function getTemplateDataFromOrder(\TdbShopOrder $order)
    {
        $data = $order->GetSQLWithTablePrefix($order->table);
        $shop = $order->GetFieldShop();
        $shopData = $shop->GetSQLWithTablePrefix($shop->table);
        $data = array_merge($data, $shopData);

        return $data;
    }
563540
protected function getMethodTemplate($template_name, array $order, array $method)
    {
        if (empty($method['status']) || empty($method['template'][$template_name])) {
            return '';
        }

        $settings = array();
        $template = $method['template'][$template_name];

        if (!empty($method['module'])) {
            $template = "{$method['module']}|$template";
            $settings = $this->getModuleSettings($method['module']);
        }

        $data = array(
            'order' => $order,
            'method' => $method,
            'settings' => $settings
        );

        return $this->render($template, $data);
    }
827328
public function getEnvironmentLabel(Environment $environment, $tag = 'info')
    {
        $id = $environment->id;
        $title = $environment->title;
        $use_title = strlen($title) > 0 && $title !== $id;
        $pattern = $use_title ? '%2$s (%3$s)' : '%3$s';
        if ($tag !== false) {
            $pattern = $use_title ? '<%1$s>%2$s</%1$s> (%3$s)' : '<%1$s>%3$s</%1$s>';
        }

        return sprintf($pattern, $tag, $title, $id);
    }
1083440
protected function canViewOrder(Order $order)
    {
        return $this->httpContext->getValue(Context::CONTEXT_AUTH)
            && $this->isVisible($order);
    }
216289
private function generateInvoice($order)
    {
        // create and persist the invoice entity
        $invoice = $this->orderInvoiceManager->generateDebitInvoice($order);

        // write invoice contents (pdf) in a temporary file
        $temp_file = sys_get_temp_dir() . '/librinfo_invoice_' . $invoice->getNumber() . '.pdf';
        if (file_exists($temp_file)) {
            unlink($temp_file);
        }
        file_put_contents($temp_file, $invoice->getFile());

        return $temp_file;
    }
846537
public function destroy(Order $order)
    {
        $this->order->destroy($order);

        return redirect()->route('admin.order.order.index')
            ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('order::orders.title.orders')]));
    }
1042846
public function orderBy($order = null) {
		if (is_null($order)) //remove option
			return $this->discard('query.orderBy');
			
		return $this->merge(['query.orderBy' => func_get_args()]);
	}
289387
public function menu(Environment $env, $identifier = '', $template = '_sub_menu.twig', $params = [])
    {
        $menu = $this->menu->menu($identifier);

        $context = [
            'name' => $menu->getName(),
            'menu' => $menu->getItems(),
        ];
        $context += (array) $params;

        return $env->render($template, $context);
    }
120727
private function saveOrderAndEnvironment($orderId, $environment)
    {
        $this->_ordersFactory->create()
            ->setData([
                    'order_id' => $orderId,
                    'environment' => $environment
            ])->save();
    }
56888
protected function getOrderBys($order)
    {
        $separatedOrders = [$order];

        if ($this->isMultiOrderQuery($order)) {
            $separatedOrders = explode(',', $order);
        }

        return $separatedOrders;
    }
210398
public function renderTable(\Twig_Environment $env, $args = array()) {
        $array = array();
        $config = $this->fillModel($array);
        $array['deleteUrl'] = $this->fetchUrl($args, 'delete', $config->getDeleteRoute());
        $array['tableId'] = $config->getId();
        $array['transScope'] = $config->getTransScope();
        $array['views'] = $config->getViews();
        $array['frontendFramework'] = $config->getFrontendFramework();
        $array['frontendFrameworkName'] = FrontendFramework::toString($config->getFrontendFramework());
        return $this->render($env, 'twentystepsAutoTablesBundle:AutoTablesExtension:autoTable.html.twig', $array);
    }
1268099
public static function RenderOrderSuccessHTMLCode()
    {
        $sHTML = '';
        $oUserOrder = &TShopBasket::GetLastCreatedOrder();
        $oProgram = TdbPkgShopAffiliate::GetActiveInstance();
        if ($oUserOrder && $oProgram) {
            $sHTML = $oProgram->RenderHTMLCode($oUserOrder);
        }

        return $sHTML;
    }
925773
public function orderBy($order, $append = true, $first = false)
    {
        return $this->command->orderBy($order, $append, $first);
    }
705648
private function updateSalesOrderGridEnvironment($orderId, $environment)
    {
        $environmentName = $this->getEnvironmentName($environment);

        $resource = $this->_objectManager->create('Magento\Framework\App\ResourceConnection');

        //Getting connection
        $connection  = $resource->getConnection();
        //Getting full table name
        $tableName = $resource->getTableName('sales_order_grid');
        //Update sales_order_grid query
        $mapsDeleteQuery = "UPDATE $tableName SET environment='$environmentName' WHERE entity_id=$orderId";
        $connection->query($mapsDeleteQuery);
    }
602465
public function renderMenu(\Twig_Environment $environment, $menuIdentifier, $depth = 1)
    {
        $queryBuilder = $this->repo->getNodesHierarchyQueryBuilder(null, false, array(), true)
            ->join('ClasticMenuBundle:Menu', 'menu', Join::WITH, 'menu.id = node.menu')
            ->andWhere('menu.identifier = :identifier')
            ->setParameter('identifier', $menuIdentifier);

        $globals = $environment->getGlobals();

        /** @var GlobalVariables $variables */
        $variables = $globals['app'];
        $currentUrl = $variables->getRequest()->server->get('REQUEST_URI');

        $items = array_map(function (MenuItem $item) use ($currentUrl) {

            $url = $item->getUrl();
            $node = $item->getNode();
            // TODO Remove getTitle once a solution is found.
            if ($node && $node->getTitle() && isset($node->alias)) {
                $url = '/'.$node->alias->getAlias();
            }

            return array(
                'title' => $item->getTitle(),
                'left' => $item->getLeft(),
                'right' => $item->getRight(),
                'root' => $item->getRoot(),
                'level' => $item->getLevel(),
                'id' => $item->getId(),
                '_node' => $item,
                '_active' => ($url == $currentUrl),
                '_link' => $url,
            );
        }, $queryBuilder->getQuery()->getResult());

        return $environment->render('ClasticMenuBundle:Twig:menu.html.twig', array(
            'tree' => $this->repo->buildTree($items),
        ));
    }