Lists all Warehouse entities.

@Route("/transactions", name="admin_warehouse_transactions")
@Method("GET")
@Template()
350326
public function transactionsAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        $changeLogFilter = $this->createForm(StockChangeLogFilterType::class, null, array(
            'action' => $this->generateUrl('admin_warehouse_transactions'),
            'method' => 'GET',
        ));

        $changeLogFilter->handleRequest($request);

        $filter = array();
        $filter['product'] = $changeLogFilter->get('product')->getData();
        $filter['warehouse'] = $changeLogFilter->get('warehouse')->getData();

        $qb = $em->getRepository(StockChangeLog::class)->findAllFilteredQB($filter);
        $qb->addOrderBy('scl.id', "DESC");

        $paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 20);
        return array(
            'form_filter' => $changeLogFilter->createView(),
            'paginator' => $paginator,
        );
    }
500261
public function indexAction()
    {
        $pager = $this->get('sonata.classification.manager.collection')
            ->getRootCollectionsPager($this->getCurrentRequest()->get('page'));

        return $this->render('SonataProductBundle:Collection:index.html.twig', [
            'pager' => $pager,
        ]);
    }
1105139
def items(self):
        ''' 
        '''
        if type(self.transaction['items']['item']) == list:
            return self.transaction['items']['item']
        else:
            return [self.transaction['items']['item'],]
1190986
public function refreshActionLookups()
    {
        $this->actionList = [];

        foreach ($this->allRoutes as $route) {
            if (isset($route->getAction()['controller'])) {
                $this->addToActionList($route->getAction(), $route);
            }
        }
    }
614510
public function findAll()
    {
        $keys = $this->getFileManager()->keys();
        $entities = array();
        if(is_array($keys)) {
            foreach($keys as $key) {
                if(preg_match('/^'.$this->getHash().'/', $key)) {
                    $entities[] = $this->loadEntity($key);
                }
            }
        }
        
        return $entities;
    }
280837
public function findAll()
    {
        // convert to criteria.
        $criteria = call_user_func_array(array($this, 'argsToCriteria'), func_get_args());
        
        // logical delete ?
        $schema = $this->getSchema();
        if ($schema->hasColumn('active')) {
            $criteria->where('active = ?', 1);
        }

        // to SQL.
        $sql = $criteria->toSQL();

        // query
        $sth = $this->query($sql, $criteria->getParams(), Database::TARGET_SLAVE);

        // to entities
        $entities = new Entities($this);
        $entities->setCriteria($criteria);
        foreach ($sth->fetchAll(Connection::FETCH_ASSOC) as $row) {
            $entities->add($this->build($row, true));
        }

        return $entities;
    }
780737
public function listTransaction()
    {
        $this->actionListTransaction();
        $this->setTitleListTransaction();
        $this->setBreadcrumbListTransaction();
        $this->setFilterListTransaction();
        $this->setPagerListTransaction();

        $this->setData('transactions', $this->getListTransaction());
        $this->setData('payment_methods', $this->payment->getList());

        $this->outputListTransaction();
    }
839635
protected function transactionSucceed()
	{
		return $this->getTable()->whereId($this->transactionId)->update([
			'status' => Enum::TRANSACTION_SUCCEED,
			'tracking_code' => $this->trackingCode,
			'card_number' => $this->cardNumber,
			'payment_date' => Carbon::now(),
			'updated_at' => Carbon::now(),
		]);
	}
1296902
private function extractSales($transactions) {
		$out = [];
		
		foreach ($transactions as $trx) {
			foreach ($trx->related_resources as $src) {
				if (isset($src->sale)) {
					$out[] = $src->sale;
				}
			}
		}
		
		return $out;
	}
632740
public function listAction()
    {
        $page = $this->getRequest()->getQuery('page', 0);
        $limit = $this->getRequest()->getQuery('limit', $this->defaultPageSize);
        $sort = $this->getRequest()->getQuery('sort', $this->defaultSort);
        $order = $this->getRequest()->getQuery('order', $this->defaultOrder);

        if (empty($sort)) {
            $sort = $this->defaultSort;
        }

        $offset = $limit * $page - $limit;
        if ($offset < 0) {
            $offset = 0;
        }

        /* @var $qb \Doctrine\ORM\QueryBuilder */
        $qb = $this->getEntityManager()->createQueryBuilder();
        $qb->add('select', 'e')
            ->add('from', $this->getEntityClass().' e')
            ->orderBy('e.'.$sort, $order)
            ->setFirstResult($offset)
            ->setMaxResults($limit);

        $this->handleSearch($qb);

        $paginator = new Paginator(new DoctrinePaginator(new LosPaginator($qb, false)));
        $paginator->setDefaultItemCountPerPage($limit);
        $paginator->setCurrentPageNumber($page);
        $paginator->setPageRange($this->paginatorRange);

        return [
            'paginator' => $paginator,
            'sort' => $sort,
            'order' => $order,
            'page' => $page,
            'query' => $this->params()->fromQuery(),
        ];
    }
742764
public function get($orderId, $transactionId, array $params = array())
    {
        $endpoint = '/admin/orders/'.$orderId.'/transactions/'.$transactionId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(Transaction::class, $response['transaction']);
    }
475760
public function indexAction()
    {
        $buyer = $this->get('security.context')
            ->getToken()
            ->getUser()
            ->getCurrentProfile()
        ;

        $invoices = $this->get('doctrine')
            ->getRepository('\HarvestCloud\CoreBundle\Entity\Invoice\Invoice')
            ->findByCustomer($buyer)
        ;

        return $this->render('HarvestCloudCoreBundle:Buyer/Invoice:index.html.twig', array(
          'invoices' => $invoices,
        ));
    }
1154929
public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        $entities = $em->getRepository('VeonikBlogBundle:Tag')->findAll();

        return array(
            'entities' => $entities,
        );
    }
1025936
public function listAction()
    {
        $this->routeParam()->mapPageTo($this->queryService);
        $collection = $this->queryService->findUsedTags();

        return $this->viewModelFactory()->createFor($collection);
    }
539887
public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        $visits = $em->getRepository('CoreExtraBundle:Visit')->findAll();

        return array(
            'visits' => $visits,
        );
    }
863392
public function showAction(Warehouse $warehouse)
    {
        $editForm = $this->createForm(WarehouseType::class, $warehouse, array(
            'action' => $this->generateUrl('admin_warehouse_update', array('id' => $warehouse->getid())),
            'method' => 'PUT',
        ));
        $deleteForm = $this->createDeleteForm($warehouse->getId(), 'admin_warehouse_update');

        return array(

            'warehouse' => $warehouse,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),

        );
    }
1163528
public function actionGetWarehouses() {

        $street = $_GET['street'];

        $warehouses = $this->getResponse('AddressGeneral', 'getWarehouses',
            ['CityName' => $_GET['CityName']]);

        $warehousesByStreet = [];
        foreach ($warehouses->data['data'] as $warehouse) {
            if (substr_count(mb_strtolower($warehouse['Description']), mb_strtolower($street)) != 0 ||
                substr_count(mb_strtolower($warehouse['DescriptionRu']), mb_strtolower($street))) {
                $warehousesByStreet[] = $warehouse;
            }
        }

        return json_encode($warehousesByStreet);
    }