File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public function getName()
1010
1111 public function getVersion ()
1212 {
13- return '0.3.0 ' ;
13+ return '0.3.0.3 ' ;
1414 }
1515
1616 public function getDeveloper ()
@@ -27,13 +27,33 @@ public function hasCpSection()
2727 {
2828 return true ;
2929 }
30+
31+ public function registerSiteRoutes ()
32+ {
33+ $ routes = array (
34+ 'postmaster/queue/marshal ' => array ('action ' => 'postmaster/queue/marshal ' )
35+ );
36+
37+ foreach (craft ()->postmaster ->getRegisteredServices () as $ service )
38+ {
39+ $ routes = array_merge ($ routes , $ service ->registerSiteRoutes ());
40+ }
41+
42+ foreach (craft ()->postmaster ->getRegisteredParcelTypes () as $ service )
43+ {
44+ $ routes = array_merge ($ routes , $ service ->registerSiteRoutes ());
45+ }
46+
47+ return $ routes ;
48+ }
3049
3150 public function registerCpRoutes ()
3251 {
3352 $ routes = array (
3453 'postmaster/parcel/new ' => array ('action ' => 'postmaster/parcel/createParcel ' ),
3554 'postmaster/parcel/(?P<parcelId>\d+) ' => array ('action ' => 'postmaster/parcel/editParcel ' ),
3655 'postmaster/parcel/delete/(?P<parcelId>\d+) ' => array ('action ' => 'postmaster/parcel/deleteParcel ' ),
56+ // 'postmaster/queue/marshal' => array('action' => 'postmaster/queue/marshal'),
3757 );
3858
3959 foreach (craft ()->postmaster ->getRegisteredServices () as $ service )
@@ -45,6 +65,7 @@ public function registerCpRoutes()
4565 {
4666 $ routes = array_merge ($ routes , $ service ->registerCpRoutes ());
4767 }
68+
4869 return $ routes ;
4970 }
5071
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ public function init()
2929
3030 }
3131
32+ public function registerSiteRoutes ()
33+ {
34+ return array ();
35+ }
36+
3237 public function registerCpRoutes ()
3338 {
3439 return array ();
Original file line number Diff line number Diff line change @@ -7,4 +7,6 @@ public function init();
77
88 public function registerCpRoutes ();
99
10+ public function registerSiteRoutes ();
11+
1012}
You can’t perform that action at this time.
0 commit comments