public function up() { $gadget = new Gadget(); $gadget->setType('loginTop'); $gadget->setName('loginForm'); $gadget->setSortOrder(10); $gadget->save(); }
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(); } }
public function save() { foreach ($this->values as $type => $gadgets) { if (!$gadgets) { continue; } foreach ($gadgets as $value) { $gadget = new Gadget(); $gadget->setType($type); $gadget->setName($value); $gadget->save(); } } }
public function up() { $eventNavigation = new Navigation(); $eventNavigation->setType('community'); $eventNavigation->setUri('communityEvent/listCommunity'); $eventNavigation->setSortOrder(6); $eventNavigation->setCaption('Events', 'en'); $eventNavigation->setCaption('イベントリスト', 'ja_JP'); $gadget = new Gadget(); $gadget->setType('contents'); $gadget->setName('recentCommunityEventComment'); $gadget->setSortOrder(132); $gadget->save(); $gadget = new Gadget(); $gadget->setType('mobileContents'); $gadget->setName('recentCommunityEventComment'); $gadget->setSortOrder(111); $gadget->save(); }
public function up() { $gadget = new Gadget(); $gadget->setType('top'); $gadget->setName('birthdayBox'); $gadget->setSortOrder(0); $gadget->save(); $gadget = new Gadget(); $gadget->setType('mobileTop'); $gadget->setName('birthdayBox'); $gadget->setSortOrder(0); $gadget->save(); $gadget = new Gadget(); $gadget->setType('profileTop'); $gadget->setName('birthdayBox'); $gadget->setSortOrder(0); $gadget->save(); $gadget = new Gadget(); $gadget->setType('mobileProfileTop'); $gadget->setName('birthdayBox'); $gadget->setSortOrder(0); $gadget->save(); }