本文整理汇总了PHP中Gadget::setName方法的典型用法代码示例。如果您正苦于以下问题:PHP Gadget::setName方法的具体用法?PHP Gadget::setName怎么用?PHP Gadget::setName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gadget
的用法示例。
在下文中一共展示了Gadget::setName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: up
public function up()
{
$gadget = new Gadget();
$gadget->setType('loginTop');
$gadget->setName('loginForm');
$gadget->setSortOrder(10);
$gadget->save();
}
示例2: up
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();
}
}
示例3: 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();
}
}
}
示例4: up
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();
}
示例5: up
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();
}