File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ class PropelJSBehavior extends Behavior
1212 /** @var PluralizerInterface */
1313 protected $ pluralizer ;
1414
15+ private static $ tablesProcessed = 0 ;
16+
1517 /**
1618 * @return PluralizerInterface
1719 */
@@ -22,10 +24,18 @@ public function getPluralizer() {
2224
2325 return $ this ->pluralizer ;
2426 }
27+
28+ public function modifyTable ()
29+ {
30+ self ::$ tablesProcessed ++;
31+
32+ if (self ::$ tablesProcessed === count ($ this ->getTables ())) {
33+ self ::execute ();
34+ }
35+ }
2536
26- public function modifyDatabase ()
37+ public function execute ()
2738 {
28- parent ::modifyDatabase ();
2939
3040 $ jsDirectory = getcwd () . '/generated-js ' ;
3141 $ apiDirectory = getcwd () . '/generated-api ' ;
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ public static function getAction()
144144 /**
145145 * @return ModelCriteria
146146 */
147- public function getQueryOr404()
147+ public static function getQueryOr404()
148148 {
149149 if (static::$query === null) {
150150 $resourceName = static::getResourceName();
You can’t perform that action at this time.
0 commit comments