|
@@ -2,10 +2,25 @@
|
|
|
|
|
|
namespace StatsBundle\Controller;
|
|
|
|
|
|
-use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
|
|
+use StatsBundle\Services\DeviceManager;
|
|
|
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
|
|
|
|
class StatsController extends Controller
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Route("/admin/stats/statsdevice/update", name="stats_update_devices")
|
|
|
+ *
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function updateDevicesAction()
|
|
|
+ {
|
|
|
+ /* @var $statsDeviceManager DeviceManager */
|
|
|
+ $statsDeviceManager = $this->get('stats.device.manager');
|
|
|
+ $statsDeviceManager->getDevices();
|
|
|
+
|
|
|
+ return $this->redirect($this->generateUrl('admin_stats_statsdevice_list'));
|
|
|
+ }
|
|
|
+
|
|
|
}
|