コード例 #1
0
 public function down()
 {
     $gadgets = array_merge((array) GadgetPeer::retrieveLoginTopGadgets(), (array) GadgetPeer::retrieveLoginSideMenuGadgets(), (array) GadgetPeer::retrieveLoginContentsGadgets(), (array) GadgetPeer::retrieveLoginBottomGadgets());
     foreach ($gadgets as $gadget) {
         $gadget->delete();
     }
 }
 public function down()
 {
     $c = new Criteria();
     $c->add(NavigationPeer::TYPE, 'community');
     $c->add(NavigationPeer::URI, 'communityEvent/listCommunity');
     NavigationPeer::doDelete($c);
     $c = new Criteria();
     $c->add(GadgetPeer::NAME, 'recentCommunityEventComment');
     GadgetPeer::doDelete($c);
 }
コード例 #3
0
 public function up()
 {
     $criteria = new Criteria();
     $criteria->add(GadgetPeer::TYPE, 'mobileLoginContents');
     $criteria->add(GadgetPeer::NAME, 'loginForm');
     if (!GadgetPeer::doSelectOne($criteria)) {
         $gadget = new Gadget();
         $gadget->setType('mobileLoginContents');
         $gadget->setName('loginForm');
         $gadget->setSortOrder(10);
         $gadget->save();
     }
 }