src/Sulu/Bundle/Sales/OrderBundle/Controller/TemplateController.php
public function getOrderStatus()
    {
        $statuses = $this->getDoctrine()->getRepository(self::$orderStatusEntityName)->findAll();
        $locale = $this->getUser()->getLocale();
        $statusArray = [];

        foreach ($statuses as $statusEntity) {
            $status = new OrderStatus($statusEntity, $locale);
            $statusArray[] = array(
                'id' => $status->getId(),
                'status' => $status->getStatus()
            );
        }
        return $statusArray;
    }
public function getOrderStatus()
    {
        $statuses = $this->getDoctrine()->getRepository(self::$orderStatusEntityName)->findAll();
        $locale = $this->getUser()->getLocale();
        $statusArray = [];

        foreach ($statuses as $statusEntity) {
            $status = new OrderStatus($statusEntity, $locale);
            $statusArray[] = array(
                'id' => $status->getId(),
                'status' => $status->getStatus()
            );
        }
        return $statusArray;
    }
public function getOrderStatus ( ) { $ statuses = $ this -> getDoctrine ( ) -> getRepository ( self :: $ orderStatusEntityName ) -> findAll ( ) ; $ locale = $ this -> getUser ( ) -> getLocale ( ) ; $ statusArray = [ ] ; foreach ( $ statuses as $ statusEntity ) { $ status = new OrderStatus ( $ statusEntity , $ locale ) ; $ statusArray [ ] = array ( 'id' => $ status -> getId ( ) , 'status' => $ status -> getStatus ( ) ) ; } return $ statusArray ; }
returns array of order statuses
@return array
returns array of order statuses